diff --git a/AY2324S1-CS2113-F11-2_tp_master/commits.json b/AY2324S1-CS2113-F11-2_tp_master/commits.json index 6baea6d..f3c2263 100644 --- a/AY2324S1-CS2113-F11-2_tp_master/commits.json +++ b/AY2324S1-CS2113-F11-2_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"kaijie0102":[{"date":"2023-10-17","commitResults":[{"hash":"1801a4716290f9e5bca33037ef07a1a3cf499655","isMergeCommit":true,"messageTitle":"Merge pull request #18 from Haoyuli2002/RecipeStepBranch","messageBody":"Recipe step branch","fileTypesAndContributionMap":{}},{"hash":"5a3d7f322e8b5bbbcf1be7d1f0f10d968e67954e","isMergeCommit":true,"messageTitle":"Merge pull request #19 from charkty/feature/addIngredient","messageBody":"Add Ingredient and IngredientList class","fileTypesAndContributionMap":{}},{"hash":"872e6fd20ad09bd7823e87bcb5de1906339a9d51","isMergeCommit":true,"messageTitle":"Merge pull request #21 from charkty/feature/addIngredient","messageBody":"Add exception and IngredientListTest","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"958010ae127af64874f2d5da5852dc1a87c93e9b","isMergeCommit":false,"messageTitle":"Create ui class to enable user interaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":131,"deletions":17}}},{"hash":"d828b715dd9e52b1365b19547f381ced4a208c8c","isMergeCommit":false,"messageTitle":"Small bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2b3c01d0a09d35ce6551f7c7a60aeee809b0f008","isMergeCommit":false,"messageTitle":"Fix minor bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"308bc065f802679c73cbe0261befae64628d2e33","isMergeCommit":false,"messageTitle":"Standardise method naming, parameters and behaviours","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":18}}},{"hash":"fcb0b569414b36c476e00058a077c0ff47ffe159","isMergeCommit":false,"messageTitle":"Fix GitHub CI checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"85ba159f3990a6f1b91390c94740c9ff4430e848","isMergeCommit":false,"messageTitle":"Fix missing input bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"4368146baf4ceedaf3f24b5fd914e1b48e81fafc","isMergeCommit":false,"messageTitle":"Attempt to fix input bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":2}}},{"hash":"c5625386eb421d90cb4b1158c67166eae82d5657","isMergeCommit":false,"messageTitle":"Attempt to fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"1dff123f5521cb2e34b51bdc27ab0235e4927144","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bb822b9e0f6598a03169088cf0901625813c9e6b","isMergeCommit":false,"messageTitle":"Enhance test case","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":0}}}]},{"date":"2023-10-19","commitResults":[{"hash":"dd8a95e34f726ec05ae6c7762cd7d0dac3e7d1bd","isMergeCommit":false,"messageTitle":"Add RecipeParser to partse details related to recipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":35,"deletions":28},"test-code":{"insertions":31,"deletions":0}}},{"hash":"ef7a08cf0dca373d82aa22cef9d174a86e8875c3","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"37cc4905bd1a76fed4c8be95eeafcf70ae0b292c","isMergeCommit":false,"messageTitle":"Add exception class for our program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1}}},{"hash":"a9f9a12bf02a0da03ecf1b66f6060102ae617235","isMergeCommit":false,"messageTitle":"Update RecipeParser to fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"caa16ccd00aca634840787e86e80704805468285","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"75ddb64e4621b4b7d81ba5b9d4608172ca916c13","isMergeCommit":false,"messageTitle":"Make test more realistic and readable","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":1}}},{"hash":"5edd5795c389b9d6e746797a3e2a59879bad5462","isMergeCommit":false,"messageTitle":"Make code more defensive and increase SRP of UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":3}}},{"hash":"cb0405d82bf5ed86c7bac3f150dd83e2fa72cd97","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"a26a138e088ad8c12e5f6710a974539f0513e8af","isMergeCommit":true,"messageTitle":"Merge pull request #46 from kaijie0102/master","messageBody":"Make code more defensive and increase SRP of UI","fileTypesAndContributionMap":{}},{"hash":"69f66bad39932e899e22452a26ea98933ee83290","isMergeCommit":true,"messageTitle":"Merge pull request #44 from StanleyW00/revamp-main","messageBody":"Revamp main","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"94035ee43f93ce3256ad539b09c533ba00b4b94f","isMergeCommit":false,"messageTitle":"Integration of general to ingredient parsers and tracking quantity of ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":48},"other":{"insertions":1,"deletions":1},"test-code":{"insertions":1,"deletions":2}}},{"hash":"a2ce8094d67c5545ead4326c3f4b12b0d56e445f","isMergeCommit":false,"messageTitle":"Fix Junit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0},"test-code":{"insertions":4,"deletions":10}}},{"hash":"2437c60cd3aea233234d7309bdc98b0475c7bfc2","isMergeCommit":false,"messageTitle":"Edit ingredient functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":113,"deletions":7},"test-code":{"insertions":2,"deletions":2}}},{"hash":"8ca1bbe8f763d951b0ffe156460550ba17a36b67","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-26","commitResults":[{"hash":"6a05f8e3eb202a026fc6f5a0cd1ee80042ee8fa5","isMergeCommit":false,"messageTitle":"Improve ingredient functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":40}}},{"hash":"bc0f81ac42b40c9f8056607cf5ab85912fda920e","isMergeCommit":true,"messageTitle":"Merge pull request #60 from kaijie0102/branch-edit-ingredient","messageBody":"Edit ingredient objects","fileTypesAndContributionMap":{}},{"hash":"ceacd10e114138782c64a4b1602e66429b4a0e0b","isMergeCommit":true,"messageTitle":"Merge pull request #66 from charkty/documentation/developerGuide","messageBody":"Add features for user guide and help function for developer guide","fileTypesAndContributionMap":{}},{"hash":"e96abe8b5df2966f02e294393fe55f9d2bdb8858","isMergeCommit":false,"messageTitle":"Junit tests and exceptions for editing ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3},"other":{"insertions":1,"deletions":3},"test-code":{"insertions":73,"deletions":0}}},{"hash":"3a3043a328c6fafef882b910ac114939a88658ba","isMergeCommit":false,"messageTitle":"Add test edit multiple fields","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":27,"deletions":9}}},{"hash":"1d10e8b712de2919378468172ae6cb9052329081","isMergeCommit":false,"messageTitle":"Junit test to add multiple ingredients in one line","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":61,"deletions":1}}},{"hash":"7a507fba6261a5477c478847986f54b2a5157c36","isMergeCommit":true,"messageTitle":"Merge pull request #67 from kaijie0102/branch-edit-ingredient","messageBody":"Junit tests and exceptions for editing ingredients","fileTypesAndContributionMap":{}},{"hash":"7e8eb77965f25a706b0d94cccd877d1b5985721a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-ingredient-qty-unit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"068dd7ad843060a670a7c1eb6ecece07273e5edc","isMergeCommit":false,"messageTitle":"Simplify sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":9}}},{"hash":"fd7246a8165e8eb02bbd2ca88abffa61464ac43a","isMergeCommit":false,"messageTitle":"Update developer guide including a sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":118,"deletions":17}}},{"hash":"e9f666d5bdb3ef55b7819fbcf55d9aacb2c5492c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"460eee6ce4ec2e0a87e87301f8f66a6aff8921a6","isMergeCommit":false,"messageTitle":"Revert \"Update developer guide including a sequence diagram\"","messageBody":"This reverts commit fd7246a8165e8eb02bbd2ca88abffa61464ac43a.\n","fileTypesAndContributionMap":{"docs":{"insertions":17,"deletions":118}}},{"hash":"a39f31e112b69867ac5c07b0cb6afdcdd0502ab1","isMergeCommit":true,"messageTitle":"Merge pull request #73 from Haoyuli2002/AddNewIngredientSequenceDiagram","messageBody":"Add new ingredient sequence diagram and modified other changes","fileTypesAndContributionMap":{}},{"hash":"f96f1d538fe59022ab0d8b12b2efbd89fd0f1f38","isMergeCommit":true,"messageTitle":"Merge pull request #74 from charkty/feature/deleteIngredient","messageBody":"Add feature for deleting ingredient and recipe","fileTypesAndContributionMap":{}},{"hash":"774d5c426cefdcfcb7ba3d1e83bdecadb41ba589","isMergeCommit":false,"messageTitle":"Add sequence diagram for viewing all ingredients","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":51,"deletions":0}}},{"hash":"c963317a51065308b9b4d4e9cf1aa63571d23e6c","isMergeCommit":false,"messageTitle":"Add implementation of view all ingredients","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":23,"deletions":0}}},{"hash":"4779abfada4b4a57112948008faeabfd4b15b1af","isMergeCommit":false,"messageTitle":"Improve sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":18,"deletions":6}}},{"hash":"9518ae4337ba3045e2116aa47b8e9de825fbce8c","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2cab44b4c2d9ef2ebbc7763608710427e641752b","isMergeCommit":false,"messageTitle":"Omit trivial details","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":4}}},{"hash":"c9bb1b9e1d78569238d9cf686bcbdb08ba03c09c","isMergeCommit":false,"messageTitle":"Add sequence diagram for viewing all recipes and updating DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":72,"deletions":1}}},{"hash":"4cdad2e9030c3fb3910c9bf576567c79ac407471","isMergeCommit":false,"messageTitle":"Improve View Ingredient documentation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":2}}},{"hash":"cad653a453f43f732cf61debbec231147dc6debe","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"55f431013aeb5592a772128d46120ccbb18b5c1f","isMergeCommit":true,"messageTitle":"Merge pull request #78 from charkty/documentation/developerGuide","messageBody":"Exit and Help function in DG","fileTypesAndContributionMap":{}},{"hash":"54c50a5ffa7c5d6f9c81d5fe4ce9968cfa9ca5b1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"adcae8a4f5f77a3e8cfc1371d87ffcc317de5a12","isMergeCommit":true,"messageTitle":"Merge pull request #87 from StanleyW00/assert-add-recipe","messageBody":"Add assert for add recipe","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"44f4cce9f0a3c2ba9aedb40c97ecf2f7f0a190e8","isMergeCommit":true,"messageTitle":"Merge pull request #80 from charkty/feature/delete","messageBody":"Add JU test for DeleteRecipeCommand and DeleteIngredientCommand","fileTypesAndContributionMap":{}},{"hash":"0606776ac4d2f9b6c5ff94125b62b8132c574abc","isMergeCommit":true,"messageTitle":"Merge pull request #91 from StanleyW00/assert-edit-ingredient","messageBody":"Add assertion to edit ingredient command","fileTypesAndContributionMap":{}},{"hash":"4cf66469c20b3aaf2cfcf3ce25d68519e40289a9","isMergeCommit":false,"messageTitle":"View specific recipe and edit recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":203,"deletions":43},"test-code":{"insertions":11,"deletions":10}}},{"hash":"f2706de9941171651928a87411504661f9d3c91b","isMergeCommit":true,"messageTitle":"Fix merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ad0906d46a8bf51ca80091e31b8e451a01cf8070","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}},{"hash":"e58e1a9d95dd5a58f2ede8f3017392d0dc174077","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"bbc395ace8a231e79bb519607d682f1e424f343c","isMergeCommit":false,"messageTitle":"Junit test for editing recipe name and steps","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"other":{"insertions":3,"deletions":5},"test-code":{"insertions":63,"deletions":2}}},{"hash":"7e324ac97dbc9d1823cb74055c3efe86dce4dbe8","isMergeCommit":false,"messageTitle":"Add edit recipe tests and assertions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3},"test-code":{"insertions":11,"deletions":3}}}]},{"date":"2023-10-29","commitResults":[{"hash":"b8c090021ac75b94e1bba0dfe38c88e7626d900d","isMergeCommit":true,"messageTitle":"Merge pull request #92 from kaijie0102/branch-edit-recipe","messageBody":"Edit recipe","fileTypesAndContributionMap":{}}]}],"Haoyuli2002":[{"date":"2023-10-14","commitResults":[{"hash":"533cbebde967558dc1f78c67408189b08951af45","isMergeCommit":false,"messageTitle":"First Increment by Recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":2}}},{"hash":"b6ee03e3c0e9b49dc6e6833650a230efa0d41273","isMergeCommit":false,"messageTitle":"First Increment by Recipe(modified","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7}}}]},{"date":"2023-10-16","commitResults":[{"hash":"6eed0ddb76ed9d56e4df3b2d6cf89ad5df5e4a4d","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"a2d197b2fe9eb0b3b12711e1bafa128ca5c57e8e","isMergeCommit":false,"messageTitle":"First Increment by Recipe(modified","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"db489f25f2a65900e189ec541d350ab5e5155783","isMergeCommit":false,"messageTitle":"Modified Increment by RecipeList( viewAllRecipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"9d3dc82819f8791241668a56e554763f787de6e2","isMergeCommit":false,"messageTitle":"Change the name of viewAllRecipes to listRecipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e9d7d94d2eebbe8f8765c8fe757de5aafbb13cb4","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into RecipeStepBranch","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"868d4e3da30a8294519ceb9bf534f6e0ec50df41","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into RecipeStepBranch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e3d71f57d49b00ccfbed0a923f38e29bc0cc4476","isMergeCommit":true,"messageTitle":"resolve naming Conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"28b7d1360b6f549c75396ba48720d5b5cae8c531","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/RecipeStepBranch\u0027 into RecipeStepBranch","messageBody":"# Conflicts:\n#\tsrc/main/java/essenmakanan/recipe/RecipeList.java\n","fileTypesAndContributionMap":{}},{"hash":"b7afbb13e68f443d2f2d29b5a8deba6c06548979","isMergeCommit":false,"messageTitle":"resolve naming Conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":14}}},{"hash":"805d85a6a44b629562868b9f67e287ab20bd07ec","isMergeCommit":false,"messageTitle":"add assertion to the method getRecipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"1269136ca5921cbb5e1c20a092ad44b4c3e2a823","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into get-specific-recipe-branch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8bf08c1eda79b465ea4f7cee39315369cb60ad14","isMergeCommit":true,"messageTitle":"Merge pull request #35 from Haoyuli2002/get-specific-recipe-branch","messageBody":"Assertions in the method getRecipe, merge the conflict","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"7a2487684b5f4d40f384838b90d377b3d6e72f00","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":11}}},{"hash":"c4d994477ba071a7db9db6905b6c9986efa5b178","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":4}}},{"hash":"e5db90bdb0ded64e8af8082bff32654c842ac95d","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":33},"test-code":{"insertions":35,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"ce37a2fa244a8a7d3553257b00daaddd000e31ba","isMergeCommit":false,"messageTitle":"View Specific Recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":0}}},{"hash":"882f088a28caeca9ed673b7a34ef6d7be24353b5","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp into ViewSpecificRecipe","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4cdc3f3334235e47abb9cd01ed97aecfa51faea1","isMergeCommit":false,"messageTitle":"View Specific Recipe(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3}}},{"hash":"682761263dd78bb3f55c650e9dd06e10432868f8","isMergeCommit":false,"messageTitle":"DG(Add_Ingredient Sequence Diagram)","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":83,"deletions":0}}},{"hash":"a8f627360dd32815f2645c113d9a9e282483571c","isMergeCommit":true,"messageTitle":"Merge pull request #63 from Haoyuli2002/version2","messageBody":"AddingStepsAsFasterTypers","fileTypesAndContributionMap":{}},{"hash":"511faccdb60dcf4009cd0f57ec4c2373cc78c5bf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into AddNewIngredientSequenceDiagram","messageBody":"","fileTypesAndContributionMap":{}}]}],"StanleyW00":[{"date":"2023-10-11","commitResults":[{"hash":"4447268e6ccb1338f632b53165b4bb21c99fdd58","isMergeCommit":true,"messageTitle":"Merge pull request #1 from StanleyW00/master","messageBody":"Add config.yml","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"8b3c2439f5d1cf825828243014eb49c950d2c752","isMergeCommit":true,"messageTitle":"Merge pull request #13 from Haoyuli2002/RecipeStepBranch","messageBody":"Recipe step branch","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"6035944c21b046f8cd088fff639b3323a0d74cfb","isMergeCommit":false,"messageTitle":"Add create recipe feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":64,"deletions":13}}},{"hash":"0c64219809d5cb7b43af8066da20547702877eea","isMergeCommit":false,"messageTitle":"Add testing for adding recipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":0},"test-code":{"insertions":35,"deletions":0}}},{"hash":"20b6f77610183ea67e3604b052000c190bb0414e","isMergeCommit":false,"messageTitle":"Add system exit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-16","commitResults":[{"hash":"da5360045784c465988318559c89d321b52db980","isMergeCommit":true,"messageTitle":"Merge pull request #14 from StanleyW00/addRecipes","messageBody":"Add creating recipes","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7959531690b3e7ddc94364fe4069b6e409951068","isMergeCommit":true,"messageTitle":"Merge pull request #24 from kaijie0102/master","messageBody":"Create ui class to handle user interaction","fileTypesAndContributionMap":{}},{"hash":"b405e606c842c9f4b92dcb0bb803f45779eb2958","isMergeCommit":true,"messageTitle":"Merge pull request #27 from kaijie0102/master","messageBody":"Fix minor bug","fileTypesAndContributionMap":{}},{"hash":"8eb5ee1e1256bd6dd9bae39af2aa2eb5e7cdb2d4","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"e1950bf2749c44d2852c5fc3d189ed4618cfa9cb","isMergeCommit":false,"messageTitle":"Standerdise recipe related methods","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4}}},{"hash":"b7c148fca9ffde787c876a6b61b63367f4e03a65","isMergeCommit":false,"messageTitle":"Add get specific recipe method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"f469c2de2df52ed8b537ac0e9224939feedcf3b0","isMergeCommit":false,"messageTitle":"Modify add recipe test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":12,"deletions":13}}},{"hash":"f1326a5314e2209d0ace69c424ea49ff7b05d5c6","isMergeCommit":false,"messageTitle":"Delete whitespace","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"32eac014ebdfa5d74c95888e1f615aac4bb39dcb","isMergeCommit":false,"messageTitle":"Rename add recipe test method","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"6d90533ce88e5f6d8192158159232cc52b5e19f2","isMergeCommit":false,"messageTitle":"Add assertions to RecipeList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":9}}},{"hash":"43d05f869b2577aa17c35e23966d728015a4a1b5","isMergeCommit":false,"messageTitle":"Edit text ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"5534fe721164591172c0fa0dce02704a49113be2","isMergeCommit":false,"messageTitle":"Fix bug related to ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"6783f26062c4cc6302aecc2aa19b9edfa7b8d078","isMergeCommit":false,"messageTitle":"Create add recipe command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":5}}},{"hash":"a1f5fa5023d530ae517d097329282f18fbe9b153","isMergeCommit":false,"messageTitle":"Create add ingredient command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"b3fdb4626da86913fea35d5b5f5c183bf164dc9f","isMergeCommit":false,"messageTitle":"Modify main function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":19}}},{"hash":"c8ed1dd8157c61235f14e682376c8b8180b4e918","isMergeCommit":false,"messageTitle":"Fix some style errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}}]},{"date":"2023-10-19","commitResults":[{"hash":"f0afcf37a3cbdc09d3a4655c92cd2dd39abad24f","isMergeCommit":false,"messageTitle":"Modify command classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":47}}},{"hash":"d982bca0df68a7dba2767e94e51a701a3c42e5fa","isMergeCommit":false,"messageTitle":"Add view recipes and ingredients class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":15}}},{"hash":"e2bbcb06de5faee78a55a181a18b61c5cfceff53","isMergeCommit":false,"messageTitle":"Modify ingredient list test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":1}}},{"hash":"489c6901eb18e5e5ec5a1eec8ef1fd567ca55305","isMergeCommit":false,"messageTitle":"Remame print recipes method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":3}}},{"hash":"94629b58743f88735a57da32299da95c2e3412a7","isMergeCommit":true,"messageTitle":"Merge pull request #34 from StanleyW00/17-add-Command","messageBody":"Add command classes","fileTypesAndContributionMap":{}},{"hash":"467e71ae6979505fc6e44a951f3d88e2fe616c9d","isMergeCommit":false,"messageTitle":"Modify the flow of main class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":92,"deletions":93}}},{"hash":"b34a3ba4e0082f8351c230d202aa8a7949a86c11","isMergeCommit":false,"messageTitle":"Create exit command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":3}}},{"hash":"e9c7037ac8588d82df8817e5d973af90a35c81a8","isMergeCommit":false,"messageTitle":"Add help command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":6}}},{"hash":"dc51db2062b67b71277e6434a373e8400b17aefc","isMergeCommit":false,"messageTitle":"Add format exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":3}}},{"hash":"476857f5b3edccf28a664678e369c8da45ce587c","isMergeCommit":false,"messageTitle":"Fix exception bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"f9f4ac53caea4bc335f07bcba34023ac4665163a","isMergeCommit":false,"messageTitle":"Fix style error in parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":1}}},{"hash":"a29fed49e4a1ff83c871627578fa971fdca44d55","isMergeCommit":false,"messageTitle":"Add logs in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":0}}},{"hash":"8694442c12f02d05c307ad928c9d18eab61a8c3a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp into revamp-main","messageBody":"# Conflicts:\n#\tsrc/main/java/essenmakanan/EssenMakanan.java\n#\tsrc/main/java/essenmakanan/command/ViewIngredientsCommand.java\n#\tsrc/main/java/essenmakanan/command/ViewRecipesCommand.java\n#\tsrc/main/java/essenmakanan/ui/Ui.java\n","fileTypesAndContributionMap":{}},{"hash":"ddb8ed79228787717d3717a27c8c7d2856a9c463","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":4}}},{"hash":"49886a9af346d347beb591f9d141d7ddec4b2e2e","isMergeCommit":false,"messageTitle":"Disable log","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"f2b66ff03c70e87e285dd6e36136af284177fc18","isMergeCommit":false,"messageTitle":"Fix checkstyle issue in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-20","commitResults":[{"hash":"d37387f4af5bf7381b8632d26ae0efcd4df85658","isMergeCommit":false,"messageTitle":"Change the way to check exit command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":24}}},{"hash":"34d5a1a7d84ef36ed9962c923d7a50cb561045df","isMergeCommit":false,"messageTitle":"Modify execute command classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":30}}}]},{"date":"2023-10-21","commitResults":[{"hash":"81d3738bff91e93398d9056fa244cb1ed7aae8b7","isMergeCommit":false,"messageTitle":"Move parser specific methods to their own classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":11}}}]},{"date":"2023-10-24","commitResults":[{"hash":"94cada6dda2861b0c319c1effd9a5d6593369052","isMergeCommit":true,"messageTitle":"Merge pull request #53 from charkty/documentation/developerGuide","messageBody":"Add template for Developer and User Guide","fileTypesAndContributionMap":{}},{"hash":"0bbf94674e19f6a4ebd80fd6b01cf4e901ed61ec","isMergeCommit":false,"messageTitle":"Modify and add new styles","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":14,"deletions":2}}},{"hash":"48d451c5ba280939efe8652a24521e1e6ed1682d","isMergeCommit":false,"messageTitle":"Create sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"2d6a4537881e071fdb6420d300a07edb0600fbe6","isMergeCommit":false,"messageTitle":"Update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":1}}},{"hash":"0ac6f0d05422dc59f40d49ba89545ec322f7f539","isMergeCommit":false,"messageTitle":"Change diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-27","commitResults":[{"hash":"899594b944fd0038b62e06e42a32ffc9b4d4a2da","isMergeCommit":false,"messageTitle":"Improve readibility for ingredient","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"71520876d450c54d8b01d1f08c050edfebfcd16d","isMergeCommit":false,"messageTitle":"Update user guide related to ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"docs":{"insertions":43,"deletions":12}}},{"hash":"d89ddc269fecbfe5bd2931a7e9c428e7bede8f65","isMergeCommit":false,"messageTitle":"Add assert for add recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"937a4b778a71d877de13fa303ad0788a8a3bbd63","isMergeCommit":false,"messageTitle":"Change layout","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"de236dc74f163fa785877243589856c55401c402","isMergeCommit":false,"messageTitle":"Rename README.md to index.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":0}}},{"hash":"368e1955f646818ad118b1bc0bb6cdfb67222e08","isMergeCommit":false,"messageTitle":"Change layout to default","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"4409f78f14c470c7f6ed8d0f92e0d2a62b28e130","isMergeCommit":false,"messageTitle":"Add assert in adding recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"96f06972f875cf2afdbc1a41ac420e002ff55541","isMergeCommit":true,"messageTitle":"Merge pull request #90 from StanleyW00/assert-add-recipe","messageBody":"Add assert in adding recipe","fileTypesAndContributionMap":{}},{"hash":"8002891ad48a8876ba16db1c8fa8a4eb3e64bea7","isMergeCommit":false,"messageTitle":"Add assertion to edit ingredient command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}}]}],"charkty":[{"date":"2023-09-29","commitResults":[{"hash":"cc8c5bbae9ff17889a536d59a1fe4dc527a67271","isMergeCommit":false,"messageTitle":"Inital Commit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":0},"other":{"insertions":2,"deletions":5}}},{"hash":"dd6b60ad98d01c3e27a8a136d064cab3c7a2f223","isMergeCommit":false,"messageTitle":"Rename main class","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"6e53e38d3d90145bb549a942ff3ddcbaf0b00f26","isMergeCommit":false,"messageTitle":"Change directory in build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"cc19609329761b12f39ea60a3852c6d2383a28ed","isMergeCommit":true,"messageTitle":"Merge pull request #1 from charkty/master","messageBody":"Inital Commit","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"9ee9475bcea3849656b21a218ce39af821019a92","isMergeCommit":false,"messageTitle":"Add Ingredient and IngredientList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":0}}},{"hash":"e62273d8150c1d3fd87c76a033f26ba44238f9d7","isMergeCommit":false,"messageTitle":"Simplify listIngredient\u0027s for loop","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":4}}},{"hash":"60d2a78737c00ba51fa302016588b02ed1801610","isMergeCommit":false,"messageTitle":"Change \u0027qty\u0027 naming and addIngredient() function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"06a8fc3adcbd4ecdb262d813b07285b18d470a95","isMergeCommit":false,"messageTitle":"Add exception and IngredientListTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0},"test-code":{"insertions":31,"deletions":0}}},{"hash":"3aa7bf85c7604d1b0927edad2f87672f09c841f7","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"test-code":{"insertions":0,"deletions":3}}},{"hash":"25c4d225243f0b7571e39e74aeefdf87fdce6bc3","isMergeCommit":false,"messageTitle":"Change import to correct format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-18","commitResults":[{"hash":"ddfb2b196a0f5380863af3f10f9a689d30e96d93","isMergeCommit":true,"messageTitle":"Merge pull request #31 from StanleyW00/refactorAddRecipes","messageBody":"Refactor add recipes","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"e7832c36ff1c6607371a6d41b1200997bfcb3854","isMergeCommit":true,"messageTitle":"Merge pull request #33 from kaijie0102/master","messageBody":"Fix bugs and merge conflicts","fileTypesAndContributionMap":{}},{"hash":"57096d1886b6e74cde0786059ef4ef25b03fd0d9","isMergeCommit":false,"messageTitle":"Add ingredient parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":46},"other":{"insertions":6,"deletions":9},"test-code":{"insertions":29,"deletions":2}}},{"hash":"af8dbd445b5bda4920c82164f168434903354368","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"feb3b6b8dad2cd21dfe94cf79972429da0428065","isMergeCommit":false,"messageTitle":"Resolve checkstyle problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":6}}},{"hash":"754f337d20268d2b308c99f77c8cc954c7c755a0","isMergeCommit":true,"messageTitle":"Merge pull request #42 from charkty/parser/Ingredient","messageBody":"Add ingredient parser and edit Ui","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"934e0093cb12c72ed4f0abf069808da5067d9c56","isMergeCommit":true,"messageTitle":"Merge pull request #51 from StanleyW00/modify-logic-command","messageBody":"[Enhancement] Modify logic command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"9eda75c9cc09a7191362d46958b0e8fdf337df70","isMergeCommit":false,"messageTitle":"Add template for Developer and User Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":201,"deletions":12}}},{"hash":"0575003df7a547e9d30f1b6bd28ae33010d0c49c","isMergeCommit":true,"messageTitle":"Merge pull request #52 from StanleyW00/refactor-parser","messageBody":"Refactor parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"1a83a29c35a2908d5d0e3fd93c8dfcd3ae13471b","isMergeCommit":true,"messageTitle":"Merge pull request #59 from kaijie0102/master","messageBody":"Parser integration and enhancement of Ingredient class","fileTypesAndContributionMap":{}},{"hash":"f5866525c5ca4365951cdd89e71e9c15d3950432","isMergeCommit":false,"messageTitle":"Update features for user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":74,"deletions":3}}}]},{"date":"2023-10-26","commitResults":[{"hash":"21f2f24a20d8e185260f18739bc298516fd64b12","isMergeCommit":false,"messageTitle":"Create sequence diagram for help function","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":43,"deletions":0}}},{"hash":"68e79d8aaef5b66167526bf612879c8b4e7ddc70","isMergeCommit":false,"messageTitle":"Reformat","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":6}}},{"hash":"9e34856934552e225df6b8c96ad062d015c914ef","isMergeCommit":true,"messageTitle":"Merge pull request #64 from StanleyW00/add-new-recipe-diagram","messageBody":"Add new recipe diagram","fileTypesAndContributionMap":{}},{"hash":"65bf693b5b916e63b184ffd9302a2683e1b20928","isMergeCommit":false,"messageTitle":"Add showCommands() to sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"cf9a6619ca7afd707f5cf28f4bfe1a3082550f8f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into documentation/developerGuide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"034c51e5b6852c41948861da715aaa064fa49f78","isMergeCommit":false,"messageTitle":"Create developer guide\u0027s help feature implementation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":7}}},{"hash":"c21aa1564aef1125063a3320fcb3a52f12342d85","isMergeCommit":false,"messageTitle":"Add Delete command in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":2}}},{"hash":"aff6c22bbae4029740f693e6c50bcbec03923f09","isMergeCommit":true,"messageTitle":"Solve merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b6436b9f03fec96ec7c9259361bb694edd498aad","isMergeCommit":false,"messageTitle":"Create delete ingredient function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":106,"deletions":25},"test-code":{"insertions":2,"deletions":2}}},{"hash":"4de8da08513a047f4762b0ee493a99e489091ca3","isMergeCommit":false,"messageTitle":"Handle exceptions for delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":55,"deletions":11}}},{"hash":"856a27fb0cfc917708e3701d659a41c2ace94622","isMergeCommit":false,"messageTitle":"Solve issues in delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":50,"deletions":40},"test-code":{"insertions":133,"deletions":0}}},{"hash":"f3d8ca29c8e5a7f88e3169d024043545c633632f","isMergeCommit":false,"messageTitle":"Clean up delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3},"test-code":{"insertions":0,"deletions":133}}},{"hash":"e7ce1eed6ccd66d9e17951ba37a3599b9d45a8cb","isMergeCommit":false,"messageTitle":"Add relevant imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":4}}},{"hash":"3f19c22122db10d4d155e722a6f469f5c510f2c7","isMergeCommit":false,"messageTitle":"Correct checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"0c4ecb8292c37c0551281a6a812dab75ad6d0207","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into feature/deleteIngredient","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3d10cafeea3ec35ff2b1d074822f196ae91a4428","isMergeCommit":false,"messageTitle":"Change checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":5}}},{"hash":"bbfd1d36d9e0a40a3002304d9c381f96f9da804b","isMergeCommit":false,"messageTitle":"Add delete command to start message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":12}}},{"hash":"d2704f80e2a20a8035dafb3c1fe641748a5612e6","isMergeCommit":false,"messageTitle":"Rectify long sentence","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"1726122f2f2cb3839caf48c407d2308ec539bc00","isMergeCommit":true,"messageTitle":"Merge pull request #68 from kaijie0102/branch-ingredient-qty-unit","messageBody":"Junit test to add multiple ingredients in one line","fileTypesAndContributionMap":{}},{"hash":"065b6372cc43931899da1f312369130313c21e22","isMergeCommit":false,"messageTitle":"Tidy showCommands() in Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":14}}},{"hash":"dc706dd319c03cb51b0343244e76552fa3b6dee8","isMergeCommit":false,"messageTitle":"Standardise everything to index","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":31}}},{"hash":"6c8ae679dc55ad19b0738416da300b09d0987f68","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0dedaf9ea6c7781cb66e89696e5f4a1a3e2981c1","isMergeCommit":true,"messageTitle":"Merge pull request #76 from kaijie0102/master","messageBody":"Update developer guide for viewing ingredients","fileTypesAndContributionMap":{}},{"hash":"a8908ee81fd9023042048bd8fc4e084379345bbb","isMergeCommit":false,"messageTitle":"Create exit sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":0}}},{"hash":"957260f4262da7513f655e8ac7587c65bd7b8529","isMergeCommit":false,"messageTitle":"Add steps for help feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":2}}},{"hash":"1763b6788b0ea138d9a178dfd7def1ec8bb366a6","isMergeCommit":false,"messageTitle":"Add steps for exit command","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"03ae637bf4eba4c7ed3f500547ca3cfa5f88cf37","isMergeCommit":true,"messageTitle":"Merge pull request #77 from kaijie0102/master","messageBody":"Add sequence diagram for viewing all recipes and updating DG","fileTypesAndContributionMap":{}},{"hash":"d5f9312405b523e3e00a0f16cf247b11e4175bc9","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"74a474c6cf47c27fdbf1464e7d98e3200c8e9a02","isMergeCommit":true,"messageTitle":"Merge pull request #79 from kaijie0102/master","messageBody":"Improve view ingredients documentation","fileTypesAndContributionMap":{}},{"hash":"01589367b8bb1113cf91a8e40ca5ef0bf2ec534a","isMergeCommit":false,"messageTitle":"Add assertion and remove exception from RecipeList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":8}}},{"hash":"feb16d869bbfe387268f35b7eeeda42e9c59a29b","isMergeCommit":false,"messageTitle":"Shorten names of exception classes","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"8f5b7d64145348c06ca3194476e574047e457e7b","isMergeCommit":false,"messageTitle":"Refactor exception classes in other classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":57,"deletions":57},"test-code":{"insertions":72,"deletions":10}}},{"hash":"63b1adeda242eb21b19e205228401e18b8ca7f65","isMergeCommit":false,"messageTitle":"Add JU test for delete ingredient command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":24,"deletions":10}}},{"hash":"60e7f9f00528effbe2697855eaea0b57af143f77","isMergeCommit":false,"messageTitle":"Add JU Test for IngredientParser and remove unused exception in delete function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":12},"test-code":{"insertions":36,"deletions":5}}},{"hash":"e4eb6638051b73103aaa4b4e4ffb5f70b0c35961","isMergeCommit":false,"messageTitle":"Add JU test for Delete Recipe Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"test-code":{"insertions":75,"deletions":0}}},{"hash":"7ac1c9f5cbd06e7bfd80a4ac02f08d6279f78d8c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into feature/delete","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"746d9b6022f007c11cb48cc35af633109e40aeff","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"test-code":{"insertions":1,"deletions":5}}},{"hash":"0e122d5253e5901139feb79b7d61c38786ccb88e","isMergeCommit":true,"messageTitle":"Merge pull request #83 from StanleyW00/second-half-ug","messageBody":"Update ingredient UG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"44950b10aa5f5b8412b618f68539bc446bb186bc","isMergeCommit":true,"messageTitle":"Merge pull request #89 from StanleyW00/bug-theme-pages","messageBody":"Fix pages bug","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"kaijie0102":{"docs":192,"functional-code":518,"test-code":258},"Haoyuli2002":{"docs":82,"functional-code":88,"test-code":30},"StanleyW00":{"docs":122,"functional-code":297,"test-code":21,"other":1},"charkty":{"docs":377,"functional-code":361,"test-code":244,"other":2}},"authorContributionVariance":{"kaijie0102":21314.037,"Haoyuli2002":1135.3525,"StanleyW00":7539.0454,"charkty":27227.66},"authorDisplayNameMap":{"kaijie0102":"CS2113-F11-2 LEOW.. JIE","Haoyuli2002":"CS2113-F11-2 LI H..AOYU","StanleyW00":"CS2113-F11-2 STAN..JAYA","charkty":"CS2113-F11-2 CHAR..G YU"}} +{"authorDailyContributionsMap":{"kaijie0102":[{"date":"2023-10-17","commitResults":[{"hash":"1801a4716290f9e5bca33037ef07a1a3cf499655","isMergeCommit":true,"messageTitle":"Merge pull request #18 from Haoyuli2002/RecipeStepBranch","messageBody":"Recipe step branch","fileTypesAndContributionMap":{}},{"hash":"5a3d7f322e8b5bbbcf1be7d1f0f10d968e67954e","isMergeCommit":true,"messageTitle":"Merge pull request #19 from charkty/feature/addIngredient","messageBody":"Add Ingredient and IngredientList class","fileTypesAndContributionMap":{}},{"hash":"872e6fd20ad09bd7823e87bcb5de1906339a9d51","isMergeCommit":true,"messageTitle":"Merge pull request #21 from charkty/feature/addIngredient","messageBody":"Add exception and IngredientListTest","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"958010ae127af64874f2d5da5852dc1a87c93e9b","isMergeCommit":false,"messageTitle":"Create ui class to enable user interaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":131,"deletions":17}}},{"hash":"d828b715dd9e52b1365b19547f381ced4a208c8c","isMergeCommit":false,"messageTitle":"Small bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2b3c01d0a09d35ce6551f7c7a60aeee809b0f008","isMergeCommit":false,"messageTitle":"Fix minor bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"308bc065f802679c73cbe0261befae64628d2e33","isMergeCommit":false,"messageTitle":"Standardise method naming, parameters and behaviours","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":18}}},{"hash":"fcb0b569414b36c476e00058a077c0ff47ffe159","isMergeCommit":false,"messageTitle":"Fix GitHub CI checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"85ba159f3990a6f1b91390c94740c9ff4430e848","isMergeCommit":false,"messageTitle":"Fix missing input bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"4368146baf4ceedaf3f24b5fd914e1b48e81fafc","isMergeCommit":false,"messageTitle":"Attempt to fix input bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":2}}},{"hash":"c5625386eb421d90cb4b1158c67166eae82d5657","isMergeCommit":false,"messageTitle":"Attempt to fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"1dff123f5521cb2e34b51bdc27ab0235e4927144","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bb822b9e0f6598a03169088cf0901625813c9e6b","isMergeCommit":false,"messageTitle":"Enhance test case","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":0}}}]},{"date":"2023-10-19","commitResults":[{"hash":"dd8a95e34f726ec05ae6c7762cd7d0dac3e7d1bd","isMergeCommit":false,"messageTitle":"Add RecipeParser to partse details related to recipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":35,"deletions":28},"test-code":{"insertions":31,"deletions":0}}},{"hash":"ef7a08cf0dca373d82aa22cef9d174a86e8875c3","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"37cc4905bd1a76fed4c8be95eeafcf70ae0b292c","isMergeCommit":false,"messageTitle":"Add exception class for our program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1}}},{"hash":"a9f9a12bf02a0da03ecf1b66f6060102ae617235","isMergeCommit":false,"messageTitle":"Update RecipeParser to fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"caa16ccd00aca634840787e86e80704805468285","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"75ddb64e4621b4b7d81ba5b9d4608172ca916c13","isMergeCommit":false,"messageTitle":"Make test more realistic and readable","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":1}}},{"hash":"5edd5795c389b9d6e746797a3e2a59879bad5462","isMergeCommit":false,"messageTitle":"Make code more defensive and increase SRP of UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":3}}},{"hash":"cb0405d82bf5ed86c7bac3f150dd83e2fa72cd97","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"a26a138e088ad8c12e5f6710a974539f0513e8af","isMergeCommit":true,"messageTitle":"Merge pull request #46 from kaijie0102/master","messageBody":"Make code more defensive and increase SRP of UI","fileTypesAndContributionMap":{}},{"hash":"69f66bad39932e899e22452a26ea98933ee83290","isMergeCommit":true,"messageTitle":"Merge pull request #44 from StanleyW00/revamp-main","messageBody":"Revamp main","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"94035ee43f93ce3256ad539b09c533ba00b4b94f","isMergeCommit":false,"messageTitle":"Integration of general to ingredient parsers and tracking quantity of ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":48},"other":{"insertions":1,"deletions":1},"test-code":{"insertions":1,"deletions":2}}},{"hash":"a2ce8094d67c5545ead4326c3f4b12b0d56e445f","isMergeCommit":false,"messageTitle":"Fix Junit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0},"test-code":{"insertions":4,"deletions":10}}},{"hash":"2437c60cd3aea233234d7309bdc98b0475c7bfc2","isMergeCommit":false,"messageTitle":"Edit ingredient functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":113,"deletions":7},"test-code":{"insertions":2,"deletions":2}}},{"hash":"8ca1bbe8f763d951b0ffe156460550ba17a36b67","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-26","commitResults":[{"hash":"6a05f8e3eb202a026fc6f5a0cd1ee80042ee8fa5","isMergeCommit":false,"messageTitle":"Improve ingredient functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":40}}},{"hash":"bc0f81ac42b40c9f8056607cf5ab85912fda920e","isMergeCommit":true,"messageTitle":"Merge pull request #60 from kaijie0102/branch-edit-ingredient","messageBody":"Edit ingredient objects","fileTypesAndContributionMap":{}},{"hash":"ceacd10e114138782c64a4b1602e66429b4a0e0b","isMergeCommit":true,"messageTitle":"Merge pull request #66 from charkty/documentation/developerGuide","messageBody":"Add features for user guide and help function for developer guide","fileTypesAndContributionMap":{}},{"hash":"e96abe8b5df2966f02e294393fe55f9d2bdb8858","isMergeCommit":false,"messageTitle":"Junit tests and exceptions for editing ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3},"other":{"insertions":1,"deletions":3},"test-code":{"insertions":73,"deletions":0}}},{"hash":"3a3043a328c6fafef882b910ac114939a88658ba","isMergeCommit":false,"messageTitle":"Add test edit multiple fields","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":27,"deletions":9}}},{"hash":"1d10e8b712de2919378468172ae6cb9052329081","isMergeCommit":false,"messageTitle":"Junit test to add multiple ingredients in one line","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":61,"deletions":1}}},{"hash":"7a507fba6261a5477c478847986f54b2a5157c36","isMergeCommit":true,"messageTitle":"Merge pull request #67 from kaijie0102/branch-edit-ingredient","messageBody":"Junit tests and exceptions for editing ingredients","fileTypesAndContributionMap":{}},{"hash":"7e8eb77965f25a706b0d94cccd877d1b5985721a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-ingredient-qty-unit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"068dd7ad843060a670a7c1eb6ecece07273e5edc","isMergeCommit":false,"messageTitle":"Simplify sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":9}}},{"hash":"fd7246a8165e8eb02bbd2ca88abffa61464ac43a","isMergeCommit":false,"messageTitle":"Update developer guide including a sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":118,"deletions":17}}},{"hash":"e9f666d5bdb3ef55b7819fbcf55d9aacb2c5492c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"460eee6ce4ec2e0a87e87301f8f66a6aff8921a6","isMergeCommit":false,"messageTitle":"Revert \"Update developer guide including a sequence diagram\"","messageBody":"This reverts commit fd7246a8165e8eb02bbd2ca88abffa61464ac43a.\n","fileTypesAndContributionMap":{"docs":{"insertions":17,"deletions":118}}},{"hash":"a39f31e112b69867ac5c07b0cb6afdcdd0502ab1","isMergeCommit":true,"messageTitle":"Merge pull request #73 from Haoyuli2002/AddNewIngredientSequenceDiagram","messageBody":"Add new ingredient sequence diagram and modified other changes","fileTypesAndContributionMap":{}},{"hash":"f96f1d538fe59022ab0d8b12b2efbd89fd0f1f38","isMergeCommit":true,"messageTitle":"Merge pull request #74 from charkty/feature/deleteIngredient","messageBody":"Add feature for deleting ingredient and recipe","fileTypesAndContributionMap":{}},{"hash":"774d5c426cefdcfcb7ba3d1e83bdecadb41ba589","isMergeCommit":false,"messageTitle":"Add sequence diagram for viewing all ingredients","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":51,"deletions":0}}},{"hash":"c963317a51065308b9b4d4e9cf1aa63571d23e6c","isMergeCommit":false,"messageTitle":"Add implementation of view all ingredients","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":23,"deletions":0}}},{"hash":"4779abfada4b4a57112948008faeabfd4b15b1af","isMergeCommit":false,"messageTitle":"Improve sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":18,"deletions":6}}},{"hash":"9518ae4337ba3045e2116aa47b8e9de825fbce8c","isMergeCommit":true,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2cab44b4c2d9ef2ebbc7763608710427e641752b","isMergeCommit":false,"messageTitle":"Omit trivial details","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":4}}},{"hash":"c9bb1b9e1d78569238d9cf686bcbdb08ba03c09c","isMergeCommit":false,"messageTitle":"Add sequence diagram for viewing all recipes and updating DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":72,"deletions":1}}},{"hash":"4cdad2e9030c3fb3910c9bf576567c79ac407471","isMergeCommit":false,"messageTitle":"Improve View Ingredient documentation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":2}}},{"hash":"cad653a453f43f732cf61debbec231147dc6debe","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"55f431013aeb5592a772128d46120ccbb18b5c1f","isMergeCommit":true,"messageTitle":"Merge pull request #78 from charkty/documentation/developerGuide","messageBody":"Exit and Help function in DG","fileTypesAndContributionMap":{}},{"hash":"54c50a5ffa7c5d6f9c81d5fe4ce9968cfa9ca5b1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"adcae8a4f5f77a3e8cfc1371d87ffcc317de5a12","isMergeCommit":true,"messageTitle":"Merge pull request #87 from StanleyW00/assert-add-recipe","messageBody":"Add assert for add recipe","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"44f4cce9f0a3c2ba9aedb40c97ecf2f7f0a190e8","isMergeCommit":true,"messageTitle":"Merge pull request #80 from charkty/feature/delete","messageBody":"Add JU test for DeleteRecipeCommand and DeleteIngredientCommand","fileTypesAndContributionMap":{}},{"hash":"0606776ac4d2f9b6c5ff94125b62b8132c574abc","isMergeCommit":true,"messageTitle":"Merge pull request #91 from StanleyW00/assert-edit-ingredient","messageBody":"Add assertion to edit ingredient command","fileTypesAndContributionMap":{}},{"hash":"4cf66469c20b3aaf2cfcf3ce25d68519e40289a9","isMergeCommit":false,"messageTitle":"View specific recipe and edit recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":203,"deletions":43},"test-code":{"insertions":11,"deletions":10}}},{"hash":"f2706de9941171651928a87411504661f9d3c91b","isMergeCommit":true,"messageTitle":"Fix merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ad0906d46a8bf51ca80091e31b8e451a01cf8070","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}},{"hash":"e58e1a9d95dd5a58f2ede8f3017392d0dc174077","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"bbc395ace8a231e79bb519607d682f1e424f343c","isMergeCommit":false,"messageTitle":"Junit test for editing recipe name and steps","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"other":{"insertions":3,"deletions":5},"test-code":{"insertions":63,"deletions":2}}},{"hash":"7e324ac97dbc9d1823cb74055c3efe86dce4dbe8","isMergeCommit":false,"messageTitle":"Add edit recipe tests and assertions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3},"test-code":{"insertions":11,"deletions":3}}}]},{"date":"2023-10-29","commitResults":[{"hash":"b8c090021ac75b94e1bba0dfe38c88e7626d900d","isMergeCommit":true,"messageTitle":"Merge pull request #92 from kaijie0102/branch-edit-recipe","messageBody":"Edit recipe","tags":["v1.5"],"fileTypesAndContributionMap":{}}]}],"Haoyuli2002":[{"date":"2023-10-14","commitResults":[{"hash":"533cbebde967558dc1f78c67408189b08951af45","isMergeCommit":false,"messageTitle":"First Increment by Recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":2}}},{"hash":"b6ee03e3c0e9b49dc6e6833650a230efa0d41273","isMergeCommit":false,"messageTitle":"First Increment by Recipe(modified","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7}}}]},{"date":"2023-10-16","commitResults":[{"hash":"6eed0ddb76ed9d56e4df3b2d6cf89ad5df5e4a4d","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"a2d197b2fe9eb0b3b12711e1bafa128ca5c57e8e","isMergeCommit":false,"messageTitle":"First Increment by Recipe(modified","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"db489f25f2a65900e189ec541d350ab5e5155783","isMergeCommit":false,"messageTitle":"Modified Increment by RecipeList( viewAllRecipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"9d3dc82819f8791241668a56e554763f787de6e2","isMergeCommit":false,"messageTitle":"Change the name of viewAllRecipes to listRecipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e9d7d94d2eebbe8f8765c8fe757de5aafbb13cb4","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into RecipeStepBranch","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"868d4e3da30a8294519ceb9bf534f6e0ec50df41","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into RecipeStepBranch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e3d71f57d49b00ccfbed0a923f38e29bc0cc4476","isMergeCommit":true,"messageTitle":"resolve naming Conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"28b7d1360b6f549c75396ba48720d5b5cae8c531","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/RecipeStepBranch\u0027 into RecipeStepBranch","messageBody":"# Conflicts:\n#\tsrc/main/java/essenmakanan/recipe/RecipeList.java\n","fileTypesAndContributionMap":{}},{"hash":"b7afbb13e68f443d2f2d29b5a8deba6c06548979","isMergeCommit":false,"messageTitle":"resolve naming Conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":14}}},{"hash":"805d85a6a44b629562868b9f67e287ab20bd07ec","isMergeCommit":false,"messageTitle":"add assertion to the method getRecipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"1269136ca5921cbb5e1c20a092ad44b4c3e2a823","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into get-specific-recipe-branch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8bf08c1eda79b465ea4f7cee39315369cb60ad14","isMergeCommit":true,"messageTitle":"Merge pull request #35 from Haoyuli2002/get-specific-recipe-branch","messageBody":"Assertions in the method getRecipe, merge the conflict","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"7a2487684b5f4d40f384838b90d377b3d6e72f00","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":11}}},{"hash":"c4d994477ba071a7db9db6905b6c9986efa5b178","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":4}}},{"hash":"e5db90bdb0ded64e8af8082bff32654c842ac95d","isMergeCommit":false,"messageTitle":"AddingStepsAsFasterTypers(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":33},"test-code":{"insertions":35,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"ce37a2fa244a8a7d3553257b00daaddd000e31ba","isMergeCommit":false,"messageTitle":"View Specific Recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":0}}},{"hash":"882f088a28caeca9ed673b7a34ef6d7be24353b5","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp into ViewSpecificRecipe","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4cdc3f3334235e47abb9cd01ed97aecfa51faea1","isMergeCommit":false,"messageTitle":"View Specific Recipe(Modified)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3}}},{"hash":"682761263dd78bb3f55c650e9dd06e10432868f8","isMergeCommit":false,"messageTitle":"DG(Add_Ingredient Sequence Diagram)","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":83,"deletions":0}}},{"hash":"a8f627360dd32815f2645c113d9a9e282483571c","isMergeCommit":true,"messageTitle":"Merge pull request #63 from Haoyuli2002/version2","messageBody":"AddingStepsAsFasterTypers","fileTypesAndContributionMap":{}},{"hash":"511faccdb60dcf4009cd0f57ec4c2373cc78c5bf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into AddNewIngredientSequenceDiagram","messageBody":"","fileTypesAndContributionMap":{}}]}],"StanleyW00":[{"date":"2023-10-11","commitResults":[{"hash":"4447268e6ccb1338f632b53165b4bb21c99fdd58","isMergeCommit":true,"messageTitle":"Merge pull request #1 from StanleyW00/master","messageBody":"Add config.yml","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"8b3c2439f5d1cf825828243014eb49c950d2c752","isMergeCommit":true,"messageTitle":"Merge pull request #13 from Haoyuli2002/RecipeStepBranch","messageBody":"Recipe step branch","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"6035944c21b046f8cd088fff639b3323a0d74cfb","isMergeCommit":false,"messageTitle":"Add create recipe feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":64,"deletions":13}}},{"hash":"0c64219809d5cb7b43af8066da20547702877eea","isMergeCommit":false,"messageTitle":"Add testing for adding recipes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":0},"test-code":{"insertions":35,"deletions":0}}},{"hash":"20b6f77610183ea67e3604b052000c190bb0414e","isMergeCommit":false,"messageTitle":"Add system exit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-16","commitResults":[{"hash":"da5360045784c465988318559c89d321b52db980","isMergeCommit":true,"messageTitle":"Merge pull request #14 from StanleyW00/addRecipes","messageBody":"Add creating recipes","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7959531690b3e7ddc94364fe4069b6e409951068","isMergeCommit":true,"messageTitle":"Merge pull request #24 from kaijie0102/master","messageBody":"Create ui class to handle user interaction","fileTypesAndContributionMap":{}},{"hash":"b405e606c842c9f4b92dcb0bb803f45779eb2958","isMergeCommit":true,"messageTitle":"Merge pull request #27 from kaijie0102/master","messageBody":"Fix minor bug","fileTypesAndContributionMap":{}},{"hash":"8eb5ee1e1256bd6dd9bae39af2aa2eb5e7cdb2d4","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"e1950bf2749c44d2852c5fc3d189ed4618cfa9cb","isMergeCommit":false,"messageTitle":"Standerdise recipe related methods","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4}}},{"hash":"b7c148fca9ffde787c876a6b61b63367f4e03a65","isMergeCommit":false,"messageTitle":"Add get specific recipe method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"f469c2de2df52ed8b537ac0e9224939feedcf3b0","isMergeCommit":false,"messageTitle":"Modify add recipe test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":12,"deletions":13}}},{"hash":"f1326a5314e2209d0ace69c424ea49ff7b05d5c6","isMergeCommit":false,"messageTitle":"Delete whitespace","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"32eac014ebdfa5d74c95888e1f615aac4bb39dcb","isMergeCommit":false,"messageTitle":"Rename add recipe test method","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"6d90533ce88e5f6d8192158159232cc52b5e19f2","isMergeCommit":false,"messageTitle":"Add assertions to RecipeList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":9}}},{"hash":"43d05f869b2577aa17c35e23966d728015a4a1b5","isMergeCommit":false,"messageTitle":"Edit text ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"5534fe721164591172c0fa0dce02704a49113be2","isMergeCommit":false,"messageTitle":"Fix bug related to ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"6783f26062c4cc6302aecc2aa19b9edfa7b8d078","isMergeCommit":false,"messageTitle":"Create add recipe command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":5}}},{"hash":"a1f5fa5023d530ae517d097329282f18fbe9b153","isMergeCommit":false,"messageTitle":"Create add ingredient command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"b3fdb4626da86913fea35d5b5f5c183bf164dc9f","isMergeCommit":false,"messageTitle":"Modify main function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":19}}},{"hash":"c8ed1dd8157c61235f14e682376c8b8180b4e918","isMergeCommit":false,"messageTitle":"Fix some style errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}}]},{"date":"2023-10-19","commitResults":[{"hash":"f0afcf37a3cbdc09d3a4655c92cd2dd39abad24f","isMergeCommit":false,"messageTitle":"Modify command classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":47}}},{"hash":"d982bca0df68a7dba2767e94e51a701a3c42e5fa","isMergeCommit":false,"messageTitle":"Add view recipes and ingredients class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":15}}},{"hash":"e2bbcb06de5faee78a55a181a18b61c5cfceff53","isMergeCommit":false,"messageTitle":"Modify ingredient list test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":1}}},{"hash":"489c6901eb18e5e5ec5a1eec8ef1fd567ca55305","isMergeCommit":false,"messageTitle":"Remame print recipes method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":3}}},{"hash":"94629b58743f88735a57da32299da95c2e3412a7","isMergeCommit":true,"messageTitle":"Merge pull request #34 from StanleyW00/17-add-Command","messageBody":"Add command classes","fileTypesAndContributionMap":{}},{"hash":"467e71ae6979505fc6e44a951f3d88e2fe616c9d","isMergeCommit":false,"messageTitle":"Modify the flow of main class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":92,"deletions":93}}},{"hash":"b34a3ba4e0082f8351c230d202aa8a7949a86c11","isMergeCommit":false,"messageTitle":"Create exit command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":3}}},{"hash":"e9c7037ac8588d82df8817e5d973af90a35c81a8","isMergeCommit":false,"messageTitle":"Add help command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":6}}},{"hash":"dc51db2062b67b71277e6434a373e8400b17aefc","isMergeCommit":false,"messageTitle":"Add format exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":3}}},{"hash":"476857f5b3edccf28a664678e369c8da45ce587c","isMergeCommit":false,"messageTitle":"Fix exception bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"f9f4ac53caea4bc335f07bcba34023ac4665163a","isMergeCommit":false,"messageTitle":"Fix style error in parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":1}}},{"hash":"a29fed49e4a1ff83c871627578fa971fdca44d55","isMergeCommit":false,"messageTitle":"Add logs in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":0}}},{"hash":"8694442c12f02d05c307ad928c9d18eab61a8c3a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-F11-2/tp into revamp-main","messageBody":"# Conflicts:\n#\tsrc/main/java/essenmakanan/EssenMakanan.java\n#\tsrc/main/java/essenmakanan/command/ViewIngredientsCommand.java\n#\tsrc/main/java/essenmakanan/command/ViewRecipesCommand.java\n#\tsrc/main/java/essenmakanan/ui/Ui.java\n","fileTypesAndContributionMap":{}},{"hash":"ddb8ed79228787717d3717a27c8c7d2856a9c463","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":4}}},{"hash":"49886a9af346d347beb591f9d141d7ddec4b2e2e","isMergeCommit":false,"messageTitle":"Disable log","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"f2b66ff03c70e87e285dd6e36136af284177fc18","isMergeCommit":false,"messageTitle":"Fix checkstyle issue in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-20","commitResults":[{"hash":"d37387f4af5bf7381b8632d26ae0efcd4df85658","isMergeCommit":false,"messageTitle":"Change the way to check exit command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":24}}},{"hash":"34d5a1a7d84ef36ed9962c923d7a50cb561045df","isMergeCommit":false,"messageTitle":"Modify execute command classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":30}}}]},{"date":"2023-10-21","commitResults":[{"hash":"81d3738bff91e93398d9056fa244cb1ed7aae8b7","isMergeCommit":false,"messageTitle":"Move parser specific methods to their own classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":11}}}]},{"date":"2023-10-24","commitResults":[{"hash":"94cada6dda2861b0c319c1effd9a5d6593369052","isMergeCommit":true,"messageTitle":"Merge pull request #53 from charkty/documentation/developerGuide","messageBody":"Add template for Developer and User Guide","fileTypesAndContributionMap":{}},{"hash":"0bbf94674e19f6a4ebd80fd6b01cf4e901ed61ec","isMergeCommit":false,"messageTitle":"Modify and add new styles","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":14,"deletions":2}}},{"hash":"48d451c5ba280939efe8652a24521e1e6ed1682d","isMergeCommit":false,"messageTitle":"Create sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"2d6a4537881e071fdb6420d300a07edb0600fbe6","isMergeCommit":false,"messageTitle":"Update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":1}}},{"hash":"0ac6f0d05422dc59f40d49ba89545ec322f7f539","isMergeCommit":false,"messageTitle":"Change diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-27","commitResults":[{"hash":"899594b944fd0038b62e06e42a32ffc9b4d4a2da","isMergeCommit":false,"messageTitle":"Improve readibility for ingredient","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"71520876d450c54d8b01d1f08c050edfebfcd16d","isMergeCommit":false,"messageTitle":"Update user guide related to ingredients","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"docs":{"insertions":43,"deletions":12}}},{"hash":"d89ddc269fecbfe5bd2931a7e9c428e7bede8f65","isMergeCommit":false,"messageTitle":"Add assert for add recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"937a4b778a71d877de13fa303ad0788a8a3bbd63","isMergeCommit":false,"messageTitle":"Change layout","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"de236dc74f163fa785877243589856c55401c402","isMergeCommit":false,"messageTitle":"Rename README.md to index.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":0}}},{"hash":"368e1955f646818ad118b1bc0bb6cdfb67222e08","isMergeCommit":false,"messageTitle":"Change layout to default","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"4409f78f14c470c7f6ed8d0f92e0d2a62b28e130","isMergeCommit":false,"messageTitle":"Add assert in adding recipe","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"96f06972f875cf2afdbc1a41ac420e002ff55541","isMergeCommit":true,"messageTitle":"Merge pull request #90 from StanleyW00/assert-add-recipe","messageBody":"Add assert in adding recipe","fileTypesAndContributionMap":{}},{"hash":"8002891ad48a8876ba16db1c8fa8a4eb3e64bea7","isMergeCommit":false,"messageTitle":"Add assertion to edit ingredient command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}}]}],"charkty":[{"date":"2023-09-29","commitResults":[{"hash":"cc8c5bbae9ff17889a536d59a1fe4dc527a67271","isMergeCommit":false,"messageTitle":"Inital Commit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":0},"other":{"insertions":2,"deletions":5}}},{"hash":"dd6b60ad98d01c3e27a8a136d064cab3c7a2f223","isMergeCommit":false,"messageTitle":"Rename main class","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"6e53e38d3d90145bb549a942ff3ddcbaf0b00f26","isMergeCommit":false,"messageTitle":"Change directory in build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"cc19609329761b12f39ea60a3852c6d2383a28ed","isMergeCommit":true,"messageTitle":"Merge pull request #1 from charkty/master","messageBody":"Inital Commit","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"9ee9475bcea3849656b21a218ce39af821019a92","isMergeCommit":false,"messageTitle":"Add Ingredient and IngredientList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":0}}},{"hash":"e62273d8150c1d3fd87c76a033f26ba44238f9d7","isMergeCommit":false,"messageTitle":"Simplify listIngredient\u0027s for loop","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":4}}},{"hash":"60d2a78737c00ba51fa302016588b02ed1801610","isMergeCommit":false,"messageTitle":"Change \u0027qty\u0027 naming and addIngredient() function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"06a8fc3adcbd4ecdb262d813b07285b18d470a95","isMergeCommit":false,"messageTitle":"Add exception and IngredientListTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0},"test-code":{"insertions":31,"deletions":0}}},{"hash":"3aa7bf85c7604d1b0927edad2f87672f09c841f7","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"test-code":{"insertions":0,"deletions":3}}},{"hash":"25c4d225243f0b7571e39e74aeefdf87fdce6bc3","isMergeCommit":false,"messageTitle":"Change import to correct format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-18","commitResults":[{"hash":"ddfb2b196a0f5380863af3f10f9a689d30e96d93","isMergeCommit":true,"messageTitle":"Merge pull request #31 from StanleyW00/refactorAddRecipes","messageBody":"Refactor add recipes","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"e7832c36ff1c6607371a6d41b1200997bfcb3854","isMergeCommit":true,"messageTitle":"Merge pull request #33 from kaijie0102/master","messageBody":"Fix bugs and merge conflicts","fileTypesAndContributionMap":{}},{"hash":"57096d1886b6e74cde0786059ef4ef25b03fd0d9","isMergeCommit":false,"messageTitle":"Add ingredient parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":46},"other":{"insertions":6,"deletions":9},"test-code":{"insertions":29,"deletions":2}}},{"hash":"af8dbd445b5bda4920c82164f168434903354368","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"feb3b6b8dad2cd21dfe94cf79972429da0428065","isMergeCommit":false,"messageTitle":"Resolve checkstyle problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":6}}},{"hash":"754f337d20268d2b308c99f77c8cc954c7c755a0","isMergeCommit":true,"messageTitle":"Merge pull request #42 from charkty/parser/Ingredient","messageBody":"Add ingredient parser and edit Ui","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"934e0093cb12c72ed4f0abf069808da5067d9c56","isMergeCommit":true,"messageTitle":"Merge pull request #51 from StanleyW00/modify-logic-command","messageBody":"[Enhancement] Modify logic command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"9eda75c9cc09a7191362d46958b0e8fdf337df70","isMergeCommit":false,"messageTitle":"Add template for Developer and User Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":201,"deletions":12}}},{"hash":"0575003df7a547e9d30f1b6bd28ae33010d0c49c","isMergeCommit":true,"messageTitle":"Merge pull request #52 from StanleyW00/refactor-parser","messageBody":"Refactor parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"1a83a29c35a2908d5d0e3fd93c8dfcd3ae13471b","isMergeCommit":true,"messageTitle":"Merge pull request #59 from kaijie0102/master","messageBody":"Parser integration and enhancement of Ingredient class","fileTypesAndContributionMap":{}},{"hash":"f5866525c5ca4365951cdd89e71e9c15d3950432","isMergeCommit":false,"messageTitle":"Update features for user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":74,"deletions":3}}}]},{"date":"2023-10-26","commitResults":[{"hash":"21f2f24a20d8e185260f18739bc298516fd64b12","isMergeCommit":false,"messageTitle":"Create sequence diagram for help function","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":43,"deletions":0}}},{"hash":"68e79d8aaef5b66167526bf612879c8b4e7ddc70","isMergeCommit":false,"messageTitle":"Reformat","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":6}}},{"hash":"9e34856934552e225df6b8c96ad062d015c914ef","isMergeCommit":true,"messageTitle":"Merge pull request #64 from StanleyW00/add-new-recipe-diagram","messageBody":"Add new recipe diagram","fileTypesAndContributionMap":{}},{"hash":"65bf693b5b916e63b184ffd9302a2683e1b20928","isMergeCommit":false,"messageTitle":"Add showCommands() to sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"cf9a6619ca7afd707f5cf28f4bfe1a3082550f8f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into documentation/developerGuide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"034c51e5b6852c41948861da715aaa064fa49f78","isMergeCommit":false,"messageTitle":"Create developer guide\u0027s help feature implementation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":7}}},{"hash":"c21aa1564aef1125063a3320fcb3a52f12342d85","isMergeCommit":false,"messageTitle":"Add Delete command in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":2}}},{"hash":"aff6c22bbae4029740f693e6c50bcbec03923f09","isMergeCommit":true,"messageTitle":"Solve merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b6436b9f03fec96ec7c9259361bb694edd498aad","isMergeCommit":false,"messageTitle":"Create delete ingredient function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":106,"deletions":25},"test-code":{"insertions":2,"deletions":2}}},{"hash":"4de8da08513a047f4762b0ee493a99e489091ca3","isMergeCommit":false,"messageTitle":"Handle exceptions for delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":55,"deletions":11}}},{"hash":"856a27fb0cfc917708e3701d659a41c2ace94622","isMergeCommit":false,"messageTitle":"Solve issues in delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":50,"deletions":40},"test-code":{"insertions":133,"deletions":0}}},{"hash":"f3d8ca29c8e5a7f88e3169d024043545c633632f","isMergeCommit":false,"messageTitle":"Clean up delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3},"test-code":{"insertions":0,"deletions":133}}},{"hash":"e7ce1eed6ccd66d9e17951ba37a3599b9d45a8cb","isMergeCommit":false,"messageTitle":"Add relevant imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":4}}},{"hash":"3f19c22122db10d4d155e722a6f469f5c510f2c7","isMergeCommit":false,"messageTitle":"Correct checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"0c4ecb8292c37c0551281a6a812dab75ad6d0207","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into feature/deleteIngredient","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3d10cafeea3ec35ff2b1d074822f196ae91a4428","isMergeCommit":false,"messageTitle":"Change checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":5}}},{"hash":"bbfd1d36d9e0a40a3002304d9c381f96f9da804b","isMergeCommit":false,"messageTitle":"Add delete command to start message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":12}}},{"hash":"d2704f80e2a20a8035dafb3c1fe641748a5612e6","isMergeCommit":false,"messageTitle":"Rectify long sentence","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"1726122f2f2cb3839caf48c407d2308ec539bc00","isMergeCommit":true,"messageTitle":"Merge pull request #68 from kaijie0102/branch-ingredient-qty-unit","messageBody":"Junit test to add multiple ingredients in one line","fileTypesAndContributionMap":{}},{"hash":"065b6372cc43931899da1f312369130313c21e22","isMergeCommit":false,"messageTitle":"Tidy showCommands() in Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":14}}},{"hash":"dc706dd319c03cb51b0343244e76552fa3b6dee8","isMergeCommit":false,"messageTitle":"Standardise everything to index","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":31}}},{"hash":"6c8ae679dc55ad19b0738416da300b09d0987f68","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0dedaf9ea6c7781cb66e89696e5f4a1a3e2981c1","isMergeCommit":true,"messageTitle":"Merge pull request #76 from kaijie0102/master","messageBody":"Update developer guide for viewing ingredients","fileTypesAndContributionMap":{}},{"hash":"a8908ee81fd9023042048bd8fc4e084379345bbb","isMergeCommit":false,"messageTitle":"Create exit sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":0}}},{"hash":"957260f4262da7513f655e8ac7587c65bd7b8529","isMergeCommit":false,"messageTitle":"Add steps for help feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":2}}},{"hash":"1763b6788b0ea138d9a178dfd7def1ec8bb366a6","isMergeCommit":false,"messageTitle":"Add steps for exit command","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"03ae637bf4eba4c7ed3f500547ca3cfa5f88cf37","isMergeCommit":true,"messageTitle":"Merge pull request #77 from kaijie0102/master","messageBody":"Add sequence diagram for viewing all recipes and updating DG","fileTypesAndContributionMap":{}},{"hash":"d5f9312405b523e3e00a0f16cf247b11e4175bc9","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"74a474c6cf47c27fdbf1464e7d98e3200c8e9a02","isMergeCommit":true,"messageTitle":"Merge pull request #79 from kaijie0102/master","messageBody":"Improve view ingredients documentation","fileTypesAndContributionMap":{}},{"hash":"01589367b8bb1113cf91a8e40ca5ef0bf2ec534a","isMergeCommit":false,"messageTitle":"Add assertion and remove exception from RecipeList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":8}}},{"hash":"feb16d869bbfe387268f35b7eeeda42e9c59a29b","isMergeCommit":false,"messageTitle":"Shorten names of exception classes","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"8f5b7d64145348c06ca3194476e574047e457e7b","isMergeCommit":false,"messageTitle":"Refactor exception classes in other classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":57,"deletions":57},"test-code":{"insertions":72,"deletions":10}}},{"hash":"63b1adeda242eb21b19e205228401e18b8ca7f65","isMergeCommit":false,"messageTitle":"Add JU test for delete ingredient command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":24,"deletions":10}}},{"hash":"60e7f9f00528effbe2697855eaea0b57af143f77","isMergeCommit":false,"messageTitle":"Add JU Test for IngredientParser and remove unused exception in delete function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":12},"test-code":{"insertions":36,"deletions":5}}},{"hash":"e4eb6638051b73103aaa4b4e4ffb5f70b0c35961","isMergeCommit":false,"messageTitle":"Add JU test for Delete Recipe Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2},"test-code":{"insertions":75,"deletions":0}}},{"hash":"7ac1c9f5cbd06e7bfd80a4ac02f08d6279f78d8c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into feature/delete","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"746d9b6022f007c11cb48cc35af633109e40aeff","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"test-code":{"insertions":1,"deletions":5}}},{"hash":"0e122d5253e5901139feb79b7d61c38786ccb88e","isMergeCommit":true,"messageTitle":"Merge pull request #83 from StanleyW00/second-half-ug","messageBody":"Update ingredient UG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"44950b10aa5f5b8412b618f68539bc446bb186bc","isMergeCommit":true,"messageTitle":"Merge pull request #89 from StanleyW00/bug-theme-pages","messageBody":"Fix pages bug","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"kaijie0102":{"docs":192,"functional-code":518,"test-code":258},"Haoyuli2002":{"docs":82,"functional-code":88,"test-code":30},"StanleyW00":{"docs":122,"functional-code":297,"test-code":21,"other":1},"charkty":{"docs":377,"functional-code":361,"test-code":244,"other":2}},"authorContributionVariance":{"kaijie0102":21314.037,"Haoyuli2002":1135.3525,"StanleyW00":7539.0454,"charkty":27227.66},"authorDisplayNameMap":{"kaijie0102":"CS2113-F11-2 LEOW.. JIE","Haoyuli2002":"CS2113-F11-2 LI H..AOYU","StanleyW00":"CS2113-F11-2 STAN..JAYA","charkty":"CS2113-F11-2 CHAR..G YU"}} diff --git a/AY2324S1-CS2113-T17-1_tp_master/authorship.json b/AY2324S1-CS2113-T17-1_tp_master/authorship.json index d686e74..a5fe537 100644 --- a/AY2324S1-CS2113-T17-1_tp_master/authorship.json +++ b/AY2324S1-CS2113-T17-1_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"# AthletiCLI project template","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"AlWo223":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" mainClass.set(\"athleticli.AthletiCLI\")","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" archiveBaseName.set(\"athleticli\")","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"skylee03":2,"yicheng-toh":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: About Us","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"|-----------------------------------------------------------|:-----------------:|:----------------------------------------:|:-----------------------------------------:|","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Alexander Wolters | [Github](https://github.com/AlWo223) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Nihal | [Github](https://github.com/nihalzp) | [Portfolio](docs/team/nihalzp.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://github.com/DaDevChia) | Dylan Chia | [Github](https://github.com/DaDevChia) | [Portfolio](https://github.com/DaDevChia) |","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Yi Cheng | [Github](https://github.com/yicheng-toh) | [Portfolio](docs/team/yicheng.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"| ![](https://avatars.githubusercontent.com/u/24489025?s\u003d100) | Yang Ming-Tian | [Github](https://github.com/skylee03) | [Portfolio](docs/team/skylee03.md) |","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"skylee03":5,"yicheng-toh":6,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: Developer Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"- Table of Contents","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"{:toc}","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"## Design","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"This section provides a high-level explanation of the design and implementation of AthletiCLI, ","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"supported by UML diagrams and short code snippets to illustrate the flow of data and interactions between the ","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"components.","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"#### [Implemented] Setting Up of Diet Goals","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":"### Architecture","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"Given below is a quick overview of main components and how they interact with each other.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"**Main components of the architecture**","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":"**`AthletiCLI`** is in charge of the app launch and shut down.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":"The bulk of the AthletiCLI’s work is done by the following components, with each of them corresponds to a package:","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"* [`UI`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/ui): The UI of AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"* [`Storage`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/storage): Reads data from, and writes data to, the hard disk.","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":"* [`Data`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/data): Holds the data of AthletiCLI in memory.","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"* [`Commands`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/commands): The command executors.","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"[`Exceptions`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/exceptions) represents exceptions used by multiple other components.","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"### UI Component","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":"### Storage Component","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"### Data Component","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":"### Commands Component","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"## Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"### Diet Management in AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"#### [Implemented] Setting Up, Editing, Deleting, Listing, and Finding Diets","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":"Regardless of the operation you are performing on diets (setting up, editing, deleting, listing, or finding), the process follows a general five-step pattern in AthletiCLI:","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"1. **Input Processing**: The user\u0027s input is passed through AthletiCLI to the Parser Class. Examples of user inputs include:","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" - \"add-diet calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00\" for adding a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" - \"edit-diet 1 calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00\" for editing a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" - \"delete-diet 1\" for deleting a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" - \"list-diet\" for listing all diets.","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" - \"find-diet 2021-09-01\" for finding diets of a particular date.","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":"2. **Command Identification**: The Parser Class identifies the type of diet operation and passes the necessary parameters.","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":"3. **Command Creation**: An instance of the corresponding command class is created (e.g., AddDietCommand, EditDietCommand, etc.) and returned to AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"4. **Command Execution**: AthletiCLI executes the command, interacting with the data instance of DietList to perform the required operation.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"5. **Result Display**: A message is returned post-execution and passed through AthletiCLI to the UI for display to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":"By following these general steps, AthletiCLI ensures a streamlined process for managing diet-related tasks.","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"### [Implemented] Setting Up of Diet Goals","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"yicheng-toh"},"content":"This following sequence diagram show how the \u0027set-diet-goal\u0027 command works:","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":"\u003cp align\u003d\"center\" width\u003d\"100%\"\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yicheng-toh"},"content":" \u003cimg width\u003d\"80%\" src\u003d\"images/setDietGoalUmlSequenceDiagram.svg\" alt\u003d\"\u0027set-diet-goal\u0027 Sequence Diagram\"/\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"yicheng-toh"},"content":"\u003c/p\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"yicheng-toh"},"content":"Step 1. The input from the user (\"set-diet-goal fats/1\") runs through AthletiCLI to the Parser Class.","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"yicheng-toh"},"content":"Step 2. The Parser Class will identify the request as setting up a diet goal and pass in the parameters","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"yicheng-toh"},"content":"\"fats/1\".","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"yicheng-toh"},"content":"Step 3. A temporary dietGoalList is created to store newly created diet goals.","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"yicheng-toh"},"content":"Step 4. The inputs are verified against our lists of approved diet goals.","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"yicheng-toh"},"content":"Step 5. For each of the diet goals that are valid, a dietGoal object will be created and stored in the ","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"yicheng-toh"},"content":"temporary dietGoalList.","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"yicheng-toh"},"content":"Step 6. The Parser then creates for an instance of SetDietGoalCommand and returns the instance to ","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"yicheng-toh"},"content":"Step 7. AthletiCLI will execute the SetDietGoalCommand. This adds the dietGoals that are present in the ","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"yicheng-toh"},"content":"temporary list into the data instance of DietGoalList which will be kept for records.","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"yicheng-toh"},"content":"Step 8. After executing the SetDietGoalCommand, SetDietGoalCommand returns a message that is passed to ","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI to be passed to UI(not shown) for display.","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":"#### [Implemented] Adding activities","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":"The `add-activity` feature allows users to add a new activity into the application.","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":"These are the main components behind the architecture of the `add-activity` feature:","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":"1. `AthletiCLI`: faciliates the mechanism. It captures the input and calls the parser and execution.","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":"2. `Parser`: parses the user input and generates the appropriate command object and activity ","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":"3. `AddActivityCommand`: encapsulates the execution of the `add-activity` command. It adds ","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" the activity to the data.","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":"4. `Activity`: represents the activity that is to be added.","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":"5. `Data`: holds current state of the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":"6. `ActivityList`: maintains the list of all added activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":"Given below is an example usage scenario and how the add mechanism behaves at each step.","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":"**Step 1 - Input Capture:** The user issues an `add-activity ...` which is captured and passed to the Parser by the ","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":"running AthletiCLI instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":"**Step 2 - Activity Parsing:** The Parser parses the raw input to obtain the arguments of the activity. Given that all ","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":"parameters are provided correctly and no exception is thrown, a new activity object is created.","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":"**Step 3 - Command Parsing:** In addition the parser will create an `AddActivityCommand` object with the newly added ","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":"activity attached to it. The command implements the `AddActivityCommand#execute()` operation and is passed to ","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":"the AthletiCLI instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":"**Step 4 - Activity Addition:** The AthletiCLI instance executes the `AddActivityCommand` object. The command will ","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":"access the data and retrieve the currently stored list of activities stored inside it. The new `Activity` object is ","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":"added to the list.","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":"**Step 5 - User Interaction:** Once the activity is successfully added, a confirmation message is displayed to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":"The following sequence diagram shows how the `add-activity` operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":"\u003cp align\u003d\"center\" width\u003d\"100%\"\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":" \u003cimg width\u003d\"80%\" src\u003d\"DeveloperGuide/AddActivity.png\" alt\u003d\"Sequence Diagram of add-activity`\"/\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":"\u003c/p\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"skylee03"},"content":"### [Proposed] Implementation of DietGoalList","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":138,"author":{"gitId":"yicheng-toh"},"content":"The current implementation of DietGoalList is an ArrayList.","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"yicheng-toh"},"content":"It helps to store dietGoals, however it is not efficient in searching for a particular dietGoal.","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"yicheng-toh"},"content":"At any instance of time, there could only be the existence of one dietGoal.","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"yicheng-toh"},"content":"Verifying if there is an existence of a dietGoal using an ArrayList takes O(n) time, where n is the number of dietGoals.","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"yicheng-toh"},"content":"The proposed change will be to change the underlying data structure to a hashmap for amortised O(1) time complexity","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"yicheng-toh"},"content":"for checking the presence of a dietGoal. ","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":"### Sleep Management in AthletiCLI","lastModifiedDate":"2023-10-27"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":"#### [Implemented] Adding, Editing, Deleting, Listing Sleep","lastModifiedDate":"2023-10-27"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":"1. **Input Processing**: The user\u0027s input is passed through AthletiCLI to the Parser Class. Examples of user inputs include:","lastModifiedDate":"2023-10-27"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":" - \"add-sleep hours/8 datetime/2021-09-01 06:00\" for adding sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" - \"edit-sleep 1 hours/8 datetime/2021-09-01 06:00\" for editing sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" - \"delete-sleep 1\" for deleting sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" - \"list-sleep\" for listing all sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":154,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":155,"author":{"gitId":"DaDevChia"},"content":"2. **Command Identification**: The Parser Class identifies the type of sleep operation and passes the necessary parameters.","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"DaDevChia"},"content":"3. **Command Creation**: An instance of the corresponding command class is created (e.g., AddSleepCommand, EditSleepCommand, etc.) and returned to AthletiCLI.","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":159,"author":{"gitId":"DaDevChia"},"content":"4. **Command Execution**: AthletiCLI executes the command, interacting with the data instance of SleepList to perform the required operation.","lastModifiedDate":"2023-10-27"},{"lineNumber":160,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":161,"author":{"gitId":"DaDevChia"},"content":"5. **Result Display**: A message is returned post-execution and passed through AthletiCLI to the UI for display to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":166,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":168,"author":{"gitId":"DaDevChia"},"content":"AthletiCLI is designed for athletic individuals who are committed to optimizing their performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":169,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":170,"author":{"gitId":"DaDevChia"},"content":"These users are highly disciplined and engaged not only in regular, intense physical training but also in nutrition, mental conditioning, and recovery. ","lastModifiedDate":"2023-10-27"},{"lineNumber":171,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":172,"author":{"gitId":"DaDevChia"},"content":"They are looking for a holistic tool that integrates all facets of an athletic lifestyle. AthletiCLI serves as a daily or weekly companion, designed to monitor, track, and analyze various elements crucial for high-level athletic performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":174,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":176,"author":{"gitId":"DaDevChia"},"content":"AthletiCLI provides a streamlined, integrated solution for athletic individuals focused on achieving peak performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"DaDevChia"},"content":"While the app includes robust capabilities for tracking physical training metrics, it also offers features for monitoring dietary habits and sleep metrics. ","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"DaDevChia"},"content":"By providing a comprehensive view of various performance-related factors over time, AthletiCLI enables athletes to identify trends, refine their training and lifestyle habits, and optimize outcomes. The app is more than a tracking tool—it\u0027s a performance optimization platform that takes into account the full spectrum of an athlete\u0027s life. ","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":182,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":183,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":184,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":185,"author":{"gitId":"nihalzp"},"content":"|---------|-----------------------------------|-----------------------------------|----------------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"nihalzp"},"content":"| v1.0 | health-conscious user | add my dietary information | keep track of my daily calorie and nutrient intake |","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":"| v1.0 | organized user | delete a dietary entry | remove outdated or incorrect data from my diet records |","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":"| v1.0 | fitness enthusiast | view all my diet records | have a clear overview of my dietary habits and make informed decisions on my diet |","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"-"},"content":"| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application |","lastModifiedDate":"2020-05-24"},{"lineNumber":190,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | motivated weight-conscious user | set diet goals | have the motivation to work towards keeping weight in check. |","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | forgetful user | see all my diet goals | remind myself of all the diet goals I have set. |","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | regretful user | remove my diet goals | I can rescind the strict goals I set previously when I find the goals too far fetched. |","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | motivated user | update my diet goals | I can work towards better version of myself by setting stricter goals. |","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | add my sleep information | keep track of my sleep habits and identify areas for improvement |","lastModifiedDate":"2023-10-27"},{"lineNumber":195,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | delete a sleep entry | remove outdated or incorrect data from my sleep records |","lastModifiedDate":"2023-10-27"},{"lineNumber":196,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | view all my sleep records | have a clear overview of my sleep habits and make informed decisions on my sleep |","lastModifiedDate":"2023-10-27"},{"lineNumber":197,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | edit my sleep entries | correct any mistakes or update my sleep information as needed |","lastModifiedDate":"2023-10-27"},{"lineNumber":198,"author":{"gitId":"-"},"content":"| v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2020-05-24"},{"lineNumber":199,"author":{"gitId":"nihalzp"},"content":"| v2.0 | meticulous user | edit my dietary entries | correct any mistakes or update my diet information as needed |","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":201,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":202,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":204,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":206,"author":{"gitId":"yicheng-toh"},"content":"1. AthletiCLI should work on Windows, MacOS and Linux that has java 11 installed.","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"DaDevChia"},"content":"2. AthletiCLI should be able to store data locally.","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"DaDevChia"},"content":"3. AthletiCLI should be able to work offline.","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"DaDevChia"},"content":"4. AthletiCLI should be easy to use.","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":211,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":212,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":213,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"skylee03":37,"DaDevChia":37,"AlWo223":39,"yicheng-toh":41,"-":35,"nihalzp":28}},{"path":"docs/DeveloperGuide/AddActivity.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"skinparam Style strictuml","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"skinparam SequenceMessageAlignment center","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T2 #5252CE","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"participant \":AthletiCLI\" as AthletiCLI LOGIC_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"participant \":Parser\" as Parser #lightblue","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"participant \"a:Activity\" as Activity #yellow","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"participant \"c:AddActivityCommand\" as AddActivityCommand #lightgreen","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"participant \"data:Data\" as Data #lightgrey","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"participant \"activities:ActivityList\" as activities #lightgrey","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"AthletiCLI++","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"AthletiCLI -\u003e Parser++: parseCommand(userInput)","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e Parser++: parseActivity(arguments)","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e Activity++: Activity()","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"Activity --\u003e Parser--: a","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"Parser--","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e AddActivityCommand++: parseAddActivityCommand(arguments)","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand --\u003e Parser--: c","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"Parser --\u003e AthletiCLI--: c","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"AthletiCLI -\u003e AddActivityCommand++: execute(a, data)","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e Data++: getActivities()","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"Data --\u003e activities++","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"activities --\u003e Data--: activities","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"Data --\u003e AddActivityCommand--: activities","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e activities++: add(a)","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"activities --\u003e AddActivityCommand--","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e AthletiCLI--: message","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"AlWo223":38}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"permalink: /","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"title: About AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"feature_text: |","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" # AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" Your all-in-one solution to track, analyse, and optimize your athletic performance.","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"feature_image: \"https://picsum.photos/1300/400?image\u003d989\"","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"[![](https://github.com/AY2324S1-CS2113-T17-1/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2113-T17-1/tp/actions)","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"**AthletiCLI** is your all-in-one solution to track, analyse, and optimize your athletic performance. Designed for the","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"committed athlete, this command-line interface (CLI) tool not only keeps tabs on your physical activities but also","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"covers dietary habits, sleep metrics, and more.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"## Quick Start","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"* Ensure you have the required runtime environment installed on your computer.","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"* Download the latest AthletiCLI from the official repository.","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"* Copy the downloaded file to a folder you want to designate as the home for AthletiCLI.","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"* Open a command terminal, cd into the folder where you copied the file, and run java -jar AthletiCLI.jar","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"## Features","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"**Notes about Command Format**","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"* Words in UPPER_CASE are parameters provided by the user.","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"* Parameters can be in any order.","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"* Parameters enclosed in square brackets [] are optional.","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"## Activity Management","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"### Adding Activities:","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"`add-activity`, `add-run`, `add-swim`, `add-cycle`","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"You can record your activities in AtheltiCLI by adding different activities including running, cycling, and swimming.","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"* `add-activity CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"* `add-run CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"* `add-swim CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"* `add-cycle CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"* CAPTION: A short description of the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"* DURATION: The duration of the activity in minutes.","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"* DISTANCE: The distance of the activity in meters. It must be a positive number.","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"* DATETIME: The date and time of the start of the activity. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-13"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":"* `add-activity Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":"* `add-cycle Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":"### Deleting Activities:","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"`delete-activity`","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"Accidentally added an activity? You can quickly delete activities by using the following command.","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"The index must be a positive number and is not larger than the number of activities recorded.","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"* `delete-activity INDEX`","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"* INDEX: The index of the activity as shown in the displayed activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":"* `delete-activity 2` deletes the second activity in the activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"* `delete-activity 1` deletes the first activity in the activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":"### Listing Activities:","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":"`list-activity`","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":"You can see all your tracked activities in a list by using this command. For more detailed information, you can use","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"the detailed flag.","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":"* `list-activity [-d]`","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":"**Flags:**","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"* `-d`: Shows a detailed list of activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":"* `list-activity` shows a brief overview of all activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":"* `list-activity -d` shows a detailed summary of all activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":"### Editing Activities:","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":"`edit-activity`, `edit-run`, `edit-swim`, `edit-cycle`","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":"You can edit your activities in AthletiCLI by editing the activity at the specified index.","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":"* `edit-activity INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":"* `edit-run INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":"* `edit-swim INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":"* `edit-cycle INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":"* INDEX: The index of the activity to be edited - must be a positive number","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":"* see adding activities for the other parameters","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":"* `edit-activity 1 Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":"* `edit-cycle 2 Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":"### Setting Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":"\u0027set-activity-goal\u0027","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":"You can set goals for your activities in AthletiCLI by setting the target distance or duration for a specific sport.","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":"**Syntax**","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/SPORT target/TARGET period/PERIOD value/VALUE`","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":"**Parameters**","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":"* SPORT: The sport for which you want to set a goal. It must be one of the following: run, swim, cycle, general.","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":"* TARGET: The target for which you want to set a goal. It must be one of the following: distance, duration.","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":"* VALUE: The value of the target. It must be a positive number. For distance, it is in meters. For duration, it is ","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"AlWo223"},"content":" in minutes.","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"AlWo223"},"content":"**Examples**","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/running type/distance period/weekly target/10000` sets a goal of running 10km per week.","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/swimming type/duration period/monthly target/120` sets a goal of swimming for 2 hours per ","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"AlWo223"},"content":" month.","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":"## Diet Management","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":"### Adding Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"nihalzp"},"content":"`add-diet`","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"nihalzp"},"content":"You can record your diet in AtheltiCLI by adding your calorie, protein, carbohydrate,and fat intake of your meals.","lastModifiedDate":"2023-10-15"},{"lineNumber":150,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":151,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":152,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":153,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/CALORIES protein/PROTEIN carb/CARB fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":155,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":156,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":157,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":158,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":159,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal.","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":161,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":162,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":163,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":164,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":166,"author":{"gitId":"nihalzp"},"content":"### Deleting Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":167,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":168,"author":{"gitId":"nihalzp"},"content":"`delete-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":169,"author":{"gitId":"nihalzp"},"content":"You can delete your diet in AtheltiCLI by deleting the diet at the specified index.","lastModifiedDate":"2023-10-15"},{"lineNumber":170,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":171,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":172,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":173,"author":{"gitId":"nihalzp"},"content":"* `delete-diet INDEX`","lastModifiedDate":"2023-10-15"},{"lineNumber":174,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":175,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":176,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":177,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be deleted - must be a positive integer.","lastModifiedDate":"2023-10-15"},{"lineNumber":178,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":179,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":180,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":181,"author":{"gitId":"nihalzp"},"content":"* `delete-diet 1`","lastModifiedDate":"2023-10-15"},{"lineNumber":182,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":183,"author":{"gitId":"nihalzp"},"content":"### Listing Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":184,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":185,"author":{"gitId":"nihalzp"},"content":"`list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":186,"author":{"gitId":"nihalzp"},"content":"You can list all your diets in AtheltiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":191,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"yicheng-toh"},"content":"## Diet Goal Management","lastModifiedDate":"2023-10-18"},{"lineNumber":197,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":198,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":199,"author":{"gitId":"yicheng-toh"},"content":"### Adding Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":200,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":201,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":202,"author":{"gitId":"yicheng-toh"},"content":"`set-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":203,"author":{"gitId":"yicheng-toh"},"content":"You can create a new diet goal to track your nutrients intake with AtheltiCLI by adding the nutrients you wish to track and the target value for your nutrient goals.","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":206,"author":{"gitId":"yicheng-toh"},"content":"Currently only the following nutrients/metrics are tracked:","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"yicheng-toh"},"content":"1. Calories","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"yicheng-toh"},"content":"2. Protein","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"yicheng-toh"},"content":"3. Carbs","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"yicheng-toh"},"content":"4. Fats","lastModifiedDate":"2023-10-18"},{"lineNumber":211,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":212,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":213,"author":{"gitId":"yicheng-toh"},"content":"You can set multiple nutrients goals at once with the `set-diet-goal` command.","lastModifiedDate":"2023-10-18"},{"lineNumber":214,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":215,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":216,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"yicheng-toh"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"yicheng-toh"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"yicheng-toh"},"content":"* CARB: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"yicheng-toh"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"yicheng-toh"},"content":"You can create one or multiple nutrient goals at once with this command.","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"yicheng-toh"},"content":"Create multiple nutrients goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"yicheng-toh"},"content":"Create a single calories goal:","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/500`","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"yicheng-toh"},"content":"### Deleting Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":249,"author":{"gitId":"yicheng-toh"},"content":"`delete-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":250,"author":{"gitId":"yicheng-toh"},"content":"You can delete your diet goals in AtheltiCLI by deleting the goal at the specified index.","lastModifiedDate":"2023-10-18"},{"lineNumber":251,"author":{"gitId":"yicheng-toh"},"content":"This index will be referenced via `list-diet-goal` command.","lastModifiedDate":"2023-10-18"},{"lineNumber":252,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":253,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":254,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":255,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":256,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"yicheng-toh"},"content":"* `delete-diet-goal INDEX`","lastModifiedDate":"2023-10-18"},{"lineNumber":258,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":259,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":260,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":261,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":262,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":263,"author":{"gitId":"yicheng-toh"},"content":"* INDEX: The index of the diet goal to be deleted. It must be a positive integer.","lastModifiedDate":"2023-10-18"},{"lineNumber":264,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":265,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":266,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":267,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":268,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":269,"author":{"gitId":"yicheng-toh"},"content":"* `delete-diet-goal 1`","lastModifiedDate":"2023-10-18"},{"lineNumber":270,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":271,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":272,"author":{"gitId":"yicheng-toh"},"content":"### Listing Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":273,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":274,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":275,"author":{"gitId":"yicheng-toh"},"content":"`list-diet-goals`","lastModifiedDate":"2023-10-18"},{"lineNumber":276,"author":{"gitId":"yicheng-toh"},"content":"You can list all your diet goals in AtheltiCLI.","lastModifiedDate":"2023-10-18"},{"lineNumber":277,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":278,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":279,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":280,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":281,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":282,"author":{"gitId":"yicheng-toh"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":283,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":284,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":285,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":286,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":287,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":288,"author":{"gitId":"yicheng-toh"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":289,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":290,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":291,"author":{"gitId":"yicheng-toh"},"content":"### Editing Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":292,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":293,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":294,"author":{"gitId":"yicheng-toh"},"content":"`edit-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":295,"author":{"gitId":"yicheng-toh"},"content":"You can edit the target value of your diet goals in AtheltiCLI, redefining the target value for the specified nutrient.","lastModifiedDate":"2023-10-18"},{"lineNumber":296,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":297,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":298,"author":{"gitId":"yicheng-toh"},"content":"This command takes in at least one argument. You are able to edit multiple diet goals target value at once. No repetition is allowed.","lastModifiedDate":"2023-10-18"},{"lineNumber":299,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":300,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":301,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":302,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":303,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":304,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":305,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":306,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":307,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":308,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":309,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":310,"author":{"gitId":"yicheng-toh"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-18"},{"lineNumber":311,"author":{"gitId":"yicheng-toh"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":312,"author":{"gitId":"yicheng-toh"},"content":"* CARBS: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":313,"author":{"gitId":"yicheng-toh"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":314,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":315,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":316,"author":{"gitId":"yicheng-toh"},"content":"You can create one or multiple nutrient goals with this command.","lastModifiedDate":"2023-10-18"},{"lineNumber":317,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":318,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":319,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":320,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":321,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":322,"author":{"gitId":"yicheng-toh"},"content":"Edit multiple nutrients goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":323,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/5000 protein/200 carb/500 fat/100`","lastModifiedDate":"2023-10-18"},{"lineNumber":324,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":325,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":326,"author":{"gitId":"yicheng-toh"},"content":"Edit a single calories goal:","lastModifiedDate":"2023-10-18"},{"lineNumber":327,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/5000`","lastModifiedDate":"2023-10-18"},{"lineNumber":328,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":329,"author":{"gitId":"DaDevChia"},"content":"## Sleep Management","lastModifiedDate":"2023-10-17"},{"lineNumber":330,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":331,"author":{"gitId":"DaDevChia"},"content":"### Adding Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":332,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":333,"author":{"gitId":"DaDevChia"},"content":"**Command:** `add-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":334,"author":{"gitId":"DaDevChia"},"content":"You can record your sleep timings in AtheltiCLI by adding your sleep start and end time.","lastModifiedDate":"2023-10-17"},{"lineNumber":335,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":336,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":337,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":338,"author":{"gitId":"DaDevChia"},"content":"* `add-sleep start/START end/END`","lastModifiedDate":"2023-10-17"},{"lineNumber":339,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":340,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":341,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":342,"author":{"gitId":"DaDevChia"},"content":"* START: The start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":343,"author":{"gitId":"DaDevChia"},"content":"* END: The end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":344,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":345,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":346,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":347,"author":{"gitId":"DaDevChia"},"content":"* `add-sleep start/01-09-2021 22:00 end/02-09-2021 06:00`","lastModifiedDate":"2023-10-17"},{"lineNumber":348,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":349,"author":{"gitId":"DaDevChia"},"content":"### Listing Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":350,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":351,"author":{"gitId":"DaDevChia"},"content":"**Command:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":352,"author":{"gitId":"DaDevChia"},"content":"You can list all your sleep records in AtheltiCLI.","lastModifiedDate":"2023-10-17"},{"lineNumber":353,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":354,"author":{"gitId":"DaDevChia"},"content":"**Syntax:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":355,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":356,"author":{"gitId":"DaDevChia"},"content":"**Examples:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":357,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":358,"author":{"gitId":"DaDevChia"},"content":"### Deleting Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":359,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":360,"author":{"gitId":"DaDevChia"},"content":"**Command:** `delete-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":361,"author":{"gitId":"DaDevChia"},"content":"You can delete your sleep in AtheltiCLI by specifying the sleep\u0027s index.","lastModifiedDate":"2023-10-17"},{"lineNumber":362,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":363,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":364,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":365,"author":{"gitId":"DaDevChia"},"content":"* `delete-sleep INDEX`","lastModifiedDate":"2023-10-17"},{"lineNumber":366,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":367,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":368,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":369,"author":{"gitId":"DaDevChia"},"content":"* INDEX: The integer index of the sleep record you wish to delete.","lastModifiedDate":"2023-10-17"},{"lineNumber":370,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":371,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":372,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":373,"author":{"gitId":"DaDevChia"},"content":"* `delete-sleep 5` ","lastModifiedDate":"2023-10-17"},{"lineNumber":374,"author":{"gitId":"DaDevChia"},"content":" (Note: This will delete the 5th sleep record from your records.)","lastModifiedDate":"2023-10-17"},{"lineNumber":375,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":376,"author":{"gitId":"DaDevChia"},"content":"### Editing Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":377,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":378,"author":{"gitId":"DaDevChia"},"content":"**Command:** `edit-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":379,"author":{"gitId":"nihalzp"},"content":"You can modify existing sleep records in AtheltiCLI by specifying the sleep\u0027s index and then providing the new start and","lastModifiedDate":"2023-10-18"},{"lineNumber":380,"author":{"gitId":"nihalzp"},"content":"end times.","lastModifiedDate":"2023-10-18"},{"lineNumber":381,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":382,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":383,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":384,"author":{"gitId":"DaDevChia"},"content":"* `edit-sleep INDEX start/START end/END`","lastModifiedDate":"2023-10-17"},{"lineNumber":385,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":386,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":387,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":388,"author":{"gitId":"DaDevChia"},"content":"* INDEX: The integer index of the sleep record you wish to edit.","lastModifiedDate":"2023-10-17"},{"lineNumber":389,"author":{"gitId":"DaDevChia"},"content":"* START: The new start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":390,"author":{"gitId":"DaDevChia"},"content":"* END: The new end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":391,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":392,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":393,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":394,"author":{"gitId":"DaDevChia"},"content":"* `edit-sleep 5 start/05-09-2021 23:00 end/06-09-2021 07:00` ","lastModifiedDate":"2023-10-17"},{"lineNumber":395,"author":{"gitId":"DaDevChia"},"content":" (Note: This will edit the 5th sleep record to have the new specified timings.)","lastModifiedDate":"2023-10-17"},{"lineNumber":396,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":397,"author":{"gitId":"DaDevChia"},"content":"---","lastModifiedDate":"2023-10-17"},{"lineNumber":398,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":399,"author":{"gitId":"DaDevChia"},"content":"Remember, when using AtheltiCLI:","lastModifiedDate":"2023-10-17"},{"lineNumber":400,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":401,"author":{"gitId":"DaDevChia"},"content":"* Make sure to provide accurate dates and times.","lastModifiedDate":"2023-10-17"},{"lineNumber":402,"author":{"gitId":"DaDevChia"},"content":"* Double-check indexes before deleting or editing records to prevent mistakes.","lastModifiedDate":"2023-10-17"},{"lineNumber":403,"author":{"gitId":"DaDevChia"},"content":"* If you encounter any error messages, read them carefully to understand what went wrong.","lastModifiedDate":"2023-10-17"},{"lineNumber":404,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":405,"author":{"gitId":"DaDevChia"},"content":"---","lastModifiedDate":"2023-10-17"},{"lineNumber":406,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":407,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":408,"author":{"gitId":"AlWo223"},"content":"[User Guide](UserGuide.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":409,"author":{"gitId":"AlWo223"},"content":"[Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":410,"author":{"gitId":"AlWo223"},"content":"[About Us](AboutUs.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":411,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":412,"author":{"gitId":"skylee03"},"content":"* If you are interested in using AthletiCLI, head over to the [User Guide](UserGuide.html).","lastModifiedDate":"2023-10-26"},{"lineNumber":413,"author":{"gitId":"skylee03"},"content":"* If you are interested about developing AthletiCLI, the [Developer Guide](DeveloperGuide.html) is a good place to start.","lastModifiedDate":"2023-10-26"},{"lineNumber":414,"author":{"gitId":"skylee03"},"content":"* If you would like to learn more about our development team, please visit the [About Us](AboutUs.html) page.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":13,"DaDevChia":75,"AlWo223":117,"yicheng-toh":133,"-":4,"nihalzp":72}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: User Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"## Diet Management","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"### Adding Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"`add-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"You can record your diet in AtheltiCLI by adding your calorie, protein, carbohydrate,and fat intake of your meals.","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":"* DATETIME: The date and time of the meal. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":"### Editing Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":"`edit-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"You can edit your diet in AtheltiCLI by editing the diet at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":"* `edit-diet INDEX calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be edited - must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"* DATETIME: The date and time of the meal. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 datetime/2021-09-01 06:00 protein/20 carb/50 calories/500 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500`","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 protein/20`","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"### Deleting Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":"`delete-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":"You can delete your diet in AtheltiCLI by deleting the diet at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":"* `delete-diet INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be deleted - must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":"* `delete-diet 1`","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":"### Listing Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":"`list-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"You can list all your diets in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":4,"-":19,"nihalzp":60}},{"path":"docs/UserGuideTmp.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: User Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"## Quick Start","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"* Ensure you have the required runtime environment installed on your computer.","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"* Download the latest AthletiCLI from the official repository.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"* Copy the downloaded file to a folder you want to designate as the home for AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"* Open a command terminal, cd into the folder where you copied the file, and run java -jar AthletiCLI.jar","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"## Features","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"**Notes about Command Format**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"* Words in UPPER_CASE are parameters provided by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"* Parameters can be in any order.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"* Parameters enclosed in square brackets [] are optional.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":"## Activity Management","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"### Adding Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":"`add-activity`, `add-run`, `add-swim`, `add-cycle`","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"You can record your activities in AtheltiCLI by adding different activities including running, cycling, and swimming.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":"* `add-activity CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"* `add-run CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"* `add-swim CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":"* `add-cycle CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"* CAPTION: A short description of the activity.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"* DURATION: The duration of the activity in minutes.","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"* DISTANCE: The distance of the activity in meters. It must be a positive number.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":"* DATETIME: The date and time of the start of the activity. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":"* `add-activity Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"* `add-cycle Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"### Deleting Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":"`delete-activity`","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"Accidentally added an activity? You can quickly delete activities by using the following command.","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":"The index must be a positive number and is not larger than the number of activities recorded.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":"* `delete-activity INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the activity as shown in the displayed activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":"* `delete-activity 2` deletes the second activity in the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":"* `delete-activity 1` deletes the first activity in the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":"### Listing Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":"`list-activity`","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"You can see all your tracked activities in a list by using this command. For more detailed information, you can use","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"the detailed flag.","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":"* `list-activity [-d]`","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":"**Flags:**","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":"* `-d`: Shows a detailed list of activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":"* `list-activity` shows a brief overview of all activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":"* `list-activity -d` shows a detailed summary of all activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":"### Editing Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":"`edit-activity`, `edit-run`, `edit-swim`, `edit-cycle`","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":"You can edit your activities in AthletiCLI by editing the activity at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"skylee03"},"content":"* `edit-activity INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"skylee03"},"content":"* `edit-run INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"skylee03"},"content":"* `edit-swim INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"skylee03"},"content":"* `edit-cycle INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the activity to be edited - must be a positive number","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"skylee03"},"content":"* see adding activities for the other parameters","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"skylee03"},"content":"* `edit-activity 1 Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"skylee03"},"content":"* `edit-cycle 2 Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"skylee03"},"content":"## Diet Goal Management","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"skylee03"},"content":"### Adding Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"skylee03"},"content":"`set-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"skylee03"},"content":"You can create a new diet goal to track your nutrients intake with AtheltiCLI by adding the nutrients you wish to track and the target value for your nutrient goals.","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"skylee03"},"content":"Currently only the following nutrients/metrics are tracked:","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"skylee03"},"content":"1. Calories","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"skylee03"},"content":"2. Protein","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"skylee03"},"content":"3. Carbs","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"skylee03"},"content":"4. Fats","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"skylee03"},"content":"You can set multiple nutrients goals at once with the `set-diet-goal` command.","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"skylee03"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"skylee03"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"skylee03"},"content":"* CARB: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"skylee03"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"skylee03"},"content":"You can create one or multiple nutrient goals at once with this command.","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":153,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"skylee03"},"content":"Create multiple nutrients goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":157,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":158,"author":{"gitId":"skylee03"},"content":"Create a single calories goal:","lastModifiedDate":"2023-10-26"},{"lineNumber":159,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/500`","lastModifiedDate":"2023-10-26"},{"lineNumber":160,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":161,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":162,"author":{"gitId":"skylee03"},"content":"### Deleting Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":163,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":164,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":165,"author":{"gitId":"skylee03"},"content":"`delete-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":166,"author":{"gitId":"skylee03"},"content":"You can delete your diet goals in AtheltiCLI by deleting the goal at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":167,"author":{"gitId":"skylee03"},"content":"This index will be referenced via `list-diet-goal` command.","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":169,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":170,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"skylee03"},"content":"* `delete-diet-goal INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the diet goal to be deleted. It must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":182,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":185,"author":{"gitId":"skylee03"},"content":"* `delete-diet-goal 1`","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"skylee03"},"content":"### Listing Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":190,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"skylee03"},"content":"`list-diet-goals`","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"skylee03"},"content":"You can list all your diet goals in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":194,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"skylee03"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"skylee03"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"skylee03"},"content":"### Editing Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"skylee03"},"content":"`edit-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"skylee03"},"content":"You can edit the target value of your diet goals in AtheltiCLI, redefining the target value for the specified nutrient.","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"skylee03"},"content":"This command takes in at least one argument. You are able to edit multiple diet goals target value at once. No repetition is allowed.","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"skylee03"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"skylee03"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"skylee03"},"content":"* CARBS: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"skylee03"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"skylee03"},"content":"You can create one or multiple nutrient goals with this command.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":236,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":238,"author":{"gitId":"skylee03"},"content":"Edit multiple nutrients goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":239,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/5000 protein/200 carb/500 fat/100`","lastModifiedDate":"2023-10-26"},{"lineNumber":240,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":241,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":242,"author":{"gitId":"skylee03"},"content":"Edit a single calories goal:","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/5000`","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"skylee03"},"content":"## Sleep Management","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"skylee03"},"content":"### Adding Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"skylee03"},"content":"**Command:** `add-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"skylee03"},"content":"You can record your sleep timings in AtheltiCLI by adding your sleep start and end time.","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"skylee03"},"content":"* `add-sleep start/START end/END`","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"skylee03"},"content":"* START: The start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"skylee03"},"content":"* END: The end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"skylee03"},"content":"* `add-sleep start/01-09-2021 22:00 end/02-09-2021 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"skylee03"},"content":"### Listing Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"skylee03"},"content":"**Command:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"skylee03"},"content":"You can list all your sleep records in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"skylee03"},"content":"**Syntax:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"skylee03"},"content":"**Examples:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"skylee03"},"content":"### Deleting Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":275,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":276,"author":{"gitId":"skylee03"},"content":"**Command:** `delete-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"skylee03"},"content":"You can delete your sleep in AtheltiCLI by specifying the sleep\u0027s index.","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"skylee03"},"content":"* `delete-sleep INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"skylee03"},"content":"* INDEX: The integer index of the sleep record you wish to delete.","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"skylee03"},"content":"* `delete-sleep 5` ","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"skylee03"},"content":" (Note: This will delete the 5th sleep record from your records.)","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"skylee03"},"content":"### Editing Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"skylee03"},"content":"**Command:** `edit-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"skylee03"},"content":"You can modify existing sleep records in AtheltiCLI by specifying the sleep\u0027s index and then providing the new start and","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"skylee03"},"content":"end times.","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":298,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"skylee03"},"content":"* `edit-sleep INDEX start/START end/END`","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"skylee03"},"content":"* INDEX: The integer index of the sleep record you wish to edit.","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"skylee03"},"content":"* START: The new start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"skylee03"},"content":"* END: The new end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":308,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":309,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"skylee03"},"content":"* `edit-sleep 5 start/05-09-2021 23:00 end/06-09-2021 07:00` ","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"skylee03"},"content":" (Note: This will edit the 5th sleep record to have the new specified timings.)","lastModifiedDate":"2023-10-26"},{"lineNumber":312,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":313,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":314,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":315,"author":{"gitId":"skylee03"},"content":"Remember, when using AtheltiCLI:","lastModifiedDate":"2023-10-26"},{"lineNumber":316,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":317,"author":{"gitId":"skylee03"},"content":"* Make sure to provide accurate dates and times.","lastModifiedDate":"2023-10-26"},{"lineNumber":318,"author":{"gitId":"skylee03"},"content":"* Double-check indexes before deleting or editing records to prevent mistakes.","lastModifiedDate":"2023-10-26"},{"lineNumber":319,"author":{"gitId":"skylee03"},"content":"* If you encounter any error messages, read them carefully to understand what went wrong.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":319}},{"path":"docs/puml/DietGoals.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"skinparam Style strictuml","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"skinparam SequenceMessageAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"participant \":AthletiCLI\" as AthletiCLI #lightblue","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"participant \":Parser\" as Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"participant \":dietGoal\" as dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"participant \":SetDietGoalCommand\" as SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"participant \"temp:dietGoalList\" as tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"participant \"data:dietGoalList\" as dataDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"\u0027autonumber","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI++","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI -\u003e Parser++ : ParseCommand(\"set-diet-goal fats/1\")","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e Parser++ : ParseDietGoalSetEdit(\"fats/1\")","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"create tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e tempDietGoalList++ : dietGoalList()","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"tempDietGoalList --\u003e Parser-- : dietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" loop number of valid new diet goals","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" create dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" Parser -\u003e dietGoal++ : dietGoal()","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" dietGoal --\u003e Parser-- : dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" end","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":"Parser --\u003e Parser-- : dietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":"create SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e SetDietGoalCommand++ : SetDietGoalCommand()","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand --\u003e Parser-- : SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"Parser --\u003e AthletiCLI-- : SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI -\u003e SetDietGoalCommand++ : execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand -\u003e dataDietGoalList++ : add()","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":"dataDietGoalList --\u003e SetDietGoalCommand--","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"destroy tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand --\u003e AthletiCLI-- : messages","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":"destroy SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"yicheng-toh":39}},{"path":"docs/team/skylee03.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"# Yang Ming-Tian - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"skylee03":6}},{"path":"docs/team/yicheng.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"# John Doe - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"yicheng-toh":6}},{"path":"src/main/java/athleticli/AthletiCLI.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.logging.ConsoleHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.SaveCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"import athleticli.storage.Storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Parser;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Defines the basic structure and the behavior of AthletiCLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"public class AthletiCLI {","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" private static Logger logger \u003d Logger.getLogger(AthletiCLI.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" private static Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * Constructs an \u003ccode\u003eAthletiCLI\u003c/code\u003e object.","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" private AthletiCLI() {","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" data \u003d Storage.load();","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" logger.addHandler(new FileHandler(\"%t/athleticli-log.txt\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" } catch(IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" logger.addHandler(new ConsoleHandler());","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" * Creates an `AthletiCLI` object and runs it.","lastModifiedDate":"2023-10-08"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" * @param args Arguments obtained from the command line.","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" /* save data when the JVM begins its shutdown sequence */","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" Runtime.getRuntime().addShutdownHook(new Thread(() -\u003e {","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" final String[] feedback \u003d new SaveCommand().execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" ui.showMessages(feedback);","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" }));","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" new AthletiCLI().run();","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" * Displays the welcome interface, continuously reads user input","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" * and executes corresponding instructions until exiting.","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" private void run() {","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" logger.entering(getClass().getName(), \"run\");","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" ui.showWelcome();","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" final String rawUserInput \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" logger.info(\"Command read: \" + rawUserInput);","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" final Command command \u003d Parser.parseCommand(rawUserInput);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" final String[] feedback \u003d command.execute(data);","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" ui.showMessages(feedback);","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" logger.info(\"Command executed successfully\");","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" isExit \u003d command.isExit();","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" logger.warning(\"Exception caught: \" + e);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" logger.exiting(getClass().getName(), \"run\");","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":81}},{"path":"src/main/java/athleticli/commands/ByeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class ByeCommand extends Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" * Returns \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * @return \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" public boolean isExit() {","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" return true;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" * Returns the bye message to be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" return new String[] {Message.MESSAGE_BYE};","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":26}},{"path":"src/main/java/athleticli/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods of a command.","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * Executes the command and returns the messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public abstract String[] execute(Data data) throws AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * Returns \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @return \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" public boolean isExit() {","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" return false;","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":27}},{"path":"src/main/java/athleticli/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.activity.FindActivityCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.diet.FindDietCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.sleep.FindSleepCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" protected LocalDate date;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" public FindCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * Returns the records to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" * @return The records to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" var activities \u003d Stream.of(new FindActivityCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" var diets \u003d Stream.of(new FindDietCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" var sleeps \u003d Stream.of(new FindSleepCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" return Stream.of(activities, diets, sleeps)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" .reduce(Stream::concat)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .orElseGet(Stream::empty)","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":36}},{"path":"src/main/java/athleticli/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static java.util.Map.entry;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.CommandName;","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" private static final String[] HELP_ALL \u003d {","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" \"\\nActivity Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_RUN,","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_SWIM,","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_CYCLE,","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_RUN,","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_SWIM,","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_CYCLE,","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_ACTIVITY,","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" \"\\nDiet Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_DIET,","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" \"\\nSleep Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_SLEEP,","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" /* Misc */","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" \"\\nMisc:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND,","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" Message.HELP_SAVE,","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" Message.HELP_BYE,","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" Message.HELP_HELP,","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" \"\\n\" + Message.HELP_DETAILS","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" };","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" private static final Map\u003cString, String\u003e HELP_MESSAGES \u003d Map.ofEntries(","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY, Message.HELP_ADD_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_RUN, Message.HELP_ADD_RUN),","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SWIM, Message.HELP_ADD_SWIM),","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_CYCLE, Message.HELP_ADD_CYCLE),","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_DELETE, Message.HELP_DELETE_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_LIST, Message.HELP_LIST_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_EDIT, Message.HELP_EDIT_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_RUN_EDIT, Message.HELP_EDIT_RUN),","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SWIM_EDIT, Message.HELP_EDIT_SWIM),","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_CYCLE_EDIT, Message.HELP_EDIT_CYCLE),","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_FIND, Message.HELP_FIND_ACTIVITY),","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_ADD, Message.HELP_ADD_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" entry(CommandName.COMMAND_DIET_EDIT, Message.HELP_EDIT_DIET),","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_DELETE, Message.HELP_DELETE_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_LIST, Message.HELP_LIST_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_FIND, Message.HELP_FIND_DIET),","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_ADD, Message.HELP_ADD_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_LIST, Message.HELP_LIST_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_DELETE, Message.HELP_DELETE_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_EDIT, Message.HELP_EDIT_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_FIND, Message.HELP_FIND_SLEEP),","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" /* Misc */","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_FIND, Message.HELP_FIND),","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SAVE, Message.HELP_SAVE),","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_BYE, Message.HELP_BYE),","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_HELP, Message.HELP_HELP)","lastModifiedDate":"2023-10-21"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" );","lastModifiedDate":"2023-10-21"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" private String command;","lastModifiedDate":"2023-10-21"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" public HelpCommand(String command) {","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" this.command \u003d command;","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" * Returns the help messages to be shown to the user.","lastModifiedDate":"2023-10-21"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":" if (HELP_MESSAGES.containsKey(command)) {","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"skylee03"},"content":" return new String[] {\"Usage: \" + HELP_MESSAGES.get(command)};","lastModifiedDate":"2023-10-21"},{"lineNumber":96,"author":{"gitId":"skylee03"},"content":" } else {","lastModifiedDate":"2023-10-21"},{"lineNumber":97,"author":{"gitId":"skylee03"},"content":" return HELP_ALL;","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"skylee03":99,"nihalzp":1}},{"path":"src/main/java/athleticli/commands/SaveCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.storage.Storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class SaveCommand extends Command {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" * Saves the data into the file.","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" assert data !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" Storage.save(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" throw new AthletiException(Message.MESSAGE_IO_EXCEPTION);","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" return new String[] {Message.MESSAGE_SAVE};","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":28}},{"path":"src/main/java/athleticli/commands/activity/AddActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" * Executes the add activity commands provided by the user.","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class AddActivityCommand extends Command {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final Activity activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * Constructor for AddActivityCommand.","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * @param activity Activity to be added.","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" public AddActivityCommand(Activity activity){","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" this.activity \u003d activity;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * Updates the activity list.","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity list.","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" activities.add(this.activity);","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" activities.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" int size \u003d activities.size();","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" String countMessage;","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" if (size \u003e 1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" countMessage \u003d String.format(Message.MESSAGE_ACTIVITY_COUNT, size);","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" countMessage \u003d Message.MESSAGE_ACTIVITY_FIRST;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_ADDED, this.activity.toString(), countMessage};","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":40}},{"path":"src/main/java/athleticli/commands/activity/DeleteActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" * Executes the delete activity command provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"public class DeleteActivityCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private final Integer index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * Constructor for DeleteActivityCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * @param index Index of activity to be deleted.","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public DeleteActivityCommand(Integer index) {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * Executes the delete activity command.","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @param data Data object containing the current list of activities.","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" final Activity activity \u003d activities.get(index-1);","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" activities.remove(activity);","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_DELETED, activity.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" String.format(Message.MESSAGE_ACTIVITY_COUNT, activities.size())};","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS);","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":41}},{"path":"src/main/java/athleticli/commands/activity/EditActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" * Executes the edit activity command provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"public class EditActivityCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static Logger logger \u003d Logger.getLogger(\"EditActivityCommand\");","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private final int index;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private final Activity activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * Constructor for EditActivityCommand.","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param index Index of the activity to be edited.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param activity Updated Activity.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public EditActivityCommand(Activity activity, int index) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assert index \u003e 0 : \"Index should be greater than 0\";","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" this.activity \u003d activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * Executes the edit activity command.","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @param data Data object containing the current list of activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" logger.log(Level.INFO, \"Editing activity at index \" + index);","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" activities.set(index-1, activity);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" logger.log(java.util.logging.Level.INFO, \"Activity at index \" + index + \"successfully edited\");","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_UPDATED, activity.toString(),","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String.format(Message.MESSAGE_ACTIVITY_COUNT, activities.size())};","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" logger.log(java.util.logging.Level.WARNING, \"Activity index out of bounds\");","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS);","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":49}},{"path":"src/main/java/athleticli/commands/activity/FindActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindActivityCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public FindActivityCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Returns the activities matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getActivities()","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" .filter(Activity.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" .map(Activity.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .map(Activity::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_ACTIVITY_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35}},{"path":"src/main/java/athleticli/commands/activity/ListActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" * Executes the list activity command provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"public class ListActivityCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final boolean isDetailed;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" * Constructor for ListActivityCommand.","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * @param isDetailed Whether the list should be detailed.","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" public ListActivityCommand(boolean isDetailed) {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" this.isDetailed \u003d isDetailed;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * Lists the activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity list.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" final int size \u003d activities.size();","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" if (isDetailed) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" return printDetailedList(activities, size);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" return printList(activities, size);","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" * Prints the list of activities.","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * @param activities The current activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" * @param size The size of the activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" public String[] printList(ActivityList activities, int size) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String[] output \u003d new String[size + 1];","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" output[0] \u003d Message.MESSAGE_ACTIVITY_LIST;","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" output[i+1] \u003d (i+1) + \".\" + activities.get(i).toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" return output;","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" * Prints the detailed list of activities.","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" * @param activities The current activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" * @param size The size of the activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" public String[] printDetailedList(ActivityList activities, int size) {","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" String[] output \u003d new String[size + 1];","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" output[0] \u003d Message.MESSAGE_ACTIVITY_LIST;","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" output[i+1] \u003d activities.get(i).toDetailedString();","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" return output;","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":64}},{"path":"src/main/java/athleticli/commands/activity/SetActivityGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoalList;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"public class SetActivityGoalCommand extends Command {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" private final ActivityGoal activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" * Constructor for SetActivityGoalCommand.","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" * @param activityGoal Activity goal to be added.","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" public SetActivityGoalCommand(ActivityGoal activityGoal){","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" this.activityGoal \u003d activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * Updates the activity goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" ActivityGoalList activityGoals \u003d data.getActivityGoals();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" activityGoals.add(this.activityGoal);","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_GOAL_ADDED, this.activityGoal.toString(data)};","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"AlWo223":31}},{"path":"src/main/java/athleticli/commands/diet/AddDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Executes the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"public class AddDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private final Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Constructor for AddDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" * @param diet Diet to be added.","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" public AddDietCommand(Diet diet) {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" this.diet \u003d diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" DietList diets \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" diets.add(this.diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" int size \u003d diets.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" String countMessage;","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" if (size \u003e 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" countMessage \u003d String.format(Message.MESSAGE_DIET_COUNT, size);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" countMessage \u003d String.format(Message.MESSAGE_DIET_FIRST, size);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_ADDED, this.diet.toString(), countMessage};","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":44}},{"path":"src/main/java/athleticli/commands/diet/DeleteDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Executes the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"public class DeleteDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private final int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Constructor for AddDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" * @param index Diet to be added.","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" public DeleteDietCommand(int index) {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" assert index \u003e 0 : \"Index cannot be less than 1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" DietList dietList \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" int size \u003d dietList.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" if (index \u003e size) {","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_INVALID_DIET_INDEX);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" Diet oldDiet \u003d dietList.get(index - 1);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" dietList.remove(index - 1);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_DELETED, oldDiet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" String.format(Message.MESSAGE_DIET_COUNT, size - 1)};","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":43}},{"path":"src/main/java/athleticli/commands/diet/DeleteDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.ConsoleHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" * Executes the delete-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":"public class DeleteDietGoalCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private static final Logger logger \u003d Logger.getLogger(DeleteDietGoalCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" private final int deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the delete diet goal command.","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" * @param deleteIndex Index of the diet goal to be deleted in the users\u0027 perspective.","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" public DeleteDietGoalCommand(int deleteIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" //deleteIndex that is less than or equal to zero would result in exception","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" assert deleteIndex \u003e\u003d 1: \"\u0027deleteIndex\u0027 should have the value of 1 minimally.\";","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" this.deleteIndex \u003d deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" logger.addHandler(new FileHandler(\"%t/athleticli-log.txt\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" } catch(IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" logger.addHandler(new ConsoleHandler());","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" * Deletes a goal from the Diet Goal List.","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrient goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" logger.log(Level.FINE, \"Executing delete command for diet goals\");","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList dietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" if (dietGoals.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_EMPTY_DIETGOALLIST);","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" DietGoal dietGoalRemoved \u003d dietGoals.get(deleteIndex - 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" dietGoals.remove(deleteIndex - 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" logger.log(Level.FINE, String.format(\"Diet goals %s has been successfully removed\",","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" dietGoalRemoved.getNutrients()));","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_DELETE_HEADER,","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" dietGoalRemoved.toString()};","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_OUT_OF_BOUND, dietGoals.size()));","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yicheng-toh":65}},{"path":"src/main/java/athleticli/commands/diet/EditDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parameter;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" * Executes the edit diet command provided by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"public class EditDietCommand extends Command {","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private final int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private final HashMap\u003cString, String\u003e dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * Constructor for EditDietCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" * @param index Index of the diet to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * @param dietMap Updated Diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" public EditDietCommand(int index, HashMap\u003cString, String\u003e dietMap) {","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" assert index \u003e 0 : \"Index should be greater than 0\";","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assert !dietMap.isEmpty() : \"Diet map should not be empty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" this.dietMap \u003d dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" * Executes the edit diet command.","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" * @param data Data object containing the current list of diets.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" DietList diets \u003d data.getDiets();","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" int size \u003d diets.size();","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" if (index \u003e size) {","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_INVALID_DIET_INDEX);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" Diet oldDiet \u003d diets.get(index - 1);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" for (String key : dietMap.keySet()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" assert !java.util.Objects.equals(dietMap.get(key), \"\") : \"Diet parameter should not be empty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" switch (key) {","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" case Parameter.CALORIES_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" oldDiet.setCalories(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" case Parameter.PROTEIN_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" oldDiet.setProtein(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" case Parameter.CARB_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" oldDiet.setCarb(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" case Parameter.FAT_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" oldDiet.setFat(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" case Parameter.DATETIME_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" LocalDateTime dateTime \u003d Parser.parseDateTime(dietMap.get(key));","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" oldDiet.setDateTime(dateTime);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" default:","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" diets.set(index - 1, oldDiet);","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_UPDATED, oldDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"nihalzp":76}},{"path":"src/main/java/athleticli/commands/diet/EditDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" * Executes the edit-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"public class EditDietGoalCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private final ArrayList\u003cDietGoal\u003e userUpdatedDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the edit diet goal command.","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" * @param dietGoals This is a list consisting of updated existing diet goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" * to be added to the current goal list.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" public EditDietGoalCommand(ArrayList\u003cDietGoal\u003e dietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" userUpdatedDietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" * Updates the Diet Goal List.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrient goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList currentDietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e currentDietGoalsNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" // Populate the set with current diet goal nutrients","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal dietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoalsNutrients.add(dietGoal.getNutrients());","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" // Check if user edited diet goals is in records previously","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" boolean isNutrientGoalInCurrentDietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userDietGoal : userUpdatedDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" String userNewNutrient \u003d userDietGoal.getNutrients();","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" isNutrientGoalInCurrentDietGoalList \u003d currentDietGoalsNutrients.contains(userNewNutrient);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" if (!isNutrientGoalInCurrentDietGoalList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_NOT_EXISTED, userNewNutrient));","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" // Edit updated goals to current diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" int newTargetValue;","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userUpdatedDietGoal : userUpdatedDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal currentDietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" if (!userUpdatedDietGoal.getNutrients().equals(currentDietGoal.getNutrients())) {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" continue;","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" //update new target value to the current goal","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" newTargetValue \u003d userUpdatedDietGoal.getTargetValue();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoal.setTargetValue(newTargetValue);","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d currentDietGoals.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, currentDietGoals.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"yicheng-toh":70}},{"path":"src/main/java/athleticli/commands/diet/FindDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Finds diets matching the date.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"public class FindDietCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public FindDietCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * Returns the diets matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getDiets()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .filter(Diet.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" .map(Diet.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" .map(Diet::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_DIET_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35,"nihalzp":4}},{"path":"src/main/java/athleticli/commands/diet/ListDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" * Executes the list diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"public class ListDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Constructor for ListDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" public ListDietCommand() {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" DietList dietList \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" int size \u003d dietList.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_LIST, dietList.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" String.format(Message.MESSAGE_DIET_COUNT, size)};","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":31}},{"path":"src/main/java/athleticli/commands/diet/ListDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":" * Executes the list diet goal commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"public class ListDietGoalCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" * Constructor for ListDietGoalCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" public ListDietGoalCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" * Iterate and returns the string representation for each goal.","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the diet goal list.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList dietGoalList \u003d data.getDietGoals();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d dietGoalList.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" if (dietGoalNum \u003d\u003d 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_NONE};","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, dietGoalList.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":34}},{"path":"src/main/java/athleticli/commands/diet/SetDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" * Executes the set-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"public class SetDietGoalCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private final ArrayList\u003cDietGoal\u003e userNewDietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the set diet goal command","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" * @param dietGoals This is a list consisting of new diet goals","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" * to be added to the current goal list.","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" public SetDietGoalCommand(ArrayList\u003cDietGoal\u003e dietGoals) {","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" userNewDietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" * Updates the Diet Goal list.","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrients goal value.","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList currentDietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e currentDietGoalsNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" // Populate the set with current diet goal nutrients","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal dietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoalsNutrients.add(dietGoal.getNutrients());","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" // Check against user new diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userDietGoal : userNewDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" String userNewNutrient \u003d userDietGoal.getNutrients();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" if (currentDietGoalsNutrients.contains(userNewNutrient)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_ALREADY_EXISTED, userNewNutrient));","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" // Add new diet goals to current diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoals.addAll(userNewDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d currentDietGoals.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, currentDietGoals.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"yicheng-toh":59}},{"path":"src/main/java/athleticli/commands/sleep/AddSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" * Executes the add sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"public class AddSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(AddSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" * Constructor for AddSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" * @param from Start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" * @param to End time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" public AddSleepCommand(LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" assert from !\u003d null : \"Start time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" assert to !\u003d null : \"End time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" assert from.isBefore(to) : \"Start time must be before end time\";","lastModifiedDate":"2023-10-20"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating AddSleepCommand with from: \" + from + \" and to: \" + to);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" * Adds the sleep record to the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" Sleep newSleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(newSleep);","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" logger.info(\"Added sleep: \" + newSleep);","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Sleep list: \" + sleepList);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String returnMessage2 \u003d String.format(Message.MESSAGE_SLEEP_ADD_RETURN_2, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" Message.MESSAGE_SLEEP_ADD_RETURN_1,","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" newSleep.toString(),","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" returnMessage2","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":55}},{"path":"src/main/java/athleticli/commands/sleep/DeleteSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" * Executes the delete sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"public class DeleteSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(DeleteSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" * Constructor for DeleteSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" * @param index Index of the sleep to be deleted.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" public DeleteSleepCommand(int index) {","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating DeleteSleepCommand with index: \" + index);","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" * Deletes the sleep record at the specified index.","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" //accessIndex is the index of the sleep in the list accounting for zero-indexing","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" int accessIndex \u003d index - 1; ","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" if (accessIndex \u003c 0 || accessIndex \u003e\u003d sleepList.size()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE);","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003e\u003d 0 : \"Access index cannot be less than 0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003c sleepList.size() : \"Index cannot be more than size of sleep list\";","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" Sleep oldSleep \u003d sleepList.get(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" sleepList.remove(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Deleted sleep: \" + oldSleep);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String returnMessage \u003d String.format(Message.MESSAGE_SLEEP_DELETE_RETURN, index, oldSleep.toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" returnMessage","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":55}},{"path":"src/main/java/athleticli/commands/sleep/EditSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" * Executes the edit sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class EditSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(EditSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" * Constructor for EditSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" * @param index Index of the sleep to be edited.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" * @param from New start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" * @param to New end time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" public EditSleepCommand(int index, LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" assert from !\u003d null : \"Start time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" assert to !\u003d null : \"End time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" assert from.isBefore(to) : \"Start time must be before end time\";","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating EditSleepCommand with index: \" + index + \" from: \" + from + \" and to: \" + to);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" * Edits the sleep record at the specified index.","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" //accessIndex is the index of the sleep in the list accounting for zero-indexing","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" int accessIndex \u003d index - 1;","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" if (accessIndex \u003c 0 || accessIndex \u003e\u003d sleepList.size()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE);","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003e\u003d 0 : \"Index cannot be less than 0\";","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003c sleepList.size() : \"Index cannot be more than size of sleep list\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" Sleep oldSleep \u003d sleepList.get(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" Sleep newSleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" sleepList.set(accessIndex, newSleep);","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":" String returnMessage \u003d String.format(Message.MESSAGE_SLEEP_EDIT_RETURN, index);","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":" returnMessage,","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"DaDevChia"},"content":" \"original: \" + oldSleep.toString(),","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"DaDevChia"},"content":" \"to new: \" + newSleep.toString(),","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":70}},{"path":"src/main/java/athleticli/commands/sleep/FindSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindSleepCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public FindSleepCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Returns the sleeps matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getSleeps()","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" .filter(Sleep.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" .map(Sleep.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .map(Sleep::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_SLEEP_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35}},{"path":"src/main/java/athleticli/commands/sleep/ListSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class ListSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private static final Logger logger \u003d Logger.getLogger(ListSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" * Lists all the sleep records in the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" logger.info(\"Executing ListSleepCommand\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" SleepList sleeps \u003d data.getSleeps();","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" final int size \u003d sleeps.size();","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" if (size \u003d\u003d 0) {","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" logger.warning(\"Sleep list is empty\");","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" Message.MESSAGE_SLEEP_LIST_EMPTY","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" return printList(sleeps, size);","lastModifiedDate":"2023-10-20"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public String[] printList(SleepList sleeps, int size) {","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Printing sleep list\");","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" String[] returnString \u003d new String[size+1];","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" returnString[0] \u003d Message.MESSAGE_SLEEP_LIST;","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" assert sleeps.get(i) !\u003d null : \"Sleep record cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" returnString[i+1] \u003d (i + 1) + \". \" + sleeps.get(i).toString();","lastModifiedDate":"2023-10-20"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" return returnString;","lastModifiedDate":"2023-10-20"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"DaDevChia":43}},{"path":"src/main/java/athleticli/commands/sleep/SetSleepGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class SetSleepGoalCommand {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"DaDevChia":4}},{"path":"src/main/java/athleticli/commands/sleep/ViewSleepGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"public class ViewSleepGoalCommand {","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"DaDevChia":8}},{"path":"src/main/java/athleticli/data/Data.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.ActivityGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.SleepGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * Defines the basic fields and methods of data.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"public class Data implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" private ActivityList activities;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" private ActivityGoalList activityGoals;","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private DietList diets;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" private DietGoalList dietGoals;","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" private SleepList sleeps;","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" private SleepGoalList sleepGoals;","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" * Constructs an empty \u003ccode\u003eData\u003c/code\u003e object.","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" public Data() {","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" this.activities \u003d new ActivityList();","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" this.activityGoals \u003d new ActivityGoalList();","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" this.diets \u003d new DietList();","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" this.dietGoals \u003d new DietGoalList();","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" this.sleeps \u003d new SleepList();","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" this.sleepGoals \u003d new SleepGoalList();","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" this.dietGoals \u003d new DietGoalList();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" * Get all the objects","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" public ActivityList getActivities() {","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" return activities;","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" public ActivityGoalList getActivityGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" return activityGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" public DietList getDiets() {","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" return diets;","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" public DietGoalList getDietGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" return dietGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" public SleepList getSleeps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":" return sleeps;","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" public SleepGoalList getSleepGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" return sleepGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"DaDevChia"},"content":" * Set all the objects","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"DaDevChia"},"content":" public void setActivities(ActivityList activities) {","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"DaDevChia"},"content":" this.activities \u003d activities;","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"DaDevChia"},"content":" public void setActivityGoals(ActivityGoalList activityGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"DaDevChia"},"content":" this.activityGoals \u003d activityGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"DaDevChia"},"content":" public void setDiets(DietList diets) {","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"DaDevChia"},"content":" this.diets \u003d diets;","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"DaDevChia"},"content":" public void setDietGoals(DietGoalList dietGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"DaDevChia"},"content":" this.dietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"DaDevChia"},"content":" public void setSleeps(SleepList sleeps) {","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"DaDevChia"},"content":" this.sleeps \u003d sleeps;","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"DaDevChia"},"content":" public void setSleepGoals(SleepGoalList sleepGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"DaDevChia"},"content":" this.sleepGoals \u003d sleepGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":31,"DaDevChia":57,"yicheng-toh":1,"nihalzp":3}},{"path":"src/main/java/athleticli/data/Findable.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public interface Findable {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" * Returns a list of objects matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * @return A list of objects matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date);","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":14}},{"path":"src/main/java/athleticli/data/Goal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" * Defines the basic fields and methods for a goal.","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"public abstract class Goal {","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" * Defines different types of timespans.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" public enum Timespan {","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" DAILY(1),","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" WEEKLY(7),","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" MONTHLY(30),","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" YEARLY(365);","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" private final long days;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" Timespan(long days) {","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" this.days \u003d days;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Returns the number of days in the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" * @return The number of days in the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public long getDays() {","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" return days;","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" private Timespan timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" public Goal(Timespan timespan) {","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" this.timespan \u003d timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * Returns the timespan of this goal.","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" * @return The timespan of this goal.","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" public Timespan getTimespan() {","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" return timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" * Checks whether the date is between the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan of the goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" * @return Whether the date is between the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" public static boolean checkDate(LocalDate date, Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" final LocalDate endDate \u003d LocalDate.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" final LocalDate startDate \u003d endDate.minusDays(timespan.getDays() - 1);","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" return !(date.isBefore(startDate) || date.isAfter(endDate));","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * Returns whether the goal is achieved.","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" * @param data The current data containing all records.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" * @return Whether the goal is achieved.","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" public abstract boolean isAchieved(Data data);","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"skylee03":67,"AlWo223":3}},{"path":"src/main/java/athleticli/data/activity/Activity.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" * Represents a physical activity consisting of basic sports data.","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class Activity implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" public static final DateTimeFormatter DATE_TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"MMMM d, \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" \"yyyy \u0027at\u0027 h:mm a\", Locale.ENGLISH);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" public static final DateTimeFormatter TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"HH:mm:ss\",","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" Locale.ENGLISH);","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final int columnWidth \u003d 40;","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private String description;","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private final String caption;","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private final LocalTime movingTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private final int distance;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" private int calories;","lastModifiedDate":"2023-10-10"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" private final LocalDateTime startDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" * Generates a new general sports activity with some basic stats.","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-10"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public Activity(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime) {","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" this.movingTime \u003d movingTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" this.distance \u003d distance;","lastModifiedDate":"2023-10-10"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" this.startDateTime \u003d startDateTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" this.caption \u003d caption;","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public LocalTime getMovingTime() {","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" return movingTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" public int getDistance() {","lastModifiedDate":"2023-10-10"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" return distance;","lastModifiedDate":"2023-10-10"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public String getCaption() {","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" return caption;","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" public LocalDateTime getStartDateTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" return startDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" public int getCalories() {","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" return this.calories;","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" public int getColumnWidth() {","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" return columnWidth;","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the activity","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" return \"[Activity] \" + caption + \" | \" + distanceOutput + \" | \" + movingTimeOutput + \" | \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" startDateTimeOutput;","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" * Returns distance in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the distance","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" public String generateDistanceStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" double distanceInKm \u003d distance / 1000.0;","lastModifiedDate":"2023-10-13"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" return \"Distance: \" + String.format(Locale.ENGLISH, \"%.2f\", distanceInKm)","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" + \" km\";","lastModifiedDate":"2023-10-13"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" * Returns moving time in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the moving time","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" public String generateMovingTimeStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":" return \"Time: \" + movingTime.format(TIME_FORMATTER);","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" * Returns a short representation of the moving time with the format depending on the duration.","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the moving time","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" public String generateShortMovingTimeStringOutput() {","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" String output \u003d \"\";","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":" if (movingTime.getHour() \u003e 0) {","lastModifiedDate":"2023-10-24"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":" output +\u003d movingTime.getHour() + \"h \" + movingTime.getMinute() + \"m\";","lastModifiedDate":"2023-10-24"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-24"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" output +\u003d movingTime.getMinute() + \"m \" + movingTime.getSecond() + \"s\";","lastModifiedDate":"2023-10-24"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":" return \"Time: \" + output;","lastModifiedDate":"2023-10-24"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":" * Returns start date and time in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the start date and time","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":" public String generateStartDateTimeStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":" return startDateTime.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-24"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the activity.","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the activity","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Activity - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, movingTimeOutput, columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tCalories: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":" this.getCalories() + \" kcal\", \"...\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"AlWo223"},"content":" * Formats two strings into two columns of equal width.","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"AlWo223"},"content":" * @param left String to be placed in the left column","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"AlWo223"},"content":" * @param right String to be placed in the right column","lastModifiedDate":"2023-10-22"},{"lineNumber":141,"author":{"gitId":"AlWo223"},"content":" * @param columnWidth width of each column","lastModifiedDate":"2023-10-22"},{"lineNumber":142,"author":{"gitId":"AlWo223"},"content":" * @return a formatted string with two columns of equal width","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"AlWo223"},"content":" public String formatTwoColumns(String left, String right, int columnWidth) {","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"AlWo223"},"content":" return String.format(\"%-\" + columnWidth + \"s%s\", left, right);","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":147,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":148,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":6,"AlWo223":142}},{"path":"src/main/java/athleticli/data/activity/ActivityGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"public class ActivityGoal extends Goal implements Serializable {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" public enum GoalType {","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DURATION // can be extended","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" public enum Sport {","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" RUNNING, CYCLING, SWIMMING, GENERAL","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private int targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private final GoalType goalType;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private final Sport sport;","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * Constructs an activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan of the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param goalType The goal type of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @param sport The sport of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @param targetValue The target value of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public ActivityGoal(Timespan timespan, GoalType goalType, Sport sport, int targetValue) {","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" super(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" this.goalType \u003d goalType;","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" this.sport \u003d sport;","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" * Examines whether the activity goal is achieved.","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" * @param data The data containing the activity list.","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" * @return Whether the activity goal is achieved.","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" public boolean isAchieved(Data data) throws IllegalStateException {","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" int total \u003d getCurrentValue(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" return total \u003e\u003d targetValue;","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" * Returns the current value of the activity goal metric.","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" * @param data The data containing the activity list.","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" * @return The current value of the activity goal metric.","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public int getCurrentValue(Data data) throws IllegalStateException {","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e activityClass \u003d getActivityClass();","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" int total;","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" switch(goalType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" case DISTANCE:","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" total \u003d activities.getTotalDistance(activityClass, this.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" case DURATION:","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" total \u003d activities.getTotalDuration(activityClass, this.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" total \u003d total / 60;","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" throw new IllegalStateException(\"Unexpected value: \" + goalType);","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" return total;","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" public void setTargetValue(int targetValue) {","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" * Returns the class of the activity associated with the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" * @return The class of the activity.","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" public Class\u003c?\u003e getActivityClass() {","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" switch (this.sport) {","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" case RUNNING:","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" return Run.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" case CYCLING:","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" return Cycle.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" case SWIMMING:","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" return Swim.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" return Activity.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" * Returns the string representation of the activity goal including progress information.","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" * @return The string representation of the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" public String toString(Data data) {","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":" String goalTypeString \u003d goalType.name();","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":" String sportString \u003d sport.name();","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" return (getTimespan().name().toLowerCase() + \" \" + sportString.toLowerCase() + \" \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" goalTypeString.toLowerCase() + \": \" + getCurrentValue(data) + \" / \" + targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":" public GoalType getGoalType() {","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" return goalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":" public Sport getSport() {","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" return sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":" public int getTargetValue() {","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":" return targetValue;","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":5,"AlWo223":108}},{"path":"src/main/java/athleticli/data/activity/ActivityGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class ActivityGoalList extends ArrayList\u003cActivityGoal\u003e implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":7}},{"path":"src/main/java/athleticli/data/activity/ActivityList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.util.Comparator;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class ActivityList extends ArrayList\u003cActivity\u003e implements Serializable, Findable {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * Returns a list of activities matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" * @return A list of activities matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cObject\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : this) {","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" if (activity.getStartDateTime().toLocalDate().equals(date)) {","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" result.add(activity);","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" * Sorts the activities in the list by date.","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" public void sort() {","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" this.sort(Comparator.comparing(Activity::getStartDateTime).reversed());","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" * Returns a list of activities within the timespan.","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan to be matched.","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * @return A list of activities within the timespan.","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public ArrayList\u003cActivity\u003e filterByTimespan(Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : this) {","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" LocalDate activityDate \u003d activity.getStartDateTime().toLocalDate();","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" if (Goal.checkDate(activityDate, timespan)) {","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" result.add(activity);","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" * Returns the total distance of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" * @param activityClass The activity class to be matched.","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" * @return The total distance of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public int getTotalDistance(Class\u003c?\u003e activityClass, Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredActivities \u003d filterByTimespan(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" int runningDistance \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : filteredActivities) {","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" if (activityClass.isInstance(activity)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" runningDistance +\u003d activity.getDistance();","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" return runningDistance;","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" * Returns the total moving time in seconds of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" * @param activityClass The activity class to be matched.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" * @return The total moving time of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" public int getTotalDuration(Class\u003c?\u003e activityClass, Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredActivities \u003d filterByTimespan(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int movingTime \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : filteredActivities) {","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" if (activityClass.isInstance(activity)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d activity.getMovingTime();","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" movingTime +\u003d duration.getHour() * 3600 + duration.getMinute() * 60 + duration.getSecond();","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" return movingTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":19,"AlWo223":67}},{"path":"src/main/java/athleticli/data/activity/Cycle.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" * Represents a cycling activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"public class Cycle extends Activity implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final int elevationGain;","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private final double averageSpeed;","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * Generates a new cycling activity with cycling specific stats.","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" * averageSpeed is calculated automatically based on the distance and movingTime.","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param elevationGain elevation gain in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public Cycle(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, int elevationGain) {","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" this.elevationGain \u003d elevationGain;","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" this.averageSpeed \u003d this.calculateAverageSpeed();","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * Calculates the average speed of the cycle in km/h.","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @return average speed of the cycle in km/h","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public double calculateAverageSpeed() {","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double dist \u003d (double) this.getDistance();","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double time \u003d (double) this.getMovingTime().toSecondOfDay() / 3600;","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" return (dist/1000) / time;","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the cycling activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the cycle","lastModifiedDate":"2023-10-13"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Cycle]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" String speedOutput \u003d generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Speed: \" + speedOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" * Returns a string representation of the average speed of the cycle.","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the average speed of the cycle","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" public String generateSpeedStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" return String.format(Locale.ENGLISH, \"%.2f\", this.averageSpeed) + \" km/h\";","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the cycle.","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the cycle","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" String speedOutput \u003d generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Cycle - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, \"Elevation Gain: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" elevationGain + \" m\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\t\" + movingTimeOutput, \"Avg Speed: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" speedOutput, columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tCalories: \" + this.getCalories() + \" kcal\", \"Max Speed: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" \"tbd\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" public int getElevationGain() {","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" return this.elevationGain;","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":2,"AlWo223":86}},{"path":"src/main/java/athleticli/data/activity/Run.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" * Represents a running activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Run extends Activity implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" private final int elevationGain;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final double averagePace;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final int steps;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * Generates a new running activity with running specific stats.","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * averageSpeed is calculated automatically based on the distance and movingTime.","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param elevationGain elevation gain in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" public Run(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, int elevationGain) {","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.elevationGain \u003d elevationGain;","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" this.averagePace \u003d this.calculateAveragePace();","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" this.steps \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * Calculates the average pace of the run in minutes per km.","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @return average pace of the run in minutes per km","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public double calculateAveragePace() {","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double time \u003d (double) this.getMovingTime().toSecondOfDay() / 60;","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double distance \u003d (double) this.getDistance() / 1000;","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" return time / distance;","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" * Converts the average pace of the run to the user-friendly format mm:ss.","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" * @return average pace of run in mm:ss format","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public String convertAveragePaceToString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" int totalSeconds \u003d (int) Math.round(this.averagePace*60);","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" int minutes \u003d totalSeconds / 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" int seconds \u003d totalSeconds % 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" return String.format(\"%d:%02d\", minutes, seconds);","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the running activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the run","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Run]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" String paceOutput \u003d this.convertAveragePaceToString() + \" /km\";","lastModifiedDate":"2023-10-13"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Pace: \" + paceOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the run.","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the run","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String paceOutput \u003d this.convertAveragePaceToString() + \" /km\";","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Run - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, \"Avg Pace: \" + paceOutput,","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tMoving Time: \" + movingTimeOutput, \"Elevation Gain: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" elevationGain + \" m\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tCalories: \" + this.getCalories() + \" kcal\", \"Steps: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" this.steps, columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" public int getElevationGain() {","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" return elevationGain;","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":2,"AlWo223":91}},{"path":"src/main/java/athleticli/data/activity/Swim.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" * Represents a swimming activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Swim extends Activity implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" private final int laps;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final SwimmingStyle style;","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final int averageLapTime;","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" public enum SwimmingStyle {","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" BUTTERFLY,","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" BACKSTROKE,","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" BREASTSTROKE,","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" FREESTYLE","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * Generates a new swimming activity with swimming specific stats.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * averageLapTime is calculated automatically based on the movingTime and laps.","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in HH:mm:ss format","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" * @param style swimming style","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" public Swim(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, SwimmingStyle style) {","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" this.laps \u003d this.calculateLaps();","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" this.style \u003d style;","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" this.averageLapTime \u003d this.calculateAverageLapTime();","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * Calculates the average lap time in seconds.","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" * @return average lap time in seconds","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public int calculateAverageLapTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" return this.getMovingTime().toSecondOfDay() / this.laps;","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" * Calculates the number of laps.","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" * @return number of laps","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public int calculateLaps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" return this.getDistance() / 50;","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" public int getLaps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" return laps;","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" public int getAverageLapTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" return averageLapTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" * Returns a short string representation of the swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the swim","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Swim]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" String averageLapTimeOutput \u003d this.averageLapTime + \"s\";","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Avg Lap Time: \" + averageLapTimeOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the swim.","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the swim","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Swim - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, movingTimeOutput, columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tLaps: \" + this.getLaps(), \"Style: \"","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" + this.getStyle(), columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tAvg Lap Time: \" + averageLapTime + \" s\", \"Calories: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" this.getCalories() + \" kcal\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":" public SwimmingStyle getStyle() {","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" return style;","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":2,"AlWo223":98}},{"path":"src/main/java/athleticli/data/diet/Diet.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" * Defines the basic fields and methods of a diet.","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"public class Diet implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" public static final DateTimeFormatter DATE_TIME_FORMATTER \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" DateTimeFormatter.ofPattern(\"MMMM d, \" + \"yyyy \u0027at\u0027 h:mm a\", Locale.ENGLISH);","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private int calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private int protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private int carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private int fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private LocalDateTime dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" * Constructs a \u003ccode\u003eDiet\u003c/code\u003e object.","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * @param calories The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" * @param protein Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" * @param carb Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * @param fat Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" * @param dateTime The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" public Diet(int calories, int protein, int carb, int fat, LocalDateTime dateTime) {","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assert calories \u003e\u003d 0 : \"Calories cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" this.calories \u003d calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" assert protein \u003e\u003d 0 : \"Protein cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" this.protein \u003d protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" assert carb \u003e\u003d 0 : \"Carb cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" this.carb \u003d carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" assert fat \u003e\u003d 0 : \"Fat cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" this.fat \u003d fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" this.dateTime \u003d dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" * Returns the caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" * @return The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" public int getCalories() {","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" return calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" * Sets the caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" * @param calories The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" public void setCalories(int calories) {","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" assert calories \u003e\u003d 0 : \"Calories cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" this.calories \u003d calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" * Returns the protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" * @return Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" public int getProtein() {","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" return protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" * Sets the protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" * @param protein Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" public void setProtein(int protein) {","lastModifiedDate":"2023-10-14"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" assert protein \u003e\u003d 0 : \"Protein cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" this.protein \u003d protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" * Returns the carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" * @return Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" public int getCarb() {","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" return carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" * Sets the carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" * @param carb Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" public void setCarb(int carb) {","lastModifiedDate":"2023-10-14"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" assert carb \u003e\u003d 0 : \"Carb cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" this.carb \u003d carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" * Returns the fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" * @return Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":" public int getFat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" return fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" * Sets the fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" * @param fat Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":" public void setFat(int fat) {","lastModifiedDate":"2023-10-14"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" assert fat \u003e\u003d 0 : \"Fat cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":" this.fat \u003d fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" * Returns the date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" * @return The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" public LocalDateTime getDateTime() {","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":" return dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" * Sets the date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" * @param dateTime The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"nihalzp"},"content":" public void setDateTime(LocalDateTime dateTime) {","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"nihalzp"},"content":" this.dateTime \u003d dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" return \"Calories: \" + calories + \" Protein: \" + protein + \" Carb: \" + carb + \" Fat: \" + fat +","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" \" Date: \" + dateTime.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":146,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":6,"nihalzp":140}},{"path":"src/main/java/athleticli/data/diet/DietGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":" * Represents a diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"public class DietGoal implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" private String nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" private int targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" private int currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" private boolean isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal with no current value.","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" public DietGoal(String nutrients, int targetValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" currentValue \u003d 0;","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" isGoalAchieved \u003d false;","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal with a current value.","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" * @param currentValue The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" public DietGoal(String nutrients, int targetValue, int currentValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" this.currentValue \u003d currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" isGoalAchieved \u003d currentValue \u003e\u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" * Returns the nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" * @return The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" public String getNutrients() {","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" return nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" * Sets the nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" public void setNutrients(String nutrients) {","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" * Returns the target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" * @return The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" public int getTargetValue() {","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" return targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" * Sets the target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" public void setTargetValue(int targetValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" setIsGoalAchieved(currentValue \u003e\u003d targetValue);","lastModifiedDate":"2023-10-13"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" * Returns the current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" * @return The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" public int getCurrentValue() {","lastModifiedDate":"2023-10-13"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" return currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" * Sets the current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" * @param currentValue The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" public void setCurrentValue(int currentValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" this.currentValue \u003d currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" setIsGoalAchieved(currentValue \u003e\u003d targetValue);","lastModifiedDate":"2023-10-14"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" * Returns whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" * @return Whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" public boolean getIsGoalAchieved() {","lastModifiedDate":"2023-10-13"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":" return isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" * Sets whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" * @param isGoalAchieved Whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":" private void setIsGoalAchieved(boolean isGoalAchieved) {","lastModifiedDate":"2023-10-13"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":" this.isGoalAchieved \u003d isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":" * Returns the string representation of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" * @return The string representation of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" return nutrients + \" intake progress: (\" + currentValue + \"/\" + targetValue + \")\\n\";","lastModifiedDate":"2023-10-14"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":124,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":6,"nihalzp":118}},{"path":"src/main/java/athleticli/data/diet/DietGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":" * Represents a list of diet goals.","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class DietGoalList extends ArrayList\u003cDietGoal\u003e implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" public DietGoalList() {","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" super();","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c size(); i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" result.append(\"\\t\").append(i + 1).append(\". \").append(get(i).toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" if (i !\u003d size() - 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" result.append(\"\\n\");","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" return result.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":7,"yicheng-toh":1,"nihalzp":25}},{"path":"src/main/java/athleticli/data/diet/DietList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Represents a list of diets.","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"public class DietList extends ArrayList\u003cDiet\u003e implements Serializable, Findable {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" public DietList() {","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" super();","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c size(); i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" result.append(i + 1).append(\". \").append(get(i).toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" if (i !\u003d size() - 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" result.append(\"\\n\");","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" return result.toString();","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * Returns a list of diets matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" * @return A list of diets matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" ArrayList\u003cObject\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" for (Diet diet : this) {","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" if (diet.getDateTime().toLocalDate().equals(date)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" result.add(diet);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" return result;","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":19,"nihalzp":35}},{"path":"src/main/java/athleticli/data/sleep/Sleep.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":" * Represents a sleep record.","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Sleep implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private static final DateTimeFormatter DATE_TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"dd-MM-YYYY HH:mm\");","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" * Constructor for Sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" * @param from Start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" * @param to End time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" public Sleep(LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" * toString method for Sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" * @return String representation of the sleep record.","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" return \"sleep record from \" + from.format(DATE_TIME_FORMATTER) + \" to \" + to.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"DaDevChia":32}},{"path":"src/main/java/athleticli/data/sleep/SleepGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class SleepGoal implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":6,"DaDevChia":4}},{"path":"src/main/java/athleticli/data/sleep/SleepGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class SleepGoalList extends ArrayList\u003cSleepGoal\u003e implements Serializable {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":7,"DaDevChia":3}},{"path":"src/main/java/athleticli/data/sleep/SleepList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":" * Represents a list of sleep records.","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"public class SleepList extends ArrayList\u003cSleep\u003e implements Findable {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * Returns a list of sleeps matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * @return A list of sleeps matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":20,"DaDevChia":3}},{"path":"src/main/java/athleticli/exceptions/AthletiException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.exceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Represents the exceptions that need to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class AthletiException extends Exception {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public AthletiException(String message) {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" super(message);","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":10}},{"path":"src/main/java/athleticli/storage/Config.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Defines string literals or configurations used for file storage.","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class Config {","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String PATH_SAVE \u003d \"./data/athleticli.bin\";","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":8}},{"path":"src/main/java/athleticli/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.io.FileInputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.io.FileOutputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.io.ObjectInputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import java.io.ObjectOutputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods for file storage.","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"public class Storage {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" * Returns the data read from the file, or an empty \u003ccode\u003eData\u003c/code\u003e","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * object if the file does not exist or cannot be parsed properly.","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @return The data read from the file, or an empty \u003ccode\u003eData\u003c/code\u003e object.","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" public static Data load() {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" try (var fileInputStream \u003d new FileInputStream(Config.PATH_SAVE);","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" var objectInputStream \u003d new ObjectInputStream(fileInputStream)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" return (Data) objectInputStream.readObject();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" return new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" * Saves the data into the file.","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" * @param data The data to be saved.","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" * @throws IOException","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" public static void save(Data data) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" File file \u003d new File(Config.PATH_SAVE);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" if (!file.exists()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" file.getParentFile().mkdirs();","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" file.createNewFile();","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" var fileOutputStream \u003d new FileOutputStream(file, false);","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" var objectOutputStream \u003d new ObjectOutputStream(fileOutputStream);","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" objectOutputStream.writeObject(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":47}},{"path":"src/main/java/athleticli/ui/CommandName.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Defines string literals for command names.","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class CommandName {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_BYE \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_HELP \u003d \"help\";","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_SAVE \u003d \"save\";","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_FIND \u003d \"find\";","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_ADD \u003d \"add-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_EDIT \u003d \"edit-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_DELETE \u003d \"delete-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_LIST \u003d \"list-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_SLEEP_FIND \u003d \"find-sleep\";","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_RUN \u003d \"add-run\";","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY \u003d \"add-activity\";","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_CYCLE \u003d \"add-cycle\";","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_SWIM \u003d \"add-swim\";","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_DELETE \u003d \"delete-activity\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_LIST \u003d \"list-activity\";","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_EDIT \u003d \"edit-activity\";","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_ACTIVITY_FIND \u003d \"find-activity\";","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_RUN_EDIT \u003d \"edit-run\";","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_CYCLE_EDIT \u003d \"edit-cycle\";","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_SWIM_EDIT \u003d \"edit-swim\";","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_GOAL_SET \u003d \"set-activity-goal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_SET \u003d \"set-diet-goal\";","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_EDIT \u003d \"edit-diet-goal\";","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_LIST \u003d \"list-diet-goal\";","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_DELETE \u003d \"delete-diet-goal\";","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_ADD \u003d \"add-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_DELETE \u003d \"delete-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_EDIT \u003d \"edit-diet\";","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_LIST \u003d \"list-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_DIET_FIND \u003d \"find-diet\";","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":18,"DaDevChia":6,"AlWo223":11,"yicheng-toh":4,"nihalzp":4}},{"path":"src/main/java/athleticli/ui/Message.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"public class Message {","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" public static final String PROMPT \u003d \"\u003e \";","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" public static final String LINE \u003d \"____________________________________________________________\\n\";","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" public static final String PREFIX_MESSAGE \u003d \" \";","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String PREFIX_EXCEPTION \u003d \"OOPS!!! \";","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_BYE \u003d \"Bye. Hope to see you again soon!\";","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" public static final String[] MESSAGE_HELLO \u003d {\"Hello! I\u0027m AthletiCLI!\", \"What can I do for you?\"};","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_SAVE \u003d \"File saved successfully!\";","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_CAPTION_MISSING \u003d \"The caption of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DURATION_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"duration/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DISTANCE_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"distance/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATETIME_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"datetime/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" \"Please specify the calories burned using \\\"calories/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_SPORT_MISSING \u003d \"Please specify the sport using \\\"sport/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_TYPE_MISSING \u003d \"Please specify the goal type using \\\"type/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_PERIOD_MISSING \u003d \"Please specify the period using \\\"period/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_TARGET_MISSING \u003d \"Please specify the target value using \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" \"\\\"target/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" \"Please specify the protein intake using \\\"protein/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" \"Please specify the carbohydrate intake using \\\"carb/\\\"!\";","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_MISSING \u003d \"Please specify the fat intake using \\\"fat/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DATETIME_MISSING \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" \"Please specify the datetime of the diet using \\\"datetime/\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_CAPTION_EMPTY \u003d \"The caption of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DURATION_EMPTY \u003d \"The duration of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DISTANCE_EMPTY \u003d \"The distance of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DATETIME_EMPTY \u003d \"The datetime of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_EMPTY \u003d \"The calories burned cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_EMPTY \u003d \"The protein intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_EMPTY \u003d \"The carbohydrate intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_EMPTY \u003d \"The fat intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DATETIME_EMPTY \u003d \"The datetime of a diet cannot be empty!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_UPDATED \u003d \"Ok, I\u0027ve updated this diet:\";","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DURATION_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" \"The duration of an activity must be in the format \\\"hh:mm:ss\\\"!\";","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DISTANCE_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" \"The distance of an activity must be a positive integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DISTANCE_NEGATIVE \u003d","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" \"The distance of an activity cannot be negative!\";","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TARGET_NEGATIVE \u003d \"The target value cannot be negative. \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" \"You wanna make progress, not regress ;)\";","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TARGET_INVALID \u003d \"The target value of an activity goal must be a positive \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" \"integer!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATETIME_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" \"The datetime must be in the format \\\"yyyy-MM-dd HH:mm\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATE_INVALID \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" \"The date must be in the format \\\"yyyy-MM-dd\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" \"The calories burned must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_SPORT_INVALID \u003d \"The sport of an activity must be one of the following: \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" \"\\\"running\\\", \\\"cycling\\\", \\\"swimming\\\", \\\"general\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TYPE_INVALID \u003d \"The type of an activity must be either \\\"distance\\\" or \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" \"\\\"duration\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_PERIOD_INVALID \u003d \"The period of an activity must be either \\\"weekly\\\" or \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" \"\\\"monthly\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_INVALID \u003d \"The protein intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" \"The carbohydrate intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_INVALID \u003d \"The fat intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_ACTIVITY_FIND \u003d \"I\u0027ve found these activities:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_ADDED \u003d \"Well done! I\u0027ve added this activity:\";","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_GOAL_ADDED \u003d \"Alright, I\u0027ve added this activity goal:\";","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_DELETED \u003d \"Gotcha, I\u0027ve deleted this activity:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_ADDED \u003d \"Well done! I\u0027ve added this diet:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ELEVATION_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" \"Please specify the elevation gain using \\\"elevation/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_ELEVATION_EMPTY \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":" \"The elevation gain of an activity cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ELEVATION_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" \"The elevation gain of an activity must be an integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_INDEX_INVALID \u003d \"The activity index must be an integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS \u003d \"The activity index does not exist, check your \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" \"list for the correct index!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_SWIMMINGSTYLE_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" \"Please specify the swimming style using \\\"style/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_SWIMMINGSTYLE_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" \"The swimming style of an activity must be one of \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" \"the following: \\\"butterfly\\\", \\\"backstroke\\\", \\\"breaststroke\\\", \\\"freestyle\\\"!\";","lastModifiedDate":"2023-10-13"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ACTIVITY_COUNT \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" \"You have tracked a total of %d activities. Keep pushing!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_LIST \u003d \"These are the activities you have tracked so far:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_EDIT_INVALID \u003d \"Oops, the format of the edit command is wrong! Please\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" \" provide the index and the updated entry!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_UPDATED \u003d \"Ok, I\u0027ve updated this activity:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_COUNT \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of %d diets. Keep grinding!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ACTIVITY_FIRST \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your first activity. This is just the beginning!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT \u003d \"The target value for nutrients \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"yicheng-toh"},"content":" \"must be a positive integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INVALID_NUTRIENT \u003d \"Key word to nutrients goals has to be one of the \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"yicheng-toh"},"content":" \"following: \\\"calories\\\", \\\"protein\\\", \\\"carb\\\", \\\"fats\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_ALREADY_EXISTED \u003d \"Diet goal for %s has already existed. \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"yicheng-toh"},"content":" \"Please edit the goal instead!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_NOT_EXISTED \u003d \"Diet goal for %s is not present. \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"yicheng-toh"},"content":" \"Please add the goal before editing it!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_COUNT \u003d \"Now you have %d diet goal(s).\";","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_NONE \u003d \"There are no goals at the moment. Add a diet goal to start.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_LIST_HEADER \u003d \"These are your goal(s):\\n\";","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT \u003d \"Please provide a positive integer.\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_EMPTY_DIETGOALLIST \u003d \"There is no diet goals at the moment. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"yicheng-toh"},"content":" \"Please add one to continue.\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_DELETE_HEADER \u003d \"The following goal has been deleted:\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_OUT_OF_BOUND \u003d \"Unable to fetch diet goal. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"yicheng-toh"},"content":" \"Please enter a value from 1 to %d.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INSUFFICIENT_INPUT \u003d \"Please input the following keywords \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"yicheng-toh"},"content":" \"to create or edit your diet goals:\\n \\\"calories\\\", \\\"protein\\\", \\\"carb\\\", \\\"fats\\\" \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":117,"author":{"gitId":"yicheng-toh"},"content":" \"followed by the target value.\\n\" + \"\\te.g. calories/100\";","lastModifiedDate":"2023-10-24"},{"lineNumber":118,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSSAGE_DIETGOAL_REPEATED_NUTRIENT \u003d \"Please ensure that there are \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"yicheng-toh"},"content":" \"no repetitions for your diet goal nutrients.\";","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_FIRST \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your first diet. This is just the beginning!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_INVALID_DIET_INDEX \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":" \"The diet index is invalid! Please enter a valid diet index!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_INDEX_TYPE_INVALID \u003d \"The diet index must be a positive integer!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DELETED \u003d \"Noted. I\u0027ve removed this diet:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_LIST \u003d \"Here are the diets in your list:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_DIET_FIND \u003d \"I\u0027ve found these diets:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_NO_CHANGE_REQUESTED \u003d \"No change requested. Specify the appropriate \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" \"parameters to edit the diet.\";","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_DELETE_INVALID_INDEX \u003d \"Invalid index. Please enter a valid index.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_DELETE_RETURN \u003d \"Got it. I\u0027ve deleted this sleep record at index %d: %s\";","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_EDIT_RETURN \u003d \"Got it. I\u0027ve changed this sleep record at index %d:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_LIST \u003d \"Here are the sleep records in your list:\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_LIST_EMPTY \u003d \"You have no sleep records in your list.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_ADD_RETURN_1 \u003d \"Got it. I\u0027ve added this sleep record:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_ADD_RETURN_2 \u003d \"Now you have %d sleep records in the list.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_SLEEP_FIND \u003d \"I\u0027ve found these sleeps:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"DaDevChia"},"content":" \"Invalid date-time format. Please use dd-MM-yyyy HH:mm.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"DaDevChia"},"content":" \"Please specify both the start and end time of your sleep.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":144,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the start time of your sleep before the end time.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_DELETE_NO_INDEX \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the index of the sleep record you want to delete.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_EDIT_NO_INDEX \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the index of the sleep record you want to edit.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE \u003d ","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" \"The index of the sleep record you want to edit is out of bounds.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_SLEEP_DELETE_INDEX_OOBE \u003d","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" \"The index of the sleep record you want to delete is out of bounds.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"I\u0027m sorry, but I don\u0027t know what that means :-(\";","lastModifiedDate":"2023-10-16"},{"lineNumber":155,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_IO_EXCEPTION \u003d \"An I/O exception occurred.\";","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":157,"author":{"gitId":"skylee03"},"content":" /* Help Messages */","lastModifiedDate":"2023-10-21"},{"lineNumber":158,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY","lastModifiedDate":"2023-10-21"},{"lineNumber":159,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME\";","lastModifiedDate":"2023-10-21"},{"lineNumber":160,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_RUN \u003d CommandName.COMMAND_RUN","lastModifiedDate":"2023-10-21"},{"lineNumber":161,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":162,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_SWIM \u003d CommandName.COMMAND_SWIM","lastModifiedDate":"2023-10-21"},{"lineNumber":163,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS\";","lastModifiedDate":"2023-10-21"},{"lineNumber":164,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_CYCLE \u003d CommandName.COMMAND_CYCLE","lastModifiedDate":"2023-10-21"},{"lineNumber":165,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":166,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":167,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":168,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_LIST","lastModifiedDate":"2023-10-21"},{"lineNumber":169,"author":{"gitId":"skylee03"},"content":" + \" [-d]\";","lastModifiedDate":"2023-10-21"},{"lineNumber":170,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":171,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME\";","lastModifiedDate":"2023-10-21"},{"lineNumber":172,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_RUN \u003d CommandName.COMMAND_RUN_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":173,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":174,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_SWIM \u003d CommandName.COMMAND_SWIM_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":175,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS\";","lastModifiedDate":"2023-10-21"},{"lineNumber":176,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_CYCLE \u003d CommandName.COMMAND_CYCLE_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":177,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":178,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":180,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_DIET \u003d CommandName.COMMAND_DIET_ADD","lastModifiedDate":"2023-10-21"},{"lineNumber":181,"author":{"gitId":"nihalzp"},"content":" + \" calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME\";","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"nihalzp"},"content":" public static final String HELP_EDIT_DIET \u003d CommandName.COMMAND_DIET_EDIT","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"nihalzp"},"content":" + \" INDEX calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME\";","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_DIET \u003d CommandName.COMMAND_DIET_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":185,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":186,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_DIET \u003d CommandName.COMMAND_DIET_LIST;","lastModifiedDate":"2023-10-21"},{"lineNumber":187,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_DIET \u003d CommandName.COMMAND_DIET_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":188,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":189,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_SLEEP \u003d CommandName.COMMAND_SLEEP_ADD","lastModifiedDate":"2023-10-21"},{"lineNumber":190,"author":{"gitId":"skylee03"},"content":" + \" start/START end/END\";","lastModifiedDate":"2023-10-21"},{"lineNumber":191,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_SLEEP \u003d CommandName.COMMAND_SLEEP_LIST;","lastModifiedDate":"2023-10-21"},{"lineNumber":192,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_SLEEP \u003d CommandName.COMMAND_SLEEP_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":193,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":194,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_SLEEP \u003d CommandName.COMMAND_SLEEP_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":195,"author":{"gitId":"skylee03"},"content":" + \" INDEX start/START end/END\";","lastModifiedDate":"2023-10-21"},{"lineNumber":196,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_SLEEP \u003d CommandName.COMMAND_SLEEP_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":197,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":198,"author":{"gitId":"skylee03"},"content":" public static final String HELP_SAVE \u003d CommandName.COMMAND_SAVE;","lastModifiedDate":"2023-10-22"},{"lineNumber":199,"author":{"gitId":"skylee03"},"content":" public static final String HELP_BYE \u003d CommandName.COMMAND_BYE;","lastModifiedDate":"2023-10-21"},{"lineNumber":200,"author":{"gitId":"skylee03"},"content":" public static final String HELP_HELP \u003d CommandName.COMMAND_HELP","lastModifiedDate":"2023-10-21"},{"lineNumber":201,"author":{"gitId":"skylee03"},"content":" + \" [COMMAND]\";","lastModifiedDate":"2023-10-21"},{"lineNumber":202,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND \u003d CommandName.COMMAND_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":203,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":204,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DETAILS \u003d","lastModifiedDate":"2023-10-21"},{"lineNumber":205,"author":{"gitId":"skylee03"},"content":" \"Please check our user guide (https://ay2324s1-cs2113-t17-1.github.io/tp/) for details.\";","lastModifiedDate":"2023-10-21"},{"lineNumber":206,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":63,"DaDevChia":22,"AlWo223":35,"yicheng-toh":26,"nihalzp":60}},{"path":"src/main/java/athleticli/ui/NutrientVerifier.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":" * Verify the nutrient from a list of approved nutrients to be log in diet and diet goals","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"public class NutrientVerifier {","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":" public static final Set\u003cString\u003e VERIFIED_NUTRIENTS \u003d Set.of(\"fats\", \"carb\", \"protein\", \"calories\");","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" * Verifies if a nutrient is approved.","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" * @param nutrient","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" * @return boolean value if it is found in the approved list.","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" public static boolean verify(String nutrient) {","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" return VERIFIED_NUTRIENTS.contains(nutrient);","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"yicheng-toh":20}},{"path":"src/main/java/athleticli/ui/Parameter.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"public class Parameter {","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":" public static final String DURATION_SEPARATOR \u003d \"duration/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":" public static final String DISTANCE_SEPARATOR \u003d \"distance/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":" public static final String DATETIME_SEPARATOR \u003d \"datetime/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" public static final String ELEVATION_SEPARATOR \u003d \"elevation/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" public static final String SWIMMING_STYLE_SEPARATOR \u003d \"style/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" public static final String DETAIL_FLAG \u003d \"-d\";","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" public static final String CALORIES_SEPARATOR \u003d \"calories/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" public static final String PROTEIN_SEPARATOR \u003d \"protein/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" public static final String CARB_SEPARATOR \u003d \"carb/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" public static final String FAT_SEPARATOR \u003d \"fat/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" public static final String START_TIME_SEPARATOR \u003d \"start/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" public static final String END_TIME_SEPARATOR \u003d \"end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" public static final String SPORT_SEPARATOR \u003d \"sport/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String TYPE_SEPARATOR \u003d \"type/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String PERIOD_SEPARATOR \u003d \"period/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String TARGET_SEPARATOR \u003d \"target/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"DaDevChia":3,"AlWo223":15,"nihalzp":5}},{"path":"src/main/java/athleticli/ui/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.ByeCommand;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.HelpCommand;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.SaveCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.AddDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.DeleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.DeleteDietGoalCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.EditDietCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.EditDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.diet.FindDietCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.ListDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.ListDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.SetDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.AddSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.DeleteSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.EditSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.sleep.FindSleepCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.ListSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Cycle;","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Swim;","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.AddActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.DeleteActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.EditActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.FindActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.ListActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.SetActivityGoalCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods for command parser.","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":"public class Parser {","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" private static final DateTimeFormatter sleepTimeFormatter \u003d","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm\");","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" * Splits the raw user input into two parts, and then returns them. The first part is the command type,","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" * while the second part is the command arguments. The second part can be empty.","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * @param rawUserInput The raw user input.","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" * @return A string array whose first element is the command type and the second element is the command","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" * arguments.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" public static String[] splitCommandWordAndArgs(String rawUserInput) {","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" assert rawUserInput !\u003d null : \"`rawUserInput` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" final String[] split \u003d rawUserInput.trim().split(\"\\\\s+\", 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" return split.length \u003d\u003d 2 ? split : new String[]{split[0], \"\"};","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" * Parses the raw user input and returns the corresponding command object.","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" * @param rawUserInput The raw user input.","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" * @return An object representing the command.","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" public static Command parseCommand(String rawUserInput) throws AthletiException {","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" assert rawUserInput !\u003d null : \"`rawUserInput` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" final String[] commandTypeAndParams \u003d splitCommandWordAndArgs(rawUserInput);","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":" final String commandType \u003d commandTypeAndParams[0];","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":" final String commandArgs \u003d commandTypeAndParams[1];","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" switch (commandType) {","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_BYE:","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" return new ByeCommand();","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_HELP:","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" return new HelpCommand(commandArgs);","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_SAVE:","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":" return new SaveCommand();","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":" return new FindCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_ADD:","lastModifiedDate":"2023-10-12"},{"lineNumber":96,"author":{"gitId":"DaDevChia"},"content":" return parseSleepAdd(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":97,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_LIST:","lastModifiedDate":"2023-10-12"},{"lineNumber":98,"author":{"gitId":"DaDevChia"},"content":" return new ListSleepCommand();","lastModifiedDate":"2023-10-12"},{"lineNumber":99,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_EDIT:","lastModifiedDate":"2023-10-12"},{"lineNumber":100,"author":{"gitId":"DaDevChia"},"content":" return parseSleepEdit(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_DELETE:","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"DaDevChia"},"content":" return parseSleepDelete(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_SLEEP_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"skylee03"},"content":" return new FindSleepCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY:","lastModifiedDate":"2023-10-13"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseActivity(commandArgs));","lastModifiedDate":"2023-10-13"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_CYCLE:","lastModifiedDate":"2023-10-13"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseRunCycle(commandArgs, false));","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_RUN:","lastModifiedDate":"2023-10-13"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseRunCycle(commandArgs, true));","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_SWIM:","lastModifiedDate":"2023-10-13"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseSwim(commandArgs));","lastModifiedDate":"2023-10-13"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_DELETE:","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":" return new DeleteActivityCommand(parseActivityIndex(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_LIST:","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":" return new ListActivityCommand(parseActivityListDetail(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" return new EditActivityCommand(parseActivityEdit(commandArgs),","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_RUN_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseRunEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_CYCLE_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseCycleEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_SWIM_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseSwimEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_ACTIVITY_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":" return new FindActivityCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_GOAL_SET:","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":" return new SetActivityGoalCommand(parseActivityGoal(commandArgs));","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_SET:","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"yicheng-toh"},"content":" return new SetDietGoalCommand(parseDietGoalSetEdit(commandArgs));","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_EDIT:","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"yicheng-toh"},"content":" return new EditDietGoalCommand(parseDietGoalSetEdit(commandArgs));","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_LIST:","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"yicheng-toh"},"content":" return new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_DELETE:","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"yicheng-toh"},"content":" return new DeleteDietGoalCommand(parseDietGoalDelete(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_ADD:","lastModifiedDate":"2023-10-15"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" return new AddDietCommand(parseDiet(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_EDIT:","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" return new EditDietCommand(parseDietIndex(commandArgs), parseDietEdit(commandArgs));","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_DELETE:","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":" return new DeleteDietCommand(parseDietIndex(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_LIST:","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":" return new ListDietCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_DIET_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":149,"author":{"gitId":"skylee03"},"content":" return new FindDietCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":150,"author":{"gitId":"skylee03"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":151,"author":{"gitId":"skylee03"},"content":" throw new AthletiException(Message.MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":153,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":154,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":155,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":156,"author":{"gitId":"AlWo223"},"content":" * Parses the index of an activity.","lastModifiedDate":"2023-10-15"},{"lineNumber":157,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the index.","lastModifiedDate":"2023-10-15"},{"lineNumber":159,"author":{"gitId":"AlWo223"},"content":" * @return index The parsed Integer index.","lastModifiedDate":"2023-10-15"},{"lineNumber":160,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-15"},{"lineNumber":161,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":162,"author":{"gitId":"AlWo223"},"content":" public static int parseActivityIndex(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"AlWo223"},"content":" final String commandArgsTrimmed \u003d commandArgs.trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":164,"author":{"gitId":"AlWo223"},"content":" int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":165,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":166,"author":{"gitId":"AlWo223"},"content":" index \u003d Integer.parseInt(commandArgsTrimmed);","lastModifiedDate":"2023-10-15"},{"lineNumber":167,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":168,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":169,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":170,"author":{"gitId":"AlWo223"},"content":" return index;","lastModifiedDate":"2023-10-15"},{"lineNumber":171,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":172,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":173,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":174,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated activity for the edit command.","lastModifiedDate":"2023-10-18"},{"lineNumber":175,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated activity.","lastModifiedDate":"2023-10-18"},{"lineNumber":177,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed Activity object.","lastModifiedDate":"2023-10-18"},{"lineNumber":178,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":179,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":180,"author":{"gitId":"AlWo223"},"content":" public static Activity parseActivityEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":182,"author":{"gitId":"AlWo223"},"content":" return parseActivity(arguments.split(\" \", 2)[1]);","lastModifiedDate":"2023-10-17"},{"lineNumber":183,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":184,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":185,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":186,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":187,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":188,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":189,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated run for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated run.","lastModifiedDate":"2023-10-18"},{"lineNumber":192,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed run object.","lastModifiedDate":"2023-10-18"},{"lineNumber":193,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":194,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":195,"author":{"gitId":"AlWo223"},"content":" public static Activity parseRunEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":196,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":197,"author":{"gitId":"AlWo223"},"content":" return parseRunCycle(arguments.split(\" \", 2)[1], true);","lastModifiedDate":"2023-10-17"},{"lineNumber":198,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":199,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":200,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":201,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":202,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":203,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated cycle for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":206,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated cycle.","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed cycle object.","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"AlWo223"},"content":" public static Activity parseCycleEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":211,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":212,"author":{"gitId":"AlWo223"},"content":" return parseRunCycle(arguments.split(\" \", 2)[1], false);","lastModifiedDate":"2023-10-17"},{"lineNumber":213,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":214,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":215,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":216,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":217,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":218,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"AlWo223"},"content":" * Parses the provided update swim for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":221,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated swim.","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed swim object.","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"AlWo223"},"content":" public static Activity parseSwimEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":226,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":227,"author":{"gitId":"AlWo223"},"content":" return parseSwim(arguments.split(\" \", 2)[1]);","lastModifiedDate":"2023-10-17"},{"lineNumber":228,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":229,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":230,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":231,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":232,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":233,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"AlWo223"},"content":" * Parses the index of an activity update for the edit command.","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":236,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the index.","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"AlWo223"},"content":" * @return index The parsed Integer index.","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"AlWo223"},"content":" public static int parseActivityEditIndex(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":241,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":242,"author":{"gitId":"AlWo223"},"content":" return parseActivityIndex(arguments.split(\" \", 2)[0]);","lastModifiedDate":"2023-10-17"},{"lineNumber":243,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":244,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":245,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":246,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":247,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":248,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":249,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for viewing the activity list and returns whether the user wants the detailed","lastModifiedDate":"2023-10-25"},{"lineNumber":250,"author":{"gitId":"nihalzp"},"content":" * view","lastModifiedDate":"2023-10-25"},{"lineNumber":251,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":252,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-17"},{"lineNumber":253,"author":{"gitId":"AlWo223"},"content":" * @return boolean Whether the user wants the detailed view.","lastModifiedDate":"2023-10-17"},{"lineNumber":254,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":255,"author":{"gitId":"AlWo223"},"content":" public static boolean parseActivityListDetail(String commandArgs) {","lastModifiedDate":"2023-10-23"},{"lineNumber":256,"author":{"gitId":"AlWo223"},"content":" return commandArgs.toLowerCase().contains(Parameter.DETAIL_FLAG);","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":258,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":259,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":260,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for an activity and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":261,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":262,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":263,"author":{"gitId":"AlWo223"},"content":" * @return An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":264,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":265,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":266,"author":{"gitId":"AlWo223"},"content":" public static Activity parseActivity(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":267,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":268,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":269,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":270,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":271,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":272,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":273,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":274,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":275,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":276,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":277,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":278,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":279,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":280,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":281,"author":{"gitId":"AlWo223"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":282,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":283,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":284,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":285,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":286,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":287,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":288,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":289,"author":{"gitId":"AlWo223"},"content":" return new Activity(caption, durationParsed, distanceParsed, datetimeParsed);","lastModifiedDate":"2023-10-13"},{"lineNumber":290,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":291,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":292,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":293,"author":{"gitId":"AlWo223"},"content":" * Parses the raw activity duration input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":294,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"AlWo223"},"content":" * @param duration The raw user input containing the duration.","lastModifiedDate":"2023-10-22"},{"lineNumber":296,"author":{"gitId":"AlWo223"},"content":" * @return durationParsed The parsed LocalTime duration.","lastModifiedDate":"2023-10-25"},{"lineNumber":297,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":298,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":299,"author":{"gitId":"AlWo223"},"content":" public static LocalTime parseDuration(String duration) throws AthletiException {","lastModifiedDate":"2023-10-24"},{"lineNumber":300,"author":{"gitId":"AlWo223"},"content":" LocalTime durationParsed;","lastModifiedDate":"2023-10-24"},{"lineNumber":301,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":302,"author":{"gitId":"AlWo223"},"content":" durationParsed \u003d LocalTime.parse(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":303,"author":{"gitId":"AlWo223"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":304,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":305,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":306,"author":{"gitId":"AlWo223"},"content":" return durationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":307,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":308,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":309,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":310,"author":{"gitId":"AlWo223"},"content":" * Parses the raw date time input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":311,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"AlWo223"},"content":" * @param datetime The raw user input containing the date time.","lastModifiedDate":"2023-10-22"},{"lineNumber":313,"author":{"gitId":"AlWo223"},"content":" * @return datetimeParsed The parsed LocalDateTime object.","lastModifiedDate":"2023-10-22"},{"lineNumber":314,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-22"},{"lineNumber":315,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":316,"author":{"gitId":"AlWo223"},"content":" public static LocalDateTime parseDateTime(String datetime) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":317,"author":{"gitId":"AlWo223"},"content":" LocalDateTime datetimeParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":318,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":319,"author":{"gitId":"AlWo223"},"content":" datetimeParsed \u003d LocalDateTime.parse(datetime.replace(\" \", \"T\"));","lastModifiedDate":"2023-10-13"},{"lineNumber":320,"author":{"gitId":"AlWo223"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":321,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":322,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":323,"author":{"gitId":"AlWo223"},"content":" return datetimeParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":324,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":325,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":326,"author":{"gitId":"skylee03"},"content":" public static LocalDate parseDate(String date) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":327,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":328,"author":{"gitId":"skylee03"},"content":" return LocalDate.parse(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":329,"author":{"gitId":"skylee03"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":330,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DATE_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":331,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":332,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":333,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":334,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":335,"author":{"gitId":"AlWo223"},"content":" * Parses the raw activity distance input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":336,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":337,"author":{"gitId":"AlWo223"},"content":" * @param distance The raw user input containing the distance.","lastModifiedDate":"2023-10-22"},{"lineNumber":338,"author":{"gitId":"AlWo223"},"content":" * @return distanceParsed The parsed Integer distance.","lastModifiedDate":"2023-10-22"},{"lineNumber":339,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":340,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":341,"author":{"gitId":"AlWo223"},"content":" public static int parseDistance(String distance) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":342,"author":{"gitId":"AlWo223"},"content":" int distanceParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":343,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":344,"author":{"gitId":"AlWo223"},"content":" distanceParsed \u003d Integer.parseInt(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":345,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":346,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":347,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":348,"author":{"gitId":"AlWo223"},"content":" if (distanceParsed \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":349,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_NEGATIVE);","lastModifiedDate":"2023-10-23"},{"lineNumber":350,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":351,"author":{"gitId":"AlWo223"},"content":" return distanceParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":352,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":353,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":354,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":355,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating an activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":356,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":357,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":358,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":359,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":360,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":361,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":362,"author":{"gitId":"nihalzp"},"content":" public static void checkMissingActivityArguments(int durationIndex, int distanceIndex,","lastModifiedDate":"2023-10-15"},{"lineNumber":363,"author":{"gitId":"nihalzp"},"content":" int datetimeIndex) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":364,"author":{"gitId":"AlWo223"},"content":" if (durationIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":365,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":366,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":367,"author":{"gitId":"AlWo223"},"content":" if (distanceIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":368,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":369,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":370,"author":{"gitId":"AlWo223"},"content":" if (datetimeIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":371,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":372,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":373,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":374,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":375,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":376,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a run or cycle and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":377,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":378,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":379,"author":{"gitId":"AlWo223"},"content":" * @return An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":380,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":381,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":382,"author":{"gitId":"AlWo223"},"content":" public static Activity parseRunCycle(String arguments, boolean isRun) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":383,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":384,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":385,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":386,"author":{"gitId":"AlWo223"},"content":" final int elevationIndex \u003d arguments.indexOf(Parameter.ELEVATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":387,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":388,"author":{"gitId":"AlWo223"},"content":" checkMissingRunCycleArguments(durationIndex, distanceIndex, datetimeIndex, elevationIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":389,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":390,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":391,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":392,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":393,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":394,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":395,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":396,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":397,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":398,"author":{"gitId":"nihalzp"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length(), elevationIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":399,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":400,"author":{"gitId":"AlWo223"},"content":" final String elevation \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":401,"author":{"gitId":"AlWo223"},"content":" arguments.substring(elevationIndex + Parameter.ELEVATION_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":402,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":403,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime, elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":404,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":405,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":406,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":407,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":408,"author":{"gitId":"AlWo223"},"content":" final int elevationParsed \u003d parseElevation(elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":409,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":410,"author":{"gitId":"AlWo223"},"content":" if (isRun) {","lastModifiedDate":"2023-10-17"},{"lineNumber":411,"author":{"gitId":"AlWo223"},"content":" return new Run(caption, durationParsed, distanceParsed, datetimeParsed, elevationParsed);","lastModifiedDate":"2023-10-13"},{"lineNumber":412,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":413,"author":{"gitId":"AlWo223"},"content":" return new Cycle(caption, durationParsed, distanceParsed, datetimeParsed, elevationParsed);","lastModifiedDate":"2023-10-17"},{"lineNumber":414,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":415,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":416,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":417,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":418,"author":{"gitId":"AlWo223"},"content":" * Parses the raw elevation input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":419,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":420,"author":{"gitId":"AlWo223"},"content":" * @param elevation The raw user input containing the elevation.","lastModifiedDate":"2023-10-22"},{"lineNumber":421,"author":{"gitId":"AlWo223"},"content":" * @return elevationParsed The parsed Integer elevation.","lastModifiedDate":"2023-10-22"},{"lineNumber":422,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":423,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":424,"author":{"gitId":"AlWo223"},"content":" public static int parseElevation(String elevation) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":425,"author":{"gitId":"AlWo223"},"content":" int elevationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":426,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":427,"author":{"gitId":"AlWo223"},"content":" elevationParsed \u003d Integer.parseInt(elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":428,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":429,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":430,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":431,"author":{"gitId":"AlWo223"},"content":" return elevationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":432,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":433,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":434,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":435,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating a run or cycle.","lastModifiedDate":"2023-10-22"},{"lineNumber":436,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":437,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":438,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":439,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":440,"author":{"gitId":"AlWo223"},"content":" * @param elevationIndex The position of the elevation separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":441,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":442,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":443,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingRunCycleArguments(int durationIndex, int distanceIndex, int datetimeIndex,","lastModifiedDate":"2023-10-13"},{"lineNumber":444,"author":{"gitId":"AlWo223"},"content":" int elevationIndex) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":445,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":446,"author":{"gitId":"AlWo223"},"content":" if (elevationIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":447,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":448,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":449,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":450,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":451,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":452,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating a swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":453,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":454,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":455,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":456,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":457,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyleIndex The position of the swimming style separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":458,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":459,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":460,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingSwimArguments(int durationIndex, int distanceIndex, int datetimeIndex,","lastModifiedDate":"2023-10-13"},{"lineNumber":461,"author":{"gitId":"AlWo223"},"content":" int swimmingStyleIndex) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":462,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":463,"author":{"gitId":"AlWo223"},"content":" if (swimmingStyleIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":464,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":465,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":466,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":467,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":468,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":469,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating an activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":470,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":471,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":472,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":473,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":474,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":475,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":476,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":477,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":478,"author":{"gitId":"nihalzp"},"content":" String datetime) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":479,"author":{"gitId":"AlWo223"},"content":" if (caption.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":480,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_CAPTION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":481,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":482,"author":{"gitId":"AlWo223"},"content":" if (duration.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":483,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":484,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":485,"author":{"gitId":"AlWo223"},"content":" if (distance.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":486,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":487,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":488,"author":{"gitId":"AlWo223"},"content":" if (datetime.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":489,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":490,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":491,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":492,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":493,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":494,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating a cycle or run.","lastModifiedDate":"2023-10-22"},{"lineNumber":495,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":496,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":497,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":498,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":499,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":500,"author":{"gitId":"AlWo223"},"content":" * @param elevation The elevation of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":501,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":502,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":503,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":504,"author":{"gitId":"nihalzp"},"content":" String datetime,","lastModifiedDate":"2023-10-15"},{"lineNumber":505,"author":{"gitId":"AlWo223"},"content":" String elevation) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":506,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":507,"author":{"gitId":"AlWo223"},"content":" if (elevation.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":508,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":509,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":510,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":511,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":512,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":513,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating a swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":514,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":515,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":516,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":517,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":518,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":519,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyleIndex The position of the swimming style separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":520,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":521,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":522,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":523,"author":{"gitId":"nihalzp"},"content":" String datetime,","lastModifiedDate":"2023-10-25"},{"lineNumber":524,"author":{"gitId":"nihalzp"},"content":" int swimmingStyleIndex) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":525,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":526,"author":{"gitId":"AlWo223"},"content":" if (swimmingStyleIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":527,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":528,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":529,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":530,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":531,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":532,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a swim and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":533,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":534,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":535,"author":{"gitId":"AlWo223"},"content":" * @return activity An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":536,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":537,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":538,"author":{"gitId":"AlWo223"},"content":" public static Activity parseSwim(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":539,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":540,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":541,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-23"},{"lineNumber":542,"author":{"gitId":"AlWo223"},"content":" final int swimmingStyleIndex \u003d arguments.indexOf(Parameter.SWIMMING_STYLE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":543,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":544,"author":{"gitId":"AlWo223"},"content":" checkMissingSwimArguments(durationIndex, distanceIndex, datetimeIndex, swimmingStyleIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":545,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":546,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":547,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":548,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":549,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":550,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":551,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":552,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":553,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":554,"author":{"gitId":"nihalzp"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length(), swimmingStyleIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":555,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":556,"author":{"gitId":"AlWo223"},"content":" final String swimmingStyle \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":557,"author":{"gitId":"AlWo223"},"content":" arguments.substring(swimmingStyleIndex + Parameter.SWIMMING_STYLE_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":558,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":559,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime, swimmingStyleIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":560,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":561,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":562,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":563,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":564,"author":{"gitId":"AlWo223"},"content":" final Swim.SwimmingStyle swimmingStyleParsed \u003d parseSwimmingStyle(swimmingStyle);","lastModifiedDate":"2023-10-13"},{"lineNumber":565,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":566,"author":{"gitId":"AlWo223"},"content":" return new Swim(caption, durationParsed, distanceParsed, datetimeParsed, swimmingStyleParsed);","lastModifiedDate":"2023-10-18"},{"lineNumber":567,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":568,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":569,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":570,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a swimming style and returns the corresponding swimming style object.","lastModifiedDate":"2023-10-22"},{"lineNumber":571,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":572,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyle The raw user input containing the swimming style.","lastModifiedDate":"2023-10-22"},{"lineNumber":573,"author":{"gitId":"AlWo223"},"content":" * @return swimmingStyle An object representing the swimming style.","lastModifiedDate":"2023-10-22"},{"lineNumber":574,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-22"},{"lineNumber":575,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":576,"author":{"gitId":"AlWo223"},"content":" public static Swim.SwimmingStyle parseSwimmingStyle(String swimmingStyle) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":577,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":578,"author":{"gitId":"AlWo223"},"content":" return Swim.SwimmingStyle.valueOf(swimmingStyle.toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":579,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":580,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":581,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":582,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":583,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":584,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":585,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for adding an activity goal and returns the corresponding activity goal object.","lastModifiedDate":"2023-10-27"},{"lineNumber":586,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-27"},{"lineNumber":587,"author":{"gitId":"AlWo223"},"content":" * @return activityGoal An object representing the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":588,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":589,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":590,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal parseActivityGoal(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":591,"author":{"gitId":"AlWo223"},"content":" final int sportIndex \u003d commandArgs.indexOf(Parameter.SPORT_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":592,"author":{"gitId":"AlWo223"},"content":" final int typeIndex \u003d commandArgs.indexOf(Parameter.TYPE_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":593,"author":{"gitId":"AlWo223"},"content":" final int periodIndex \u003d commandArgs.indexOf(Parameter.PERIOD_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":594,"author":{"gitId":"AlWo223"},"content":" final int targetIndex \u003d commandArgs.indexOf(Parameter.TARGET_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":595,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":596,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityGoalArguments(sportIndex, typeIndex, periodIndex, targetIndex);","lastModifiedDate":"2023-10-27"},{"lineNumber":597,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":598,"author":{"gitId":"AlWo223"},"content":" final String sport \u003d commandArgs.substring(sportIndex + Parameter.SPORT_SEPARATOR.length(), typeIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":599,"author":{"gitId":"AlWo223"},"content":" final String type \u003d","lastModifiedDate":"2023-10-27"},{"lineNumber":600,"author":{"gitId":"AlWo223"},"content":" commandArgs.substring(typeIndex + Parameter.TYPE_SEPARATOR.length(), periodIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":601,"author":{"gitId":"AlWo223"},"content":" final String period \u003d","lastModifiedDate":"2023-10-27"},{"lineNumber":602,"author":{"gitId":"AlWo223"},"content":" commandArgs.substring(periodIndex + Parameter.PERIOD_SEPARATOR.length(), targetIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":603,"author":{"gitId":"AlWo223"},"content":" final String target \u003d commandArgs.substring(targetIndex + Parameter.TARGET_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":604,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":605,"author":{"gitId":"AlWo223"},"content":" final ActivityGoal.Sport sportParsed \u003d parseSport(sport);","lastModifiedDate":"2023-10-27"},{"lineNumber":606,"author":{"gitId":"AlWo223"},"content":" final ActivityGoal.GoalType typeParsed \u003d parseGoalType(type);","lastModifiedDate":"2023-10-27"},{"lineNumber":607,"author":{"gitId":"AlWo223"},"content":" final Goal.Timespan periodParsed \u003d parsePeriod(period);","lastModifiedDate":"2023-10-27"},{"lineNumber":608,"author":{"gitId":"AlWo223"},"content":" final int targetParsed \u003d parseTarget(target);","lastModifiedDate":"2023-10-27"},{"lineNumber":609,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":610,"author":{"gitId":"AlWo223"},"content":" return new ActivityGoal(periodParsed, typeParsed, sportParsed, targetParsed);","lastModifiedDate":"2023-10-27"},{"lineNumber":611,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":612,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":613,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":614,"author":{"gitId":"AlWo223"},"content":" * Parses the sport input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":615,"author":{"gitId":"AlWo223"},"content":" * @param sport The raw user input containing the sport.","lastModifiedDate":"2023-10-27"},{"lineNumber":616,"author":{"gitId":"AlWo223"},"content":" * @return sportParsed The parsed Sport object.","lastModifiedDate":"2023-10-27"},{"lineNumber":617,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":618,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":619,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal.Sport parseSport(String sport) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":620,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":621,"author":{"gitId":"AlWo223"},"content":" return ActivityGoal.Sport.valueOf(sport.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":622,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":623,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SPORT_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":624,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":625,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":626,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":627,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":628,"author":{"gitId":"AlWo223"},"content":" * Parses the goal type input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":629,"author":{"gitId":"AlWo223"},"content":" * @param type The raw user input containing the goal type.","lastModifiedDate":"2023-10-27"},{"lineNumber":630,"author":{"gitId":"AlWo223"},"content":" * @return goalParsed The parsed GoalType object.","lastModifiedDate":"2023-10-27"},{"lineNumber":631,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":632,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":633,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal.GoalType parseGoalType(String type) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":634,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":635,"author":{"gitId":"AlWo223"},"content":" return ActivityGoal.GoalType.valueOf(type.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":636,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":637,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TYPE_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":638,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":639,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":640,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":641,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":642,"author":{"gitId":"AlWo223"},"content":" * Parses the period input provided by the user","lastModifiedDate":"2023-10-27"},{"lineNumber":643,"author":{"gitId":"AlWo223"},"content":" * @param period The raw user input containing the period.","lastModifiedDate":"2023-10-27"},{"lineNumber":644,"author":{"gitId":"AlWo223"},"content":" * @return periodParsed The parsed Period object.","lastModifiedDate":"2023-10-27"},{"lineNumber":645,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":646,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":647,"author":{"gitId":"AlWo223"},"content":" public static Goal.Timespan parsePeriod(String period) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":648,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":649,"author":{"gitId":"AlWo223"},"content":" return Goal.Timespan.valueOf(period.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":650,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":651,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_PERIOD_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":652,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":653,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":654,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":655,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":656,"author":{"gitId":"AlWo223"},"content":" * Parses the target input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":657,"author":{"gitId":"AlWo223"},"content":" * @param target The raw user input containing the target value.","lastModifiedDate":"2023-10-27"},{"lineNumber":658,"author":{"gitId":"AlWo223"},"content":" * @return targetParsed The parsed Integer target value.","lastModifiedDate":"2023-10-27"},{"lineNumber":659,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not a positive number.","lastModifiedDate":"2023-10-27"},{"lineNumber":660,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":661,"author":{"gitId":"AlWo223"},"content":" public static int parseTarget(String target) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":662,"author":{"gitId":"AlWo223"},"content":" int targetParsed;","lastModifiedDate":"2023-10-27"},{"lineNumber":663,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":664,"author":{"gitId":"AlWo223"},"content":" targetParsed \u003d Integer.parseInt(target);","lastModifiedDate":"2023-10-27"},{"lineNumber":665,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":666,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TARGET_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":667,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":668,"author":{"gitId":"AlWo223"},"content":" if (targetParsed \u003c 0) {","lastModifiedDate":"2023-10-27"},{"lineNumber":669,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TARGET_NEGATIVE);","lastModifiedDate":"2023-10-27"},{"lineNumber":670,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":671,"author":{"gitId":"AlWo223"},"content":" return targetParsed;","lastModifiedDate":"2023-10-27"},{"lineNumber":672,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":673,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":674,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":675,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating an activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":676,"author":{"gitId":"AlWo223"},"content":" * @param sportIndex The position of the sport separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":677,"author":{"gitId":"AlWo223"},"content":" * @param targetIndex The position of the target separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":678,"author":{"gitId":"AlWo223"},"content":" * @param periodIndex The position of the period separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":679,"author":{"gitId":"AlWo223"},"content":" * @param valueIndex The position of the value separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":680,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-27"},{"lineNumber":681,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":682,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingActivityGoalArguments(int sportIndex, int targetIndex, int periodIndex,","lastModifiedDate":"2023-10-27"},{"lineNumber":683,"author":{"gitId":"AlWo223"},"content":" int valueIndex) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":684,"author":{"gitId":"AlWo223"},"content":" if (sportIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":685,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_SPORT_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":686,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":687,"author":{"gitId":"AlWo223"},"content":" if (targetIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":688,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_TARGET_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":689,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":690,"author":{"gitId":"AlWo223"},"content":" if (periodIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":691,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_PERIOD_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":692,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":693,"author":{"gitId":"AlWo223"},"content":" if (valueIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":694,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_TARGET_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":695,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":696,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":697,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":698,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":699,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for an add sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":700,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":701,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":702,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the slee0 add command.","lastModifiedDate":"2023-10-16"},{"lineNumber":703,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":704,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":705,"author":{"gitId":"DaDevChia"},"content":" public static AddSleepCommand parseSleepAdd(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":706,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":707,"author":{"gitId":"DaDevChia"},"content":" int startMarkerPos \u003d commandArgs.indexOf(Parameter.START_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":708,"author":{"gitId":"DaDevChia"},"content":" int endMarkerPos \u003d commandArgs.indexOf(Parameter.END_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":709,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":710,"author":{"gitId":"DaDevChia"},"content":" if (startMarkerPos \u003d\u003d -1 || endMarkerPos \u003d\u003d -1 || startMarkerPos \u003e endMarkerPos) {","lastModifiedDate":"2023-10-17"},{"lineNumber":711,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":712,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":713,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":714,"author":{"gitId":"DaDevChia"},"content":" String startTimeStr \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":715,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(startMarkerPos + Parameter.START_TIME_SEPARATOR.length(), endMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":716,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":717,"author":{"gitId":"nihalzp"},"content":" String endTimeStr \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":718,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(endMarkerPos + Parameter.END_TIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":719,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":720,"author":{"gitId":"DaDevChia"},"content":" if (startTimeStr.isEmpty() || endTimeStr.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":721,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":722,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":723,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":724,"author":{"gitId":"DaDevChia"},"content":" // Convert the strings to LocalDateTime","lastModifiedDate":"2023-10-17"},{"lineNumber":725,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime startTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":726,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime endTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":727,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":728,"author":{"gitId":"DaDevChia"},"content":" startTime \u003d LocalDateTime.parse(startTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":729,"author":{"gitId":"DaDevChia"},"content":" endTime \u003d LocalDateTime.parse(endTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":730,"author":{"gitId":"DaDevChia"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":731,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":732,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":733,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":734,"author":{"gitId":"DaDevChia"},"content":" //Check if the start time is before the end time","lastModifiedDate":"2023-10-17"},{"lineNumber":735,"author":{"gitId":"DaDevChia"},"content":" if (startTime.isAfter(endTime)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":736,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START);","lastModifiedDate":"2023-10-17"},{"lineNumber":737,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":738,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":739,"author":{"gitId":"DaDevChia"},"content":" return new AddSleepCommand(startTime, endTime);","lastModifiedDate":"2023-10-12"},{"lineNumber":740,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":741,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":742,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":743,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for a delete sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":744,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":745,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":746,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the sleep delete command.","lastModifiedDate":"2023-10-16"},{"lineNumber":747,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":748,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":749,"author":{"gitId":"DaDevChia"},"content":" public static DeleteSleepCommand parseSleepDelete(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":750,"author":{"gitId":"DaDevChia"},"content":" int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":751,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":752,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":753,"author":{"gitId":"DaDevChia"},"content":" index \u003d Integer.parseInt(commandArgs.trim());","lastModifiedDate":"2023-10-12"},{"lineNumber":754,"author":{"gitId":"DaDevChia"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":755,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_DELETE_NO_INDEX);","lastModifiedDate":"2023-10-17"},{"lineNumber":756,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":757,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":758,"author":{"gitId":"DaDevChia"},"content":" return new DeleteSleepCommand(index);","lastModifiedDate":"2023-10-12"},{"lineNumber":759,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":760,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":761,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":762,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for an edit sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":763,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":764,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":765,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the sleep edit command.","lastModifiedDate":"2023-10-16"},{"lineNumber":766,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":767,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":768,"author":{"gitId":"DaDevChia"},"content":" public static EditSleepCommand parseSleepEdit(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":769,"author":{"gitId":"DaDevChia"},"content":" int startMarkerPos \u003d commandArgs.indexOf(Parameter.START_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":770,"author":{"gitId":"DaDevChia"},"content":" int endMarkerPos \u003d commandArgs.indexOf(Parameter.END_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":771,"author":{"gitId":"DaDevChia"},"content":" int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":772,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":773,"author":{"gitId":"DaDevChia"},"content":" if (startMarkerPos \u003d\u003d -1 || endMarkerPos \u003d\u003d -1 || startMarkerPos \u003e endMarkerPos) {","lastModifiedDate":"2023-10-17"},{"lineNumber":774,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":775,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":776,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":777,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":778,"author":{"gitId":"DaDevChia"},"content":" index \u003d Integer.parseInt(commandArgs.substring(0, startMarkerPos).trim());","lastModifiedDate":"2023-10-12"},{"lineNumber":779,"author":{"gitId":"DaDevChia"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":780,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_EDIT_NO_INDEX);","lastModifiedDate":"2023-10-17"},{"lineNumber":781,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":782,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":783,"author":{"gitId":"DaDevChia"},"content":" String startTimeStr \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":784,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(startMarkerPos + Parameter.START_TIME_SEPARATOR.length(), endMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":785,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":786,"author":{"gitId":"nihalzp"},"content":" String endTimeStr \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":787,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(endMarkerPos + Parameter.END_TIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":788,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":789,"author":{"gitId":"DaDevChia"},"content":" if (startTimeStr.isEmpty() || endTimeStr.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":790,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":791,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":792,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":793,"author":{"gitId":"DaDevChia"},"content":" // Convert the strings to LocalDateTime","lastModifiedDate":"2023-10-17"},{"lineNumber":794,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime startTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":795,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime endTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":796,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":797,"author":{"gitId":"DaDevChia"},"content":" startTime \u003d LocalDateTime.parse(startTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":798,"author":{"gitId":"DaDevChia"},"content":" endTime \u003d LocalDateTime.parse(endTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":799,"author":{"gitId":"DaDevChia"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":800,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":801,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":802,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":803,"author":{"gitId":"DaDevChia"},"content":" //Check if the start time is before the end time","lastModifiedDate":"2023-10-17"},{"lineNumber":804,"author":{"gitId":"DaDevChia"},"content":" if (startTime.isAfter(endTime)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":805,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START);","lastModifiedDate":"2023-10-17"},{"lineNumber":806,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":807,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":808,"author":{"gitId":"DaDevChia"},"content":" return new EditSleepCommand(index, startTime, endTime);","lastModifiedDate":"2023-10-12"},{"lineNumber":809,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":810,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":811,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":812,"author":{"gitId":"yicheng-toh"},"content":" * @param commandArgs User provided data to create goals for the nutrients defined.","lastModifiedDate":"2023-10-15"},{"lineNumber":813,"author":{"gitId":"yicheng-toh"},"content":" * @return a list of diet goals for further checking in the Set Diet Goal Command.","lastModifiedDate":"2023-10-15"},{"lineNumber":814,"author":{"gitId":"yicheng-toh"},"content":" * @throws AthletiException Invalid input by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":815,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":816,"author":{"gitId":"yicheng-toh"},"content":" public static ArrayList\u003cDietGoal\u003e parseDietGoalSetEdit(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-16"},{"lineNumber":817,"author":{"gitId":"yicheng-toh"},"content":" if (commandArgs.trim().isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":818,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INSUFFICIENT_INPUT);","lastModifiedDate":"2023-10-22"},{"lineNumber":819,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":820,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":821,"author":{"gitId":"yicheng-toh"},"content":" String[] nutrientAndTargetValues;","lastModifiedDate":"2023-10-15"},{"lineNumber":822,"author":{"gitId":"yicheng-toh"},"content":" if (commandArgs.contains(\" \")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":823,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValues \u003d commandArgs.split(\"\\\\s+\");","lastModifiedDate":"2023-10-15"},{"lineNumber":824,"author":{"gitId":"yicheng-toh"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":825,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValues \u003d new String[]{commandArgs};","lastModifiedDate":"2023-10-15"},{"lineNumber":826,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":827,"author":{"gitId":"yicheng-toh"},"content":" String[] nutrientAndTargetValue;","lastModifiedDate":"2023-10-15"},{"lineNumber":828,"author":{"gitId":"yicheng-toh"},"content":" String nutrient;","lastModifiedDate":"2023-10-15"},{"lineNumber":829,"author":{"gitId":"yicheng-toh"},"content":" int targetValue;","lastModifiedDate":"2023-10-15"},{"lineNumber":830,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":831,"author":{"gitId":"yicheng-toh"},"content":" ArrayList\u003cDietGoal\u003e dietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":832,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e recordedNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":833,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":834,"author":{"gitId":"yicheng-toh"},"content":" for (int i \u003d 0; i \u003c nutrientAndTargetValues.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":835,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValue \u003d nutrientAndTargetValues[i].split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":836,"author":{"gitId":"yicheng-toh"},"content":" nutrient \u003d nutrientAndTargetValue[0];","lastModifiedDate":"2023-10-15"},{"lineNumber":837,"author":{"gitId":"yicheng-toh"},"content":" targetValue \u003d Integer.parseInt(nutrientAndTargetValue[1]);","lastModifiedDate":"2023-10-15"},{"lineNumber":838,"author":{"gitId":"yicheng-toh"},"content":" if (targetValue \u003d\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":839,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT);","lastModifiedDate":"2023-10-15"},{"lineNumber":840,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":841,"author":{"gitId":"yicheng-toh"},"content":" if (!NutrientVerifier.verify(nutrient)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":842,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INVALID_NUTRIENT);","lastModifiedDate":"2023-10-15"},{"lineNumber":843,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":844,"author":{"gitId":"yicheng-toh"},"content":" if (recordedNutrients.contains(nutrient)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":845,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSSAGE_DIETGOAL_REPEATED_NUTRIENT);","lastModifiedDate":"2023-10-22"},{"lineNumber":846,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":847,"author":{"gitId":"yicheng-toh"},"content":" DietGoal dietGoal \u003d new DietGoal(nutrient, targetValue);","lastModifiedDate":"2023-10-15"},{"lineNumber":848,"author":{"gitId":"yicheng-toh"},"content":" dietGoals.add(dietGoal);","lastModifiedDate":"2023-10-15"},{"lineNumber":849,"author":{"gitId":"yicheng-toh"},"content":" recordedNutrients.add(nutrient);","lastModifiedDate":"2023-10-22"},{"lineNumber":850,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":851,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":852,"author":{"gitId":"yicheng-toh"},"content":" return dietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":853,"author":{"gitId":"yicheng-toh"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":854,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT);","lastModifiedDate":"2023-10-15"},{"lineNumber":855,"author":{"gitId":"yicheng-toh"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":856,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INSUFFICIENT_INPUT);","lastModifiedDate":"2023-10-24"},{"lineNumber":857,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":858,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":859,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":860,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":861,"author":{"gitId":"yicheng-toh"},"content":" * @param deleteIndexString Index of the goal to be deleted in String format","lastModifiedDate":"2023-10-17"},{"lineNumber":862,"author":{"gitId":"yicheng-toh"},"content":" * @return Index of the goal in integer format in users\u0027 perspective.","lastModifiedDate":"2023-10-17"},{"lineNumber":863,"author":{"gitId":"yicheng-toh"},"content":" * @throws AthletiException Catch invalid characters and numbers.","lastModifiedDate":"2023-10-17"},{"lineNumber":864,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":865,"author":{"gitId":"yicheng-toh"},"content":" public static int parseDietGoalDelete(String deleteIndexString) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":866,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":867,"author":{"gitId":"yicheng-toh"},"content":" int deleteIndex \u003d Integer.parseInt(deleteIndexString.trim());","lastModifiedDate":"2023-10-17"},{"lineNumber":868,"author":{"gitId":"yicheng-toh"},"content":" if (deleteIndex \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":869,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":870,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":871,"author":{"gitId":"yicheng-toh"},"content":" return deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":872,"author":{"gitId":"yicheng-toh"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":873,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":874,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":875,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":876,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":877,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":878,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for a diet and returns the corresponding diet object.","lastModifiedDate":"2023-10-15"},{"lineNumber":879,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":880,"author":{"gitId":"nihalzp"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-15"},{"lineNumber":881,"author":{"gitId":"nihalzp"},"content":" * @return An object representing the diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":882,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":883,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":884,"author":{"gitId":"nihalzp"},"content":" public static Diet parseDiet(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":885,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d commandArgs.indexOf(Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":886,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d commandArgs.indexOf(Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":887,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d commandArgs.indexOf(Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":888,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d commandArgs.indexOf(Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":889,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d commandArgs.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":890,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":891,"author":{"gitId":"nihalzp"},"content":" checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos, fatMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":892,"author":{"gitId":"nihalzp"},"content":" datetimeMarkerPos);","lastModifiedDate":"2023-10-25"},{"lineNumber":893,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":894,"author":{"gitId":"nihalzp"},"content":" String calories \u003d commandArgs.substring(caloriesMarkerPos + Parameter.CALORIES_SEPARATOR.length(),","lastModifiedDate":"2023-10-25"},{"lineNumber":895,"author":{"gitId":"nihalzp"},"content":" proteinMarkerPos).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":896,"author":{"gitId":"nihalzp"},"content":" String protein \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":897,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(proteinMarkerPos + Parameter.PROTEIN_SEPARATOR.length(), carbMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":898,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":899,"author":{"gitId":"nihalzp"},"content":" String carb \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":900,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(carbMarkerPos + Parameter.CARB_SEPARATOR.length(), fatMarkerPos).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":901,"author":{"gitId":"nihalzp"},"content":" String fat \u003d commandArgs.substring(fatMarkerPos + Parameter.FAT_SEPARATOR.length(), datetimeMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":902,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":903,"author":{"gitId":"nihalzp"},"content":" String datetime \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":904,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(datetimeMarkerPos + Parameter.DATETIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":905,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":906,"author":{"gitId":"nihalzp"},"content":" checkEmptyDietArguments(calories, protein, carb, fat, datetime);","lastModifiedDate":"2023-10-25"},{"lineNumber":907,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":908,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed \u003d parseCalories(calories);","lastModifiedDate":"2023-10-15"},{"lineNumber":909,"author":{"gitId":"nihalzp"},"content":" int proteinParsed \u003d parseProtein(protein);","lastModifiedDate":"2023-10-15"},{"lineNumber":910,"author":{"gitId":"nihalzp"},"content":" int carbParsed \u003d parseCarb(carb);","lastModifiedDate":"2023-10-15"},{"lineNumber":911,"author":{"gitId":"nihalzp"},"content":" int fatParsed \u003d parseFat(fat);","lastModifiedDate":"2023-10-15"},{"lineNumber":912,"author":{"gitId":"nihalzp"},"content":" LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-25"},{"lineNumber":913,"author":{"gitId":"nihalzp"},"content":" return new Diet(caloriesParsed, proteinParsed, carbParsed, fatParsed, datetimeParsed);","lastModifiedDate":"2023-10-25"},{"lineNumber":914,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":915,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":916,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":917,"author":{"gitId":"nihalzp"},"content":" * Checks if the user input for a diet contains all the required arguments.","lastModifiedDate":"2023-10-15"},{"lineNumber":918,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":919,"author":{"gitId":"nihalzp"},"content":" * @param caloriesMarkerPos The position of the calories marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":920,"author":{"gitId":"nihalzp"},"content":" * @param proteinMarkerPos The position of the protein marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":921,"author":{"gitId":"nihalzp"},"content":" * @param carbMarkerPos The position of the carb marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":922,"author":{"gitId":"nihalzp"},"content":" * @param fatMarkerPos The position of the fat marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":923,"author":{"gitId":"nihalzp"},"content":" * @param datetimeMarkerPos The position of the datetime marker.","lastModifiedDate":"2023-10-25"},{"lineNumber":924,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":925,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":926,"author":{"gitId":"nihalzp"},"content":" public static void checkMissingDietArguments(int caloriesMarkerPos, int proteinMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":927,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos, int fatMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":928,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":929,"author":{"gitId":"nihalzp"},"content":" if (caloriesMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":930,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":931,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":932,"author":{"gitId":"nihalzp"},"content":" if (proteinMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":933,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":934,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":935,"author":{"gitId":"nihalzp"},"content":" if (carbMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":936,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":937,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":938,"author":{"gitId":"nihalzp"},"content":" if (fatMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":939,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":940,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":941,"author":{"gitId":"nihalzp"},"content":" if (datetimeMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-25"},{"lineNumber":942,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_DATETIME_MISSING);","lastModifiedDate":"2023-10-25"},{"lineNumber":943,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":944,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":945,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":946,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":947,"author":{"gitId":"nihalzp"},"content":" * Checks if the user input for a diet is empty.","lastModifiedDate":"2023-10-15"},{"lineNumber":948,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":949,"author":{"gitId":"nihalzp"},"content":" * @param calories The calories input.","lastModifiedDate":"2023-10-15"},{"lineNumber":950,"author":{"gitId":"nihalzp"},"content":" * @param protein The protein input.","lastModifiedDate":"2023-10-15"},{"lineNumber":951,"author":{"gitId":"nihalzp"},"content":" * @param carb The carb input.","lastModifiedDate":"2023-10-15"},{"lineNumber":952,"author":{"gitId":"nihalzp"},"content":" * @param fat The fat input.","lastModifiedDate":"2023-10-15"},{"lineNumber":953,"author":{"gitId":"nihalzp"},"content":" * @param datetime The datetime input.","lastModifiedDate":"2023-10-25"},{"lineNumber":954,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":955,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":956,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyDietArguments(String calories, String protein, String carb, String fat,","lastModifiedDate":"2023-10-25"},{"lineNumber":957,"author":{"gitId":"nihalzp"},"content":" String datetime) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":958,"author":{"gitId":"nihalzp"},"content":" if (calories.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":959,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":960,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":961,"author":{"gitId":"nihalzp"},"content":" if (protein.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":962,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":963,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":964,"author":{"gitId":"nihalzp"},"content":" if (carb.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":965,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":966,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":967,"author":{"gitId":"nihalzp"},"content":" if (fat.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":968,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":969,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":970,"author":{"gitId":"nihalzp"},"content":" if (datetime.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":971,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_DATETIME_EMPTY);","lastModifiedDate":"2023-10-25"},{"lineNumber":972,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":973,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":974,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":975,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":976,"author":{"gitId":"nihalzp"},"content":" * Parses the calories input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":977,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":978,"author":{"gitId":"nihalzp"},"content":" * @param calories The calories input.","lastModifiedDate":"2023-10-15"},{"lineNumber":979,"author":{"gitId":"nihalzp"},"content":" * @return The parsed calories.","lastModifiedDate":"2023-10-15"},{"lineNumber":980,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":981,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":982,"author":{"gitId":"nihalzp"},"content":" public static int parseCalories(String calories) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":983,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":984,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":985,"author":{"gitId":"nihalzp"},"content":" caloriesParsed \u003d Integer.parseInt(calories);","lastModifiedDate":"2023-10-15"},{"lineNumber":986,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":987,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":988,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":989,"author":{"gitId":"nihalzp"},"content":" if (caloriesParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":990,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":991,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":992,"author":{"gitId":"nihalzp"},"content":" return caloriesParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":993,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":994,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":995,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":996,"author":{"gitId":"nihalzp"},"content":" * Parses the protein input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":997,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":998,"author":{"gitId":"nihalzp"},"content":" * @param protein The protein input.","lastModifiedDate":"2023-10-15"},{"lineNumber":999,"author":{"gitId":"nihalzp"},"content":" * @return The parsed protein.","lastModifiedDate":"2023-10-15"},{"lineNumber":1000,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1001,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1002,"author":{"gitId":"nihalzp"},"content":" public static int parseProtein(String protein) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1003,"author":{"gitId":"nihalzp"},"content":" int proteinParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1004,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1005,"author":{"gitId":"nihalzp"},"content":" proteinParsed \u003d Integer.parseInt(protein);","lastModifiedDate":"2023-10-15"},{"lineNumber":1006,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1007,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1008,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1009,"author":{"gitId":"nihalzp"},"content":" if (proteinParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1010,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1011,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1012,"author":{"gitId":"nihalzp"},"content":" return proteinParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1013,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1014,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1015,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1016,"author":{"gitId":"nihalzp"},"content":" * Parses the carb input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1017,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1018,"author":{"gitId":"nihalzp"},"content":" * @param carb The carb input.","lastModifiedDate":"2023-10-15"},{"lineNumber":1019,"author":{"gitId":"nihalzp"},"content":" * @return The parsed carb.","lastModifiedDate":"2023-10-15"},{"lineNumber":1020,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1021,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1022,"author":{"gitId":"nihalzp"},"content":" public static int parseCarb(String carb) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1023,"author":{"gitId":"nihalzp"},"content":" int carbParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1024,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1025,"author":{"gitId":"nihalzp"},"content":" carbParsed \u003d Integer.parseInt(carb);","lastModifiedDate":"2023-10-15"},{"lineNumber":1026,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1027,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1028,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1029,"author":{"gitId":"nihalzp"},"content":" if (carbParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1030,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1031,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1032,"author":{"gitId":"nihalzp"},"content":" return carbParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1033,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1034,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1035,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1036,"author":{"gitId":"nihalzp"},"content":" * Parses the fat input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1037,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1038,"author":{"gitId":"nihalzp"},"content":" * @param fat The fat input.","lastModifiedDate":"2023-10-15"},{"lineNumber":1039,"author":{"gitId":"nihalzp"},"content":" * @return The parsed fat.","lastModifiedDate":"2023-10-15"},{"lineNumber":1040,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1041,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1042,"author":{"gitId":"nihalzp"},"content":" public static int parseFat(String fat) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1043,"author":{"gitId":"nihalzp"},"content":" int fatParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1044,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1045,"author":{"gitId":"nihalzp"},"content":" fatParsed \u003d Integer.parseInt(fat);","lastModifiedDate":"2023-10-15"},{"lineNumber":1046,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1047,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1048,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1049,"author":{"gitId":"nihalzp"},"content":" if (fatParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1050,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1051,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1052,"author":{"gitId":"nihalzp"},"content":" return fatParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1053,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1054,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1055,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1056,"author":{"gitId":"nihalzp"},"content":" * Parses the index of a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1057,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1058,"author":{"gitId":"nihalzp"},"content":" * @param commandArgs The raw user input containing the index.","lastModifiedDate":"2023-10-15"},{"lineNumber":1059,"author":{"gitId":"nihalzp"},"content":" * @return The parsed index.","lastModifiedDate":"2023-10-15"},{"lineNumber":1060,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":1061,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1062,"author":{"gitId":"nihalzp"},"content":" public static int parseDietIndex(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1063,"author":{"gitId":"nihalzp"},"content":" if (commandArgs \u003d\u003d null || commandArgs.trim().isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1064,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-26"},{"lineNumber":1065,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1066,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1067,"author":{"gitId":"nihalzp"},"content":" String[] words \u003d commandArgs.trim().split(\"\\\\s+\", 2); // Split into parts","lastModifiedDate":"2023-10-26"},{"lineNumber":1068,"author":{"gitId":"nihalzp"},"content":" int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":1069,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1070,"author":{"gitId":"nihalzp"},"content":" index \u003d Integer.parseInt(words[0]);","lastModifiedDate":"2023-10-26"},{"lineNumber":1071,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1072,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1073,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1074,"author":{"gitId":"nihalzp"},"content":" if (index \u003c 1) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1075,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1076,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1077,"author":{"gitId":"nihalzp"},"content":" return index;","lastModifiedDate":"2023-10-15"},{"lineNumber":1078,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1079,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1080,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":1081,"author":{"gitId":"nihalzp"},"content":" * Parses the value for a specific marker in a given argument string.","lastModifiedDate":"2023-10-26"},{"lineNumber":1082,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":1083,"author":{"gitId":"nihalzp"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":1084,"author":{"gitId":"nihalzp"},"content":" * @param marker The marker whose value is to be retrieved.","lastModifiedDate":"2023-10-26"},{"lineNumber":1085,"author":{"gitId":"nihalzp"},"content":" * @return The value associated with the given marker, or an empty string if the marker is not found.","lastModifiedDate":"2023-10-26"},{"lineNumber":1086,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":1087,"author":{"gitId":"nihalzp"},"content":" public static String getValueForMarker(String arguments, String marker) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1088,"author":{"gitId":"nihalzp"},"content":" String patternString \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1089,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1090,"author":{"gitId":"nihalzp"},"content":" if (marker.equals(Parameter.DATETIME_SEPARATOR)) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1091,"author":{"gitId":"nihalzp"},"content":" // Special handling for datetime to capture the date and time","lastModifiedDate":"2023-10-26"},{"lineNumber":1092,"author":{"gitId":"nihalzp"},"content":" patternString \u003d marker + \"(\\\\d{4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2})\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1093,"author":{"gitId":"nihalzp"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":1094,"author":{"gitId":"nihalzp"},"content":" // For other markers, capture a sequence of non-whitespace characters","lastModifiedDate":"2023-10-26"},{"lineNumber":1095,"author":{"gitId":"nihalzp"},"content":" patternString \u003d marker + \"(\\\\S+)\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1096,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1097,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1098,"author":{"gitId":"nihalzp"},"content":" Pattern pattern \u003d Pattern.compile(patternString);","lastModifiedDate":"2023-10-26"},{"lineNumber":1099,"author":{"gitId":"nihalzp"},"content":" Matcher matcher \u003d pattern.matcher(arguments);","lastModifiedDate":"2023-10-26"},{"lineNumber":1100,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1101,"author":{"gitId":"nihalzp"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1102,"author":{"gitId":"nihalzp"},"content":" return matcher.group(1);","lastModifiedDate":"2023-10-26"},{"lineNumber":1103,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1104,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1105,"author":{"gitId":"nihalzp"},"content":" // Return empty string if no match is found","lastModifiedDate":"2023-10-26"},{"lineNumber":1106,"author":{"gitId":"nihalzp"},"content":" return \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1107,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1108,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1109,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":1110,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for a sleep and returns the corresponding sleep object.","lastModifiedDate":"2023-10-26"},{"lineNumber":1111,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":1112,"author":{"gitId":"nihalzp"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":1113,"author":{"gitId":"nihalzp"},"content":" * @return An object representing the sleep.","lastModifiedDate":"2023-10-26"},{"lineNumber":1114,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":1115,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":1116,"author":{"gitId":"nihalzp"},"content":" public static HashMap\u003cString, String\u003e parseDietEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":1117,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":1118,"author":{"gitId":"nihalzp"},"content":" String calories \u003d getValueForMarker(arguments, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1119,"author":{"gitId":"nihalzp"},"content":" String protein \u003d getValueForMarker(arguments, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1120,"author":{"gitId":"nihalzp"},"content":" String carb \u003d getValueForMarker(arguments, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1121,"author":{"gitId":"nihalzp"},"content":" String fat \u003d getValueForMarker(arguments, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1122,"author":{"gitId":"nihalzp"},"content":" String datetime \u003d getValueForMarker(arguments, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1123,"author":{"gitId":"nihalzp"},"content":" if (!calories.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1124,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed \u003d Integer.parseInt(calories);","lastModifiedDate":"2023-10-26"},{"lineNumber":1125,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, Integer.toString(caloriesParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1126,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1127,"author":{"gitId":"nihalzp"},"content":" if (!protein.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1128,"author":{"gitId":"nihalzp"},"content":" int proteinParsed \u003d Integer.parseInt(protein);","lastModifiedDate":"2023-10-26"},{"lineNumber":1129,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, Integer.toString(proteinParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1130,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1131,"author":{"gitId":"nihalzp"},"content":" if (!carb.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1132,"author":{"gitId":"nihalzp"},"content":" int carbParsed \u003d Integer.parseInt(carb);","lastModifiedDate":"2023-10-26"},{"lineNumber":1133,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, Integer.toString(carbParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1134,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1135,"author":{"gitId":"nihalzp"},"content":" if (!fat.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1136,"author":{"gitId":"nihalzp"},"content":" int fatParsed \u003d Integer.parseInt(fat);","lastModifiedDate":"2023-10-26"},{"lineNumber":1137,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, Integer.toString(fatParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1138,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1139,"author":{"gitId":"nihalzp"},"content":" if (!datetime.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1140,"author":{"gitId":"nihalzp"},"content":" LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-26"},{"lineNumber":1141,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, datetimeParsed.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":1142,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1143,"author":{"gitId":"nihalzp"},"content":" if (dietMap.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1144,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_NO_CHANGE_REQUESTED);","lastModifiedDate":"2023-10-26"},{"lineNumber":1145,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1146,"author":{"gitId":"nihalzp"},"content":" return dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":1147,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1148,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":69,"DaDevChia":113,"AlWo223":523,"yicheng-toh":84,"nihalzp":359}},{"path":"src/main/java/athleticli/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.InputStream;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" * Defines the behavior of the CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Ui {","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" private static Ui uiInstance;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" private final PrintStream out;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * Constructs a \u003ccode\u003eUi\u003c/code\u003e object, whose input \u003ccode\u003ein\u003c/code\u003e","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" * and output \u003ccode\u003eout\u003c/code\u003e is the standard input and the standard","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * output, respectively.","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" private Ui() {","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" this(System.in, System.out);","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Constructs a \u003ccode\u003eUi\u003c/code\u003e object, whose input is an \u003ccode\u003eInputStream\u003c/code\u003e","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * object \u003ccode\u003ein\u003c/code\u003e and output is an \u003ccode\u003ePrintStream\u003c/code\u003e object \u003ccode\u003eout\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" * @param in The \u003ccode\u003eInputStream\u003c/code\u003e accepting the user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" * @param out The \u003ccode\u003ePrintStream\u003c/code\u003e displaying the program\u0027s output.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" private Ui(InputStream in, PrintStream out) {","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" assert in !\u003d null : \"Input stream `in` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" assert out !\u003d null : \"Print stream `out` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" this.in \u003d new Scanner(in);","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" this.out \u003d out;","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * Returns the singleton instance of `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * @return The singleton instance of `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" public static Ui getInstance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" if (uiInstance \u003d\u003d null) {","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" uiInstance \u003d new Ui();","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" return uiInstance;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" * Returns the user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" * @return The user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" out.print(Message.PROMPT);","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" return in.nextLine();","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" * Shows the \u003ccode\u003emessages\u003c/code\u003e in a beautiful format.","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * @param messages The messages to be shown.","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" public void showMessages(String... messages) {","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" assert messages !\u003d null : \"Messages should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" out.print(Message.LINE);","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" for (String message : messages) {","lastModifiedDate":"2023-10-08"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" out.println(Message.PREFIX_MESSAGE + message);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" out.println(Message.LINE);","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" * Shows message for exception \u003ccode\u003ee\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" * @param e The exception whose message will be shown.","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" public void showException(Exception e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" assert e !\u003d null : \"Exception `e` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" showMessages(Message.PREFIX_EXCEPTION + e.getMessage());","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" * Shows the welcome message.","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" public void showWelcome() {","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" showMessages(Message.MESSAGE_HELLO);","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":90}},{"path":"src/test/java/athleticli/commands/activity/AddActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"class AddActivityCommandTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private AddActivityCommand addActivityCommand;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" void execute_addsActivity_returnsConfirmationMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this activity:\", run.toString(), \"You have tracked a total of 2 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" void execute_addsFirstActivity_returnsFirstActivityMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this activity:\", run.toString(), \"Now you have tracked your \" +","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" \"first activity. This is just the beginning!\"};","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d addActivityCommand.execute(data);","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":54}},{"path":"src/test/java/athleticli/commands/activity/DeleteActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"class DeleteActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private DeleteActivityCommand deleteActivityCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" void execute_validIndex_activityDeleted() throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Gotcha, I\u0027ve deleted this activity:\", run.toString(), \"You have tracked a total of 0 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" deleteActivityCommand \u003d new DeleteActivityCommand(1);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d deleteActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" deleteActivityCommand \u003d new DeleteActivityCommand(0);","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e deleteActivityCommand.execute(data));","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":50}},{"path":"src/test/java/athleticli/commands/activity/EditActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"class EditActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private AddActivityCommand addActivityCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" addActivityCommand \u003d new AddActivityCommand(activity);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, 60);","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" void execute_validIndex_activityEdited() throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" EditActivityCommand editActivityCommand \u003d new EditActivityCommand(run, 1);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" editActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this activity:\", run.toString(), \"You have tracked a total of 1 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d editActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" assertEquals(run, data.getActivities().get(0));","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" EditActivityCommand editActivityCommand \u003d new EditActivityCommand(run, 2);","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e editActivityCommand.execute(data));","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":52}},{"path":"src/test/java/athleticli/commands/activity/ListActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"class ListActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(activity);","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" // execute twice for 2 activities","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" void execute_detailedFalse_printsShortList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(false);","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", \"1.\" + new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE), \"2.\" + new Activity(CAPTION, DURATION, DISTANCE, DATE)};","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" void execute_detailedTrue_printsDetailedList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(true);","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d listActivityCommand.printDetailedList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" void printList_validInput() {","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(false);","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.printList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", \"1.\" + new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE), \"2.\" + new Activity(CAPTION, DURATION, DISTANCE, DATE)};","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" void printDetailedList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(true);","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.printDetailedList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE).toDetailedString(),","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" new Activity(CAPTION, DURATION, DISTANCE, DATE).toDetailedString()};","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":77}},{"path":"src/test/java/athleticli/commands/activity/SetActivityGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"class SetActivityGoalCommandTest {","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private SetActivityGoalCommand setActivityGoalCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityGoal activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.GoalType goalType \u003d ActivityGoal.GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.Sport sport \u003d ActivityGoal.Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" Timespan period \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" LocalDate date \u003d LocalDate.now();","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, 10000);","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" setActivityGoalCommand \u003d new SetActivityGoalCommand(activityGoal);","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" String caption \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" int distance \u003d 3000;","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" Run run \u003d new Run(caption, duration, distance, LocalDateTime.now(), 0);","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" void execute() {","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d setActivityGoalCommand.execute(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Alright, I\u0027ve added this activity goal:\", activityGoal.toString(data)};","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"AlWo223":50}},{"path":"src/test/java/athleticli/commands/diet/AddDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Tests the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"public class AddDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private AddDietCommand addDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" addDietCommand \u003d new AddDietCommand(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this diet:\", diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your \" + \"first diet. This is just the beginning!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d addDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":42}},{"path":"src/test/java/athleticli/commands/diet/DeleteDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" * Tests the delete diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"public class DeleteDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private DeleteDietCommand deleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" deleteDietCommand \u003d new DeleteDietCommand(1);","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" void execute() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Noted. I\u0027ve removed this diet:\", diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of 0 diets. Keep grinding!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d deleteDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" void execute_invalidIndex_expectException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" deleteDietCommand \u003d new DeleteDietCommand(2);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietCommand.execute(data));","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":50}},{"path":"src/test/java/athleticli/commands/diet/DeleteDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"class DeleteDietGoalCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" void execute_deleteOneItemFromFilledDietGoalList_expectCorrectMessage() {","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" System.out.println(data.getDietGoals());","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d new String[]{\"The following goal has been deleted:\\n\", \"fats intake progress: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\",};","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" void execute_deleteOneItemFromEmptyDietGoalList_expectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(100);","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" void execute_integerExceedListSize_expectAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(100);","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" fail();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yicheng-toh":63}},{"path":"src/test/java/athleticli/commands/diet/EditDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parameter;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"/*","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Contains the tests for EditDietCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"public class EditDietCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 10;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 20;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 30;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" private static final int INDEX \u003d 1;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEdited() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCaloriesGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(CALORIES, 20, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoProteinGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, PROTEIN, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCarbGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, CARB, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoFatGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, FAT, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCaloriesProteinCarbFatGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoDateTimeGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, 40, DATE_TIME);","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(2, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e editDietCommand.execute(data));","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"nihalzp":150}},{"path":"src/test/java/athleticli/commands/diet/EditDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"class EditDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e emptyInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledChangedInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalCarb;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal newDietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" dietGoalCarb \u003d new DietGoal(\"carb\", 10000);","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" newDietGoalFats \u003d new DietGoal(\"fats\", 10);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" emptyInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalCarb);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" filledChangedInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" filledChangedInputDietGoals.add(newDietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(emptyInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\", \"Now you have 0 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d editDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneNewInputDietGoal_expectError() {","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e editDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" void execute_changeOneExistingInputDietGoal_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(filledChangedInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10)\\n\\n\" + \"\\t2. carb intake progress: (0/10000)\\n\", \"Now you have 2 diet goal(s).\"};","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, editDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":73}},{"path":"src/test/java/athleticli/commands/diet/ListDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" * Tests the list diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"public class ListDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private ListDietCommand listDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" listDietCommand \u003d new ListDietCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Here are the diets in your list:\", \"1. \" + diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of 1 diets. Keep grinding!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d listDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":42}},{"path":"src/test/java/athleticli/commands/diet/ListDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"class ListDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_returnNoDietGoalMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"There are no goals at the moment. Add a diet goal to start.\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" ListDietGoalCommand listDietGoalCommand \u003d new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, listDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" void execute_filledInputList_returnDietGoalPresentMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\", \"Now you have 1 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" ListDietGoalCommand listDietGoalCommand \u003d new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, listDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" assert (false);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":49}},{"path":"src/test/java/athleticli/commands/diet/SetDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"class SetDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e emptyInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalCarb;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" emptyInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" dietGoalCarb \u003d new DietGoal(\"carb\", 10000);","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalCarb);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(emptyInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\", \"Now you have 0 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneNewInputDietGoal_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\\n\" + \"\\t2. carb intake progress: (0/10000)\\n\", \"Now you have 2 diet goal(s).\"};","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneExistingInputDietGoal_expectAthletiException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e setDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":70}},{"path":"src/test/java/athleticli/commands/sleep/AddSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"public class AddSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList());","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidInput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from \u003d LocalDateTime.of(2023, 10, 17, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to \u003d LocalDateTime.of(2023, 10, 18, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command \u003d new AddSleepCommand(from, to);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve added this sleep record:\",","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" \"sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" \"Now you have 1 sleep records in the list.\"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteCountingSleepRecords() {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from1 \u003d LocalDateTime.of(2023, 10, 17, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to1 \u003d LocalDateTime.of(2023, 10, 18, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command1 \u003d new AddSleepCommand(from1, to1);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" command1.execute(data); // Add first sleep record","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from2 \u003d LocalDateTime.of(2023, 10, 18, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to2 \u003d LocalDateTime.of(2023, 10, 19, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command2 \u003d new AddSleepCommand(from2, to2);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve added this sleep record:\",","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" \"sleep record from 18-10-2023 22:00 to 19-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" \"Now you have 2 sleep records in the list.\"","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command2.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":57}},{"path":"src/test/java/athleticli/commands/sleep/DeleteSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class DeleteSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand command \u003d new DeleteSleepCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve deleted this sleep record at index 1: sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithInvalidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandNegative \u003d new DeleteSleepCommand(-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandNegative.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandZero \u003d new DeleteSleepCommand(0);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandZero.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandBeyond \u003d new DeleteSleepCommand(3); // Only 2 records in the list.","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandBeyond.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithEmptyList() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList()); // Empty list","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand command \u003d new DeleteSleepCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e command.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":63}},{"path":"src/test/java/athleticli/commands/sleep/EditSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class EditSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand command \u003d new EditSleepCommand(1, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve changed this sleep record at index 1:\",","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" \"original: sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" \"to new: sleep record from 17-10-2023 23:00 to 18-10-2023 07:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithInvalidIndex() {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandNegative \u003d new EditSleepCommand(-1, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandNegative.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandZero \u003d new EditSleepCommand(0, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandZero.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandBeyond \u003d new EditSleepCommand(3, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandBeyond.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"DaDevChia":64}},{"path":"src/test/java/athleticli/commands/sleep/ListSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"public class ListSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithRecords() {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" ListSleepCommand command \u003d new ListSleepCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" \"Here are the sleep records in your list:\\n\",","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" \"1. sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" \"2. sleep record from 18-10-2023 22:00 to 19-10-2023 06:00\"","lastModifiedDate":"2023-10-20"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" }; ","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" String[] actual \u003d command.execute(data);","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithEmptyList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList()); ","lastModifiedDate":"2023-10-20"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" ListSleepCommand command \u003d new ListSleepCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" \"You have no sleep records in your list.\"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" String[] actual \u003d command.execute(data);","lastModifiedDate":"2023-10-20"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-20"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":56}},{"path":"src/test/java/athleticli/data/activity/ActivityGoalTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.activity.ActivityGoal.GoalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.activity.ActivityGoal.Sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"class ActivityGoalTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityList activityList;","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private ActivityGoal activityGoal;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private Timespan period \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private final LocalDate date \u003d LocalDate.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" private final String caption \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" private final int distance \u003d 3000;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" void isAchieved_activityDistanceGoal_true() {","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 8000;","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.GENERAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" LocalDateTime date \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(caption, duration, distance, date);","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d true;","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" void isAchieved_runGoalWithNoTrackedRun_false() {","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 8000;","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" LocalDateTime date \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(caption, duration, distance, date);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d false;","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" void isAchieved_goalAchievedOutsidePeriod_false() {","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 120;","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DURATION;","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.GENERAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateWithinPeriod \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateOutsidePeriod \u003d LocalDateTime.now().minusDays(15);","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" Activity activityWithinPeriod \u003d new Activity(caption, duration, distance, dateWithinPeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" Activity activityOutsidePeriod \u003d new Activity(caption, duration, distance, dateOutsidePeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityWithinPeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityOutsidePeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d false;","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" void getActivityClass() {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DURATION;","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, 0);","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e expected \u003d Run.class;","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e actual \u003d activityGoal.getActivityClass();","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"AlWo223":106}},{"path":"src/test/java/athleticli/data/activity/ActivityListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"class ActivityListTest {","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityList activityList;","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Activity activityFirst;","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private Activity activitySecond;","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" activityList \u003d new ActivityList();","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateSecond \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateFirst \u003d LocalDateTime.now().minusDays(1);","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" activityFirst \u003d new Activity(CAPTION, DURATION, DISTANCE, dateFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" activitySecond \u003d new Activity(CAPTION, DURATION, DISTANCE, dateSecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" activityList.add(activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" void find() {","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.find(LocalDate.now()).get(0), activitySecond);","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.find(LocalDate.now().minusDays(1)).get(0), activityFirst);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" void sort() {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" activityList.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.get(0), activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.get(1), activityFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" void filterByTimespan() {","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" activityList.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredList \u003d activityList.filterByTimespan(Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(0), activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(1), activityFirst);","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" filteredList \u003d activityList.filterByTimespan(Timespan.DAILY);","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(0), activitySecond);","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.size(), 1);","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" void getTotalDistance_activity_totalDistance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 2 * DISTANCE;","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDistance(Activity.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" void getTotalDistance_run_zero() {","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDistance(Run.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" void getTotalDuration_activity_totalTime() {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 2 * DURATION.toSecondOfDay();","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDuration(Activity.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" void getTotalDuration_run_zero() {","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDuration(Run.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"AlWo223":86}},{"path":"src/test/java/athleticli/data/activity/ActivityTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class ActivityTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private Activity activity;","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, activity.getCaption());","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, activity.getMovingTime());","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, activity.getDistance());","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, activity.getStartDateTime());","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Activity] Sunday \u003d Runday | Distance: 18.12 km | Time: 1h 24m | \" +","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, activity.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Activity - Sunday \u003d Runday - October 10, 2023 at 11:21 PM]\\n\" +","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" \"\\tDistance: 18.12 km Time: 1h 24m\\n\" +","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" \"\\tCalories: 0 kcal ...\";","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public void generateDistanceStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateDistanceStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Distance: 18.12 km\";","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public void generateMovingTimeStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 01:24:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" public void generateStartDateTimeStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" public void formatTwoColumns() {","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.formatTwoColumns(\"Distance: 18.12 km\", \"Time: 1h 24m\", 30);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Distance: 18.12 km Time: 1h 24m\";","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" void generateShortMovingTimeStringOutput_hoursNotZero() {","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 1h 24m\";","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" void generateShortMovingTimeStringOutput_hoursZero() {","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" activity \u003d new Activity(CAPTION, LocalTime.of(0, 24, 20), DISTANCE, DATE);","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 24m 20s\";","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":92}},{"path":"src/test/java/athleticli/data/activity/CycleTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class CycleTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Cycling in the afternoon\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(2, 13);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 40460;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 101;","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 7, 14, 0);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Cycle cycle;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" cycle \u003d new Cycle(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, cycle.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, cycle.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, cycle.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, cycle.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(ELEVATION, cycle.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public void calculateAverageSpeed() {","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double expected \u003d 18.25;","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double actual \u003d cycle.calculateAverageSpeed();","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual, 0.005);","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Cycle] Cycling in the afternoon | Distance: 40.46 km | Speed: 18.25 km/h | Time: 2h 13m\" +","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" \" | \"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" + \"October 7, 2023 at 2:00 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, cycle.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Cycle - Cycling in the afternoon - October 7, 2023 at 2:00 PM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 40.46 km Elevation Gain: 101 m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" + \"\\tTime: 2h 13m Avg Speed: 18.25 km/h\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" + \"\\tCalories: 0 kcal Max Speed: tbd\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" String actual \u003d cycle.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" public void generateSpeedStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" String actual \u003d cycle.generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"18.25 km/h\";","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":68}},{"path":"src/test/java/athleticli/data/activity/RunTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class RunTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23,","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, run.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, run.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, run.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, run.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" assertEquals(ELEVATION, run.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" public void calculateAveragePace() {","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double averagePace \u003d run.calculateAveragePace();","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" assertEquals(4.64, averagePace, 0.005);","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public void convertAveragePaceToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"4:38\";","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String actual \u003d run.convertAveragePaceToString();","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Run] Night Run | Distance: 18.12 km | Pace: 4:38 /km | Time: 1h 24m | \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, run.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Run - Night Run - October 10, 2023 at 11:21 PM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 18.12 km Avg Pace: 4:41 /km\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" + \"\\tMoving Time: Time: 1h 25m Elevation Gain: 60 m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" + \"\\tCalories: 0 kcal Steps: 0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" String actual \u003d run.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":66}},{"path":"src/test/java/athleticli/data/activity/SwimTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class SwimTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Afternoon Swim\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(0, 35);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 1000;","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 8, 29, 9, 45);","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final Swim.SwimmingStyle STYLE \u003d Swim.SwimmingStyle.BUTTERFLY;","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Swim swim;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" swim \u003d new Swim(CAPTION, DURATION, DISTANCE, DATE, STYLE);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, swim.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, swim.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, swim.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, swim.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(STYLE, swim.getStyle());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public void calculateAverageLapTime() {","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(105, swim.calculateAverageLapTime());","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" public void calculateLaps() {","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" assertEquals(20, swim.calculateLaps());","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Swim] Afternoon Swim | Distance: 1.00 km | Avg Lap Time: 105s | Time: 35m 0s | \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" \"August 29, 2023 at 9:45 AM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, swim.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Swim - Afternoon Swim - August 29, 2023 at 9:45 AM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 1.00 km Time: 0h 35m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" + \"\\tLaps: 20 Style: BUTTERFLY\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" + \"\\tAvg Lap Time: 105 s Calories: 0 kcal\";","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String actual \u003d swim.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":64}},{"path":"src/test/java/athleticli/data/diet/DietGoalListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"class DietGoalListTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" private DietGoal proteinGoal;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" private DietGoalList dietGoals;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" dietGoals \u003d new DietGoalList();","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" proteinGoal \u003d new DietGoal(\"protein\", PROTEIN);","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" void add_addOneGoal_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" assertEquals(1, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void remove_removeExistingGoal_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" dietGoals.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void remove_removeFromZeroGoals_expectIndexOutOfRangeError() {","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" dietGoals.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" });","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" void get_addOneGoal_expectGetSameGoal() {","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertEquals(proteinGoal, dietGoals.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" void size_initializeArgs_expectZero() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" void size_addTenGoals_expectTen() {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" for (int i \u003d 0; i \u003c 10; i++) {","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" void testToString_oneExistingGoal_expectCorrectFormat() {","lastModifiedDate":"2023-10-11"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"\\t1. protein intake progress: (0/10000)\\n\", dietGoals.toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"yicheng-toh":35,"nihalzp":29}},{"path":"src/test/java/athleticli/data/diet/DietGoalTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"class DietGoalTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" void getNutrients_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"protein\", proteinGoal.getNutrients());","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" void setNutrients_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setNutrients(\"Advanced Protein\");","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"Advanced Protein\", proteinGoal.getNutrients());","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" void getTargetValue_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(10000, proteinGoal.getTargetValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" void setTargetValue_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setTargetValue(10);","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(10, proteinGoal.getTargetValue());","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" void getCurrentValue_initializeCommonArgs_expectZero() {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(0, proteinGoal.getCurrentValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" void setCurrentValue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(20);","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(20, proteinGoal.getCurrentValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueGreaterThanTargetValue_expectTrue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(20000);","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueEqualToTargetValue_expectTrue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueLesserThanTargetValue_expectFalse() {","lastModifiedDate":"2023-10-10"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(100);","lastModifiedDate":"2023-10-10"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertFalse(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" void testToString_initializeCommonArgs_expectCorrectFormat() {","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":74,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"protein intake progress: (0/10000)\\n\", proteinGoal.toString());","lastModifiedDate":"2023-10-10"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"yicheng-toh":75,"nihalzp":1}},{"path":"src/test/java/athleticli/data/diet/DietListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"public class DietListTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20000;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30000;","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40000;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private DietList dietList;","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" dietList \u003d new DietList();","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void add_addOneDiet_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assertEquals(1, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void remove_removeExistingDiet_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" dietList.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" void remove_removeFromZeroDiets_expectIndexOutOfRangeError() {","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" dietList.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" });","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" void get_addOneDiet_expectGetSameDiet() {","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" assertEquals(diet, dietList.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" void size_initializeArgs_expectZero() {","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" void size_addTenDiets_expectTen() {","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c 10; i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" void testToString_oneExistingDiet_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet, dietList.toString());","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" void testToString_twoExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" Diet diet1 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" Diet diet2 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet1);","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet2);","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet1 + \"\\n2. \" + diet2, dietList.toString());","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" void testToString_zeroExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", dietList.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" void testToString_threeExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" Diet diet1 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" Diet diet2 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" Diet diet3 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet1);","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet2);","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet3);","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet1 + \"\\n2. \" + diet2 + \"\\n3. \" + diet3,","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" dietList.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"nihalzp":101}},{"path":"src/test/java/athleticli/data/diet/DietTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"public class DietTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20000;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30000;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40000;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" void getCalories_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" assertEquals(CALORIES, diet.getCalories());","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" void setCalories_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" diet.setCalories(10);","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, diet.getCalories());","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" void getProtein_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" assertEquals(PROTEIN, diet.getProtein());","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" void setProtein_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" diet.setProtein(20);","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertEquals(20, diet.getProtein());","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" void getCarb_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertEquals(CARB, diet.getCarb());","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" void setCarb_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" diet.setCarb(30);","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" assertEquals(30, diet.getCarb());","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" void getFat_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" assertEquals(FAT, diet.getFat());","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" void setFat_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" diet.setFat(40);","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" assertEquals(40, diet.getFat());","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" void getDateTime_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" assertEquals(DATE_TIME, diet.getDateTime());","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" void setDateTime_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" LocalDateTime newDateTime \u003d LocalDateTime.of(2020, 10, 10, 10, 11);","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" diet.setDateTime(newDateTime);","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" assertEquals(newDateTime, diet.getDateTime());","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" void toString_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" String expected \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" \"Calories: 10000 Protein: 20000 Carb: 30000 Fat: 40000 Date: October 10, 2020 at 10:10 AM\";","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, diet.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"nihalzp":86}},{"path":"src/test/java/athleticli/data/sleep/SleepListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class SleepListTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private SleepList sleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" public void testToStringWithEmptyList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" assertEquals(\"[]\", sleepList.toString());","lastModifiedDate":"2023-10-20"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" public void testAddSleep() {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" assertEquals(1, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" assertEquals(sleep1, sleepList.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" public void testRemoveSleep() {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" sleepList.remove(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assertEquals(1, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" assertEquals(sleep2, sleepList.get(0));","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":45}},{"path":"src/test/java/athleticli/data/sleep/SleepTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class SleepTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" from \u003d LocalDateTime.of(2023, 10, 17, 22, 0); // 17-10-2023 22:00","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" to \u003d LocalDateTime.of(2023, 10, 18, 6, 0); // 18-10-2023 06:00","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" public void testToString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" Sleep sleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" String expected \u003d \"sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" assertEquals(expected, sleep.toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":28}},{"path":"src/test/java/athleticli/ui/NutrientVerifierTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"class NutrientVerifierTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" void verify_inputApprovedNutrients_expectTrue() {","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(NutrientVerifier.verify(\"fats\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" void verify_inputUnapprovedNutrients_expectFalse() {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" assertFalse(NutrientVerifier.verify(\"Vitamin A\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"yicheng-toh":18}},{"path":"src/test/java/athleticli/ui/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.ByeCommand;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.AddDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.DeleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.DeleteDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.EditDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.ListDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.ListDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.SetDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.AddSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.DeleteSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.EditSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.ListSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Swim;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal.GoalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal.Sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.checkEmptyDietArguments;","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.checkMissingDietArguments;","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.getValueForMarker;","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCalories;","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCarb;","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDiet;","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDietEdit;","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"import static athleticli.ui.Parser.parseDietGoalDelete;","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":"import static athleticli.ui.Parser.parseDietGoalSetEdit;","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDietIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseFat;","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseProtein;","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.splitCommandWordAndArgs;","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertInstanceOf;","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":"class ParserTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" void splitCommandWordAndArgs_noArgs_expectTwoParts() {","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" final String commandWithNoArgs \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" assertEquals(splitCommandWordAndArgs(commandWithNoArgs).length, 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" void splitCommandWordAndArgs_multipleArgs_expectTwoParts() {","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" final String commandWithMultipleArgs \u003d \"set-diet-goal calories/1 carb/3\";","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" assertEquals(splitCommandWordAndArgs(commandWithMultipleArgs).length, 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" void parseCommand_unknownCommand_expectAthletiException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" final String unknownCommand \u003d \"hello\";","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(unknownCommand));","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" void parseCommand_byeCommand_expectByeCommand() throws AthletiException {","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" final String byeCommand \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" assertInstanceOf(ByeCommand.class, parseCommand(byeCommand));","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_expectAddSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(AddSleepCommand.class, parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingStartExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":92,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingEndExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":93,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":94,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":95,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":96,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":97,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":98,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingBothExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":99,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/ end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":100,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":101,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":102,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":103,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":104,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_invalidDatetimeExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":105,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/07-10-2021 06:00 end/07-10-2021 05:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":106,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":107,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":108,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":109,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_expectEditSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(EditSleepCommand.class, parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":113,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingStartExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":122,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingEndExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":123,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":124,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":125,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":126,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":127,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":128,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingBothExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":129,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/ end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":130,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":131,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":132,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":133,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":134,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_invalidDatetimeExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":135,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/07-10-2021 07:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":136,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":137,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":138,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":139,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":140,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":141,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep abc start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":142,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":143,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":144,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_deleteSleepCommand_expectDeleteSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":" final String deleteSleepCommandString \u003d \"delete-sleep 1\";","lastModifiedDate":"2023-10-14"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(DeleteSleepCommand.class, parseCommand(deleteSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_deleteSleepCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" final String deleteSleepCommandString \u003d \"delete-sleep abc\";","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":158,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_listSleepCommand_expectListSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":159,"author":{"gitId":"DaDevChia"},"content":" final String listSleepCommandString \u003d \"list-sleep\";","lastModifiedDate":"2023-10-14"},{"lineNumber":160,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(ListSleepCommand.class, parseCommand(listSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":161,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":162,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":163,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_setDietGoalCommand_expectSetDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"yicheng-toh"},"content":" final String setDietGoalCommandString \u003d \"set-diet-goal calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(SetDietGoalCommand.class, parseCommand(setDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":167,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":168,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_editDietCommand_expectEditDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"yicheng-toh"},"content":" final String editDietGoalCommandString \u003d \"edit-diet-goal calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(EditDietGoalCommand.class, parseCommand(editDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":175,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":176,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_listDietGoalCommand_expectListDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"yicheng-toh"},"content":" final String listDietCommandString \u003d \"list-diet-goal\";","lastModifiedDate":"2023-10-23"},{"lineNumber":178,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(ListDietGoalCommand.class, parseCommand(listDietCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":180,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":182,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_deleteDietGoalCommand_expectDeleteDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":183,"author":{"gitId":"yicheng-toh"},"content":" final String deleteDietGoalCommandString \u003d \"delete-diet-goal 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":184,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(DeleteDietGoalCommand.class, parseCommand(deleteDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":185,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":186,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_expectAddDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(AddDietCommand.class, parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_expectDeleteDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet 1\";","lastModifiedDate":"2023-10-15"},{"lineNumber":197,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(DeleteDietCommand.class, parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":198,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":199,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":200,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":201,"author":{"gitId":"nihalzp"},"content":" void parseCommand_listDietCommand_expectListDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":202,"author":{"gitId":"nihalzp"},"content":" final String listDietCommandString \u003d \"list-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":203,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(ListDietCommand.class, parseCommand(listDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":204,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":205,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":206,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":207,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":208,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":209,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":210,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":211,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":212,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":213,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":214,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":215,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":216,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":217,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":218,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":219,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":220,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":221,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":222,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":223,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":224,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":225,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":226,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":227,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":228,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":229,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":230,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":231,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingDateTimeExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":232,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 fat/4\";","lastModifiedDate":"2023-10-25"},{"lineNumber":233,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":234,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":235,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":236,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":237,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":238,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":239,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/ protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":240,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":241,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":242,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":243,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":244,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":245,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":246,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/ carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":247,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":248,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":249,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":250,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":251,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":252,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":253,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/ fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":254,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":255,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":256,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":257,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":258,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":259,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":260,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/ datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":261,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":262,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":263,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":264,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":265,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyDateTimeExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":266,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":267,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":268,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":269,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":270,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":271,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":272,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":273,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/abc protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":274,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":275,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":276,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":277,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":278,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":279,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":280,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/abc carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":281,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":282,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":283,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":284,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":285,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":286,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":287,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/abc fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":288,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":289,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":290,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":291,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":292,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":293,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":294,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/abc datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":296,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":297,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":298,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":299,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidDateTimeFormatExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":300,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString1 \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-25"},{"lineNumber":301,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString2 \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":302,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString3 \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":303,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/16-10-2023 10:00:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":304,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString1));","lastModifiedDate":"2023-10-25"},{"lineNumber":305,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString2));","lastModifiedDate":"2023-10-25"},{"lineNumber":306,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString3));","lastModifiedDate":"2023-10-25"},{"lineNumber":307,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":308,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":309,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":310,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":311,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/-1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":313,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":314,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":315,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":316,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":317,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeProteinExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":318,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":319,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/-2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":320,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":321,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":322,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":323,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":324,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeCarbExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":325,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":326,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/-3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":327,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":328,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":329,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":330,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":331,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeFatExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":332,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":333,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/-4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":334,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":335,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":336,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":337,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":338,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":339,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet abc\";","lastModifiedDate":"2023-10-15"},{"lineNumber":340,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":341,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":342,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":343,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":344,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_emptyIndexExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":345,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":346,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":347,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":348,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":349,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":350,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_validIndex_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":351,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":352,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseDietIndex(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":353,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":354,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":355,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":356,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":357,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":358,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":359,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietIndex(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":360,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":361,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":362,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":363,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_nonPositiveIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":364,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"0\";","lastModifiedDate":"2023-10-25"},{"lineNumber":365,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietIndex(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":366,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":367,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":368,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":369,"author":{"gitId":"nihalzp"},"content":" void parseDiet_emptyInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":370,"author":{"gitId":"nihalzp"},"content":" String emptyInput \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":371,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDiet(emptyInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":372,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":373,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":374,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":375,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingCalories_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":376,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":377,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":378,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":379,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":380,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":381,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":382,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":383,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":384,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":385,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":386,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":387,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingProtein_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":388,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":389,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":390,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":391,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":392,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":393,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":394,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":395,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":396,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":397,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":398,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":399,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingCarb_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":400,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":401,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":402,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":403,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":404,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":405,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":406,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":407,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":408,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":409,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":410,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":411,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingFat_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":412,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":413,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":414,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":415,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":416,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":417,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":418,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":419,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":420,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":421,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":422,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":423,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingDatetime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":424,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":425,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":426,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":427,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":428,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":429,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":430,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":431,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":432,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":433,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":434,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":435,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":436,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyCalories_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":437,"author":{"gitId":"nihalzp"},"content":" String emptyCalories \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":438,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":439,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":440,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":441,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":442,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":443,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(emptyCalories, nonEmptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":444,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":445,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":446,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":447,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":448,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyProtein_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":449,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":450,"author":{"gitId":"nihalzp"},"content":" String emptyProtein \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":451,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":452,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":453,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":454,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":455,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, emptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":456,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":457,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":458,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":459,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":460,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyCarb_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":461,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":462,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":463,"author":{"gitId":"nihalzp"},"content":" String emptyCarb \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":464,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":465,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":466,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":467,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, emptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":468,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":469,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":470,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":471,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":472,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyFat_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":473,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":474,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":475,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":476,"author":{"gitId":"nihalzp"},"content":" String emptyFat \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":477,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":478,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":479,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, nonEmptyCarb, emptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":480,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":481,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":482,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":483,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":484,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyDatetime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":485,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":486,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":487,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":488,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"4\";","lastModifiedDate":"2023-10-25"},{"lineNumber":489,"author":{"gitId":"nihalzp"},"content":" String emptyDatetime \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":490,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":491,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":492,"author":{"gitId":"nihalzp"},"content":" emptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":493,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":494,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":495,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":496,"author":{"gitId":"nihalzp"},"content":" void parseCalories_validCalories_returnCalories() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":497,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":498,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseCalories(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":499,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":500,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":501,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":502,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":503,"author":{"gitId":"nihalzp"},"content":" void parseCalories_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":504,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":505,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCalories(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":506,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":507,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":508,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":509,"author":{"gitId":"nihalzp"},"content":" void parseCalories_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":510,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":511,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCalories(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":512,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":513,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":514,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":515,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":516,"author":{"gitId":"nihalzp"},"content":" void parseProtein_validProtein_returnProtein() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":517,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":518,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseProtein(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":519,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":520,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":521,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":522,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":523,"author":{"gitId":"nihalzp"},"content":" void parseProtein_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":524,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":525,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseProtein(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":526,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":527,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":528,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":529,"author":{"gitId":"nihalzp"},"content":" void parseProtein_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":530,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":531,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseProtein(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":532,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":533,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":534,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":535,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":536,"author":{"gitId":"nihalzp"},"content":" void parseCarb_validCarb_returnCarb() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":537,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":538,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseCarb(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":539,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":540,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":541,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":542,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":543,"author":{"gitId":"nihalzp"},"content":" void parseCarb_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":544,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":545,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCarb(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":546,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":547,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":548,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":549,"author":{"gitId":"nihalzp"},"content":" void parseCarb_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":550,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":551,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCarb(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":552,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":553,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":554,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":555,"author":{"gitId":"nihalzp"},"content":" void parseFat_validFat_returnFat() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":556,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":557,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseFat(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":558,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":559,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":560,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":561,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":562,"author":{"gitId":"nihalzp"},"content":" void parseFat_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":563,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":564,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseFat(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":565,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":566,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":567,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":568,"author":{"gitId":"nihalzp"},"content":" void parseFat_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":569,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":570,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseFat(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":571,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":572,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":573,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":574,"author":{"gitId":"nihalzp"},"content":" void getValueForMarker_validInput_returnValue() {","lastModifiedDate":"2023-10-26"},{"lineNumber":575,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":576,"author":{"gitId":"nihalzp"},"content":" String caloriesActual \u003d getValueForMarker(validInput, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":577,"author":{"gitId":"nihalzp"},"content":" String proteinActual \u003d getValueForMarker(validInput, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":578,"author":{"gitId":"nihalzp"},"content":" String carbActual \u003d getValueForMarker(validInput, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":579,"author":{"gitId":"nihalzp"},"content":" String fatActual \u003d getValueForMarker(validInput, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":580,"author":{"gitId":"nihalzp"},"content":" String datetimeActual \u003d getValueForMarker(validInput, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":581,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1\", caloriesActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":582,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"2\", proteinActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":583,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"3\", carbActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":584,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"4\", fatActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":585,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"2023-10-06 10:00\", datetimeActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":586,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":587,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":588,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":589,"author":{"gitId":"nihalzp"},"content":" void getValueForMarker_invalidInput_returnEmptyString() {","lastModifiedDate":"2023-10-26"},{"lineNumber":590,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2 calorie/1 proteins/2 carbs/3 fats/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-26"},{"lineNumber":591,"author":{"gitId":"nihalzp"},"content":" String caloriesActual \u003d getValueForMarker(invalidInput, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":592,"author":{"gitId":"nihalzp"},"content":" String proteinActual \u003d getValueForMarker(invalidInput, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":593,"author":{"gitId":"nihalzp"},"content":" String carbActual \u003d getValueForMarker(invalidInput, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":594,"author":{"gitId":"nihalzp"},"content":" String fatActual \u003d getValueForMarker(invalidInput, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":595,"author":{"gitId":"nihalzp"},"content":" String datetimeActual \u003d getValueForMarker(invalidInput, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":596,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", caloriesActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":597,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", proteinActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":598,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", carbActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":599,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", fatActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":600,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", datetimeActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":601,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":602,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":603,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":604,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_validInput_returnDietEdit() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":605,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":606,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e actual \u003d parseDietEdit(validInput);","lastModifiedDate":"2023-10-26"},{"lineNumber":607,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e expected \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":608,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CALORIES_SEPARATOR, \"1\");","lastModifiedDate":"2023-10-26"},{"lineNumber":609,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.PROTEIN_SEPARATOR, \"2\");","lastModifiedDate":"2023-10-26"},{"lineNumber":610,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CARB_SEPARATOR, \"3\");","lastModifiedDate":"2023-10-26"},{"lineNumber":611,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.FAT_SEPARATOR, \"4\");","lastModifiedDate":"2023-10-26"},{"lineNumber":612,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.DATETIME_SEPARATOR, \"2023-10-06T10:00\");","lastModifiedDate":"2023-10-26"},{"lineNumber":613,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":614,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":615,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":616,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":617,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_someMarkersPresent_returnDietEdit() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":618,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-26"},{"lineNumber":619,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e actual \u003d parseDietEdit(validInput);","lastModifiedDate":"2023-10-26"},{"lineNumber":620,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e expected \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":621,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CALORIES_SEPARATOR, \"1\");","lastModifiedDate":"2023-10-26"},{"lineNumber":622,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.PROTEIN_SEPARATOR, \"2\");","lastModifiedDate":"2023-10-26"},{"lineNumber":623,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CARB_SEPARATOR, \"3\");","lastModifiedDate":"2023-10-26"},{"lineNumber":624,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":625,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":626,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":627,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":628,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_zeroValidInput_throwAthletiException() {","lastModifiedDate":"2023-10-26"},{"lineNumber":629,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2 calorie/1 proteins/2 carbs/3 fats/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-26"},{"lineNumber":630,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietEdit(invalidInput));","lastModifiedDate":"2023-10-26"},{"lineNumber":631,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":632,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":633,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":634,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_noInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":635,"author":{"gitId":"yicheng-toh"},"content":" String oneValidOneInvalidGoalString \u003d \" \";","lastModifiedDate":"2023-10-23"},{"lineNumber":636,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(oneValidOneInvalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":637,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":638,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":639,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":640,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_oneValidOneInvalidGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":641,"author":{"gitId":"yicheng-toh"},"content":" String oneValidOneInvalidGoalString \u003d \"calories/60 protein/protine\";","lastModifiedDate":"2023-10-15"},{"lineNumber":642,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(oneValidOneInvalidGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":643,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":644,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":645,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":646,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_zeroTargetValue_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":647,"author":{"gitId":"yicheng-toh"},"content":" String zeroTargetValueGoalString \u003d \"calories/0\";","lastModifiedDate":"2023-10-15"},{"lineNumber":648,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(zeroTargetValueGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":649,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":650,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":651,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":652,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_oneInvalidGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":653,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calories/caloreis protein/protein\";","lastModifiedDate":"2023-10-15"},{"lineNumber":654,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":655,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":656,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":657,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":658,"author":{"gitId":"AlWo223"},"content":" void parseActivityIndex_validIndex_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":659,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-23"},{"lineNumber":660,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseActivityIndex(\"5\");","lastModifiedDate":"2023-10-23"},{"lineNumber":661,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":662,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":663,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":664,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":665,"author":{"gitId":"AlWo223"},"content":" void parseActivityIndex_invalidIndex_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":666,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseActivityIndex(\"abc\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":667,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":668,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":669,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":670,"author":{"gitId":"AlWo223"},"content":" void parseActivityEdit_validInput_returnActivityEdit() {","lastModifiedDate":"2023-10-25"},{"lineNumber":671,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"1 Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":672,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseActivityEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":673,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":674,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":675,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":676,"author":{"gitId":"AlWo223"},"content":" void parseActivityEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":677,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":678,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseActivityEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":679,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":680,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":681,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":682,"author":{"gitId":"AlWo223"},"content":" void parseRunEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":683,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":684,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseRunEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":685,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":686,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":687,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":688,"author":{"gitId":"AlWo223"},"content":" void parseRunEdit_validInput_returnRunEdit() {","lastModifiedDate":"2023-10-23"},{"lineNumber":689,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":690,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 elevation/1000\";","lastModifiedDate":"2023-10-25"},{"lineNumber":691,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseRunEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":692,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":693,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":694,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":695,"author":{"gitId":"AlWo223"},"content":" void parseCycleEdit_validInput_returnRunEdit() {","lastModifiedDate":"2023-10-23"},{"lineNumber":696,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":697,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 elevation/1000\";","lastModifiedDate":"2023-10-25"},{"lineNumber":698,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseCycleEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":699,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":700,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":701,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":702,"author":{"gitId":"AlWo223"},"content":" void parseCycleEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":703,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":704,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseCycleEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":705,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":706,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":707,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":708,"author":{"gitId":"AlWo223"},"content":" void parseSwimEdit_validInput_noExceptionThrown() {","lastModifiedDate":"2023-10-25"},{"lineNumber":709,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":710,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 style/freestyle\";","lastModifiedDate":"2023-10-25"},{"lineNumber":711,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseSwimEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":712,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":713,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":714,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":715,"author":{"gitId":"AlWo223"},"content":" void parseSwimEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":716,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":717,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseRunEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":718,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":719,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":720,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":721,"author":{"gitId":"AlWo223"},"content":" void parseActivityEditIndex_validInput_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":722,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-23"},{"lineNumber":723,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseActivityEditIndex(\"5\");","lastModifiedDate":"2023-10-23"},{"lineNumber":724,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":725,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":726,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":727,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":728,"author":{"gitId":"AlWo223"},"content":" void parseActivityListDetail_flagPresent_returnTrue() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":729,"author":{"gitId":"AlWo223"},"content":" String input \u003d \"list-activity -d\";","lastModifiedDate":"2023-10-23"},{"lineNumber":730,"author":{"gitId":"AlWo223"},"content":" assertTrue(Parser.parseActivityListDetail(input));","lastModifiedDate":"2023-10-23"},{"lineNumber":731,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":732,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":733,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":734,"author":{"gitId":"AlWo223"},"content":" void parseActivityListDetail_flagAbsent_returnFalse() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":735,"author":{"gitId":"AlWo223"},"content":" String input \u003d \"list-activity\";","lastModifiedDate":"2023-10-23"},{"lineNumber":736,"author":{"gitId":"AlWo223"},"content":" assertFalse(Parser.parseActivityListDetail(input));","lastModifiedDate":"2023-10-23"},{"lineNumber":737,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":738,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":739,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":740,"author":{"gitId":"AlWo223"},"content":" void parseActivity_validInput_activityParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":741,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":742,"author":{"gitId":"AlWo223"},"content":" Activity actual \u003d Parser.parseActivity(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":743,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":744,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":745,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":746,"author":{"gitId":"AlWo223"},"content":" Activity expected \u003d new Activity(\"Morning Run\", duration, 10000, time);","lastModifiedDate":"2023-10-25"},{"lineNumber":747,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":748,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":749,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":750,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":751,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":752,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":753,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":754,"author":{"gitId":"AlWo223"},"content":" void parseActivityGoal_validInput_activityGoalParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":755,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"sport/running type/distance period/weekly target/10000\";","lastModifiedDate":"2023-10-27"},{"lineNumber":756,"author":{"gitId":"AlWo223"},"content":" ActivityGoal actual \u003d Parser.parseActivityGoal(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":757,"author":{"gitId":"AlWo223"},"content":" ActivityGoal expected \u003d new ActivityGoal(Goal.Timespan.WEEKLY, ActivityGoal.GoalType.DISTANCE,","lastModifiedDate":"2023-10-27"},{"lineNumber":758,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.Sport.RUNNING, 10000);","lastModifiedDate":"2023-10-27"},{"lineNumber":759,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getTimespan(), expected.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":760,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getGoalType(), expected.getGoalType());","lastModifiedDate":"2023-10-27"},{"lineNumber":761,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getSport(), expected.getSport());","lastModifiedDate":"2023-10-27"},{"lineNumber":762,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getTargetValue(), expected.getTargetValue());","lastModifiedDate":"2023-10-27"},{"lineNumber":763,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":764,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":765,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":766,"author":{"gitId":"AlWo223"},"content":" void parseSport_validInput_sportParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":767,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"running\";","lastModifiedDate":"2023-10-27"},{"lineNumber":768,"author":{"gitId":"AlWo223"},"content":" Sport actual \u003d Parser.parseSport(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":769,"author":{"gitId":"AlWo223"},"content":" Sport expected \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":770,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":771,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":772,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":773,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":774,"author":{"gitId":"AlWo223"},"content":" void parseSport_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":775,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":776,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseSport(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":777,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":778,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":779,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":780,"author":{"gitId":"AlWo223"},"content":" void parseGoalType_validInput_goalTypeParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":781,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"distance\";","lastModifiedDate":"2023-10-27"},{"lineNumber":782,"author":{"gitId":"AlWo223"},"content":" GoalType actual \u003d Parser.parseGoalType(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":783,"author":{"gitId":"AlWo223"},"content":" GoalType expected \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":784,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":785,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":786,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":787,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":788,"author":{"gitId":"AlWo223"},"content":" void parsePeriod_validInput_periodParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":789,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"weekly\";","lastModifiedDate":"2023-10-27"},{"lineNumber":790,"author":{"gitId":"AlWo223"},"content":" Timespan actual \u003d Parser.parsePeriod(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":791,"author":{"gitId":"AlWo223"},"content":" Timespan expected \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":792,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":793,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":794,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":795,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":796,"author":{"gitId":"AlWo223"},"content":" void parsePeriod_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":797,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":798,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parsePeriod(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":799,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":800,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":801,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":802,"author":{"gitId":"AlWo223"},"content":" void parseTarget_validInput_targetParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":803,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"10000\";","lastModifiedDate":"2023-10-27"},{"lineNumber":804,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseTarget(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":805,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 10000;","lastModifiedDate":"2023-10-27"},{"lineNumber":806,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":807,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":808,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":809,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":810,"author":{"gitId":"AlWo223"},"content":" void parseTarget_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":811,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":812,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseTarget(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":813,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":814,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":815,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":816,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityGoalArguments_missingSport_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":817,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingActivityGoalArguments(-1, 1, 1, 1));","lastModifiedDate":"2023-10-27"},{"lineNumber":818,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":819,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":820,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":821,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityGoalArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":822,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingActivityGoalArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-27"},{"lineNumber":823,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":824,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":825,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":826,"author":{"gitId":"AlWo223"},"content":" void parseDuration_validInput_durationParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":827,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"01:00:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":828,"author":{"gitId":"AlWo223"},"content":" LocalTime actual \u003d Parser.parseDuration(validInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":829,"author":{"gitId":"AlWo223"},"content":" LocalTime expected \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":830,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":831,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":832,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":833,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":834,"author":{"gitId":"AlWo223"},"content":" void parseDuration_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":835,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":836,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDuration(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":837,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":838,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":839,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":840,"author":{"gitId":"AlWo223"},"content":" void parseDateTime_validInput_dateTimeParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":841,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"2021-09-01 06:00\";","lastModifiedDate":"2023-10-23"},{"lineNumber":842,"author":{"gitId":"AlWo223"},"content":" LocalDateTime actual \u003d Parser.parseDateTime(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":843,"author":{"gitId":"nihalzp"},"content":" LocalDateTime expected \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":844,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":845,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":846,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":847,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":848,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":849,"author":{"gitId":"AlWo223"},"content":" void parseDateTime_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":850,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":851,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDateTime(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":852,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":853,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":854,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":855,"author":{"gitId":"nihalzp"},"content":" void parseDate_validInput_dateParsed() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":856,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2021-09-01\";","lastModifiedDate":"2023-10-25"},{"lineNumber":857,"author":{"gitId":"nihalzp"},"content":" LocalDate actual \u003d parseDate(validInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":858,"author":{"gitId":"nihalzp"},"content":" LocalDate expected \u003d LocalDate.parse(\"2021-09-01\");","lastModifiedDate":"2023-10-25"},{"lineNumber":859,"author":{"gitId":"nihalzp"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-25"},{"lineNumber":860,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":861,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":862,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":863,"author":{"gitId":"nihalzp"},"content":" void parseDate_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":864,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-25"},{"lineNumber":865,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDate(invalidInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":866,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":867,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":868,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":869,"author":{"gitId":"nihalzp"},"content":" void parseDate_invalidInputWithTime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":870,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":871,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDate(invalidInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":872,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":873,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":874,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":875,"author":{"gitId":"AlWo223"},"content":" void parseDistance_validInput_distanceParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":876,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"10000\";","lastModifiedDate":"2023-10-23"},{"lineNumber":877,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseDistance(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":878,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 10000;","lastModifiedDate":"2023-10-23"},{"lineNumber":879,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":880,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":881,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":882,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":883,"author":{"gitId":"AlWo223"},"content":" void parseDistance_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":884,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":885,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDistance(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":886,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":887,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":888,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":889,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityArguments_missingDuration_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":890,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingActivityArguments(-1, 1, 1));","lastModifiedDate":"2023-10-25"},{"lineNumber":891,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":892,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":893,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":894,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":895,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingActivityArguments(1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":896,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":897,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":898,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":899,"author":{"gitId":"AlWo223"},"content":" void parseRunCycle_validInput_activityParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":900,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":901,"author":{"gitId":"nihalzp"},"content":" \"Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00 elevation/60\";","lastModifiedDate":"2023-10-25"},{"lineNumber":902,"author":{"gitId":"AlWo223"},"content":" Run actual \u003d (Run) Parser.parseRunCycle(validInput, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":903,"author":{"gitId":"AlWo223"},"content":" LocalTime movingTime \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":904,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":905,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":906,"author":{"gitId":"AlWo223"},"content":" Run expected \u003d new Run(\"Morning Run\", movingTime, 10000, time, 60);","lastModifiedDate":"2023-10-25"},{"lineNumber":907,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":908,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":909,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":910,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":911,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getElevationGain(), expected.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":912,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":913,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":914,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":915,"author":{"gitId":"AlWo223"},"content":" void parseElevation_validInput_elevationParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":916,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":917,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseElevation(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":918,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 60;","lastModifiedDate":"2023-10-23"},{"lineNumber":919,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":920,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":921,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":922,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":923,"author":{"gitId":"AlWo223"},"content":" void parseElevation_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":924,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":925,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseElevation(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":926,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":927,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":928,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":929,"author":{"gitId":"AlWo223"},"content":" void checkMissingRunCycleArguments_missingElevation_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":930,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingRunCycleArguments(1, 1, 1, -1));","lastModifiedDate":"2023-10-25"},{"lineNumber":931,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":932,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":933,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":934,"author":{"gitId":"AlWo223"},"content":" void checkMissingRunCycleArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":935,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingRunCycleArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":936,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":937,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":938,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":939,"author":{"gitId":"AlWo223"},"content":" void checkMissingSwimArguments_missingStyle_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":940,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingSwimArguments(1, 1, 1, -1));","lastModifiedDate":"2023-10-25"},{"lineNumber":941,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":942,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":943,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":944,"author":{"gitId":"AlWo223"},"content":" void checkMissingSwimArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":945,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingSwimArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":946,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":947,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":948,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":949,"author":{"gitId":"AlWo223"},"content":" void checkEmptyActivityArguments_emptyCaption_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":950,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkEmptyActivityArguments(\"\", \" \", \" \", \" \"));","lastModifiedDate":"2023-10-25"},{"lineNumber":951,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":952,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":953,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":954,"author":{"gitId":"AlWo223"},"content":" void checkEmptyActivityArguments_noEmptyArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":955,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkEmptyActivityArguments(\"1\", \"1\", \"1\", \"1\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":956,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":957,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":958,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":959,"author":{"gitId":"AlWo223"},"content":" void parseSwim_validInput_swimParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":960,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":961,"author":{"gitId":"nihalzp"},"content":" \"Evening Swim duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 style/freestyle\";","lastModifiedDate":"2023-10-25"},{"lineNumber":962,"author":{"gitId":"AlWo223"},"content":" Swim actual \u003d (Swim) Parser.parseSwim(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":963,"author":{"gitId":"AlWo223"},"content":" LocalTime movingTime \u003d LocalTime.parse(\"02:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":964,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":965,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 18:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":966,"author":{"gitId":"AlWo223"},"content":" Swim expected \u003d new Swim(\"Evening Swim\", movingTime, 20000, time, Swim.SwimmingStyle.FREESTYLE);","lastModifiedDate":"2023-10-25"},{"lineNumber":967,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":968,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":969,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":970,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":971,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStyle(), expected.getStyle());","lastModifiedDate":"2023-10-23"},{"lineNumber":972,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":973,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":974,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":975,"author":{"gitId":"AlWo223"},"content":" void parseSwimmingStyle_validInput_styleParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":976,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"freestyle\";","lastModifiedDate":"2023-10-23"},{"lineNumber":977,"author":{"gitId":"AlWo223"},"content":" Swim.SwimmingStyle actual \u003d Parser.parseSwimmingStyle(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":978,"author":{"gitId":"AlWo223"},"content":" Swim.SwimmingStyle expected \u003d Swim.SwimmingStyle.FREESTYLE;","lastModifiedDate":"2023-10-23"},{"lineNumber":979,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":980,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":981,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":982,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":983,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_repeatedDietGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":984,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calories/1 calories/1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":985,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":986,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":987,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":988,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":989,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_invalidNutrient_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":990,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calorie/1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":991,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":992,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":993,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":994,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":995,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalDelete_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":996,"author":{"gitId":"yicheng-toh"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-23"},{"lineNumber":997,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalDelete(nonIntegerInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":998,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":999,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":1000,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":1001,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalDelete_nonPositiveIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":1002,"author":{"gitId":"yicheng-toh"},"content":" String nonIntegerInput \u003d \"0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":1003,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalDelete(nonIntegerInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":1004,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":1005,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":30,"DaDevChia":87,"AlWo223":299,"yicheng-toh":77,"nihalzp":512}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"FC /W ACTUAL.TXT EXPECTED.TXT \u003eNUL \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"skylee03":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"if [ -e \"data/athleticli.bin\" ]","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"then","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" rm data/athleticli.bin","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"fi","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"diff -w EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":"if [ $? -eq 0 ]","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"skylee03":1,"AlWo223":5,"-":22}}] +[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"# AthletiCLI project template","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"AlWo223":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" mainClass.set(\"athleticli.AthletiCLI\")","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" archiveBaseName.set(\"athleticli\")","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"skylee03":2,"yicheng-toh":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: About Us","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"|-----------------------------------------------------------|:-----------------:|:----------------------------------------:|:-----------------------------------------:|","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Alexander Wolters | [Github](https://github.com/AlWo223) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Nihal | [Github](https://github.com/nihalzp) | [Portfolio](docs/team/nihalzp.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://github.com/DaDevChia) | Dylan Chia | [Github](https://github.com/DaDevChia) | [Portfolio](https://github.com/DaDevChia) |","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Yi Cheng | [Github](https://github.com/yicheng-toh) | [Portfolio](docs/team/yicheng.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"| ![](https://avatars.githubusercontent.com/u/24489025?s\u003d100) | Yang Ming-Tian | [Github](https://github.com/skylee03) | [Portfolio](docs/team/skylee03.md) |","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"skylee03":5,"yicheng-toh":6,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: Developer Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"- Table of Contents","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"{:toc}","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"## Design","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"This section provides a high-level explanation of the design and implementation of AthletiCLI, ","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"supported by UML diagrams and short code snippets to illustrate the flow of data and interactions between the ","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"components.","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"#### [Implemented] Setting Up of Diet Goals","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":"### Architecture","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"Given below is a quick overview of main components and how they interact with each other.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"**Main components of the architecture**","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":"**`AthletiCLI`** is in charge of the app launch and shut down.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":"The bulk of the AthletiCLI’s work is done by the following components, with each of them corresponds to a package:","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"* [`UI`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/ui): The UI of AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"* [`Storage`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/storage): Reads data from, and writes data to, the hard disk.","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":"* [`Data`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/data): Holds the data of AthletiCLI in memory.","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"* [`Commands`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/commands): The command executors.","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"[`Exceptions`](https://github.com/AY2324S1-CS2113-T17-1/tp/tree/master/src/main/java/athleticli/exceptions) represents exceptions used by multiple other components.","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"### UI Component","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":"### Storage Component","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"### Data Component","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":"### Commands Component","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"## Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"### Diet Management in AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"#### [Implemented] Setting Up, Editing, Deleting, Listing, and Finding Diets","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":"Regardless of the operation you are performing on diets (setting up, editing, deleting, listing, or finding), the process follows a general five-step pattern in AthletiCLI:","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"1. **Input Processing**: The user\u0027s input is passed through AthletiCLI to the Parser Class. Examples of user inputs include:","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" - \"add-diet calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00\" for adding a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" - \"edit-diet 1 calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00\" for editing a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" - \"delete-diet 1\" for deleting a diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" - \"list-diet\" for listing all diets.","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" - \"find-diet 2021-09-01\" for finding diets of a particular date.","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":"2. **Command Identification**: The Parser Class identifies the type of diet operation and passes the necessary parameters.","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":"3. **Command Creation**: An instance of the corresponding command class is created (e.g., AddDietCommand, EditDietCommand, etc.) and returned to AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"4. **Command Execution**: AthletiCLI executes the command, interacting with the data instance of DietList to perform the required operation.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"5. **Result Display**: A message is returned post-execution and passed through AthletiCLI to the UI for display to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":"By following these general steps, AthletiCLI ensures a streamlined process for managing diet-related tasks.","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"### [Implemented] Setting Up of Diet Goals","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"yicheng-toh"},"content":"This following sequence diagram show how the \u0027set-diet-goal\u0027 command works:","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":"\u003cp align\u003d\"center\" width\u003d\"100%\"\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yicheng-toh"},"content":" \u003cimg width\u003d\"80%\" src\u003d\"images/setDietGoalUmlSequenceDiagram.svg\" alt\u003d\"\u0027set-diet-goal\u0027 Sequence Diagram\"/\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"yicheng-toh"},"content":"\u003c/p\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"yicheng-toh"},"content":"Step 1. The input from the user (\"set-diet-goal fats/1\") runs through AthletiCLI to the Parser Class.","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"yicheng-toh"},"content":"Step 2. The Parser Class will identify the request as setting up a diet goal and pass in the parameters","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"yicheng-toh"},"content":"\"fats/1\".","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"yicheng-toh"},"content":"Step 3. A temporary dietGoalList is created to store newly created diet goals.","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"yicheng-toh"},"content":"Step 4. The inputs are verified against our lists of approved diet goals.","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"yicheng-toh"},"content":"Step 5. For each of the diet goals that are valid, a dietGoal object will be created and stored in the ","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"yicheng-toh"},"content":"temporary dietGoalList.","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"yicheng-toh"},"content":"Step 6. The Parser then creates for an instance of SetDietGoalCommand and returns the instance to ","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"yicheng-toh"},"content":"Step 7. AthletiCLI will execute the SetDietGoalCommand. This adds the dietGoals that are present in the ","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"yicheng-toh"},"content":"temporary list into the data instance of DietGoalList which will be kept for records.","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"yicheng-toh"},"content":"Step 8. After executing the SetDietGoalCommand, SetDietGoalCommand returns a message that is passed to ","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI to be passed to UI(not shown) for display.","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":"#### [Implemented] Adding activities","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":"The `add-activity` feature allows users to add a new activity into the application.","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":"These are the main components behind the architecture of the `add-activity` feature:","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":"1. `AthletiCLI`: faciliates the mechanism. It captures the input and calls the parser and execution.","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":"2. `Parser`: parses the user input and generates the appropriate command object and activity ","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":"3. `AddActivityCommand`: encapsulates the execution of the `add-activity` command. It adds ","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" the activity to the data.","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":"4. `Activity`: represents the activity that is to be added.","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":"5. `Data`: holds current state of the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":"6. `ActivityList`: maintains the list of all added activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":"Given below is an example usage scenario and how the add mechanism behaves at each step.","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":"**Step 1 - Input Capture:** The user issues an `add-activity ...` which is captured and passed to the Parser by the ","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":"running AthletiCLI instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":"**Step 2 - Activity Parsing:** The Parser parses the raw input to obtain the arguments of the activity. Given that all ","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":"parameters are provided correctly and no exception is thrown, a new activity object is created.","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":"**Step 3 - Command Parsing:** In addition the parser will create an `AddActivityCommand` object with the newly added ","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":"activity attached to it. The command implements the `AddActivityCommand#execute()` operation and is passed to ","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":"the AthletiCLI instance.","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":"**Step 4 - Activity Addition:** The AthletiCLI instance executes the `AddActivityCommand` object. The command will ","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":"access the data and retrieve the currently stored list of activities stored inside it. The new `Activity` object is ","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":"added to the list.","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":"**Step 5 - User Interaction:** Once the activity is successfully added, a confirmation message is displayed to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":"The following sequence diagram shows how the `add-activity` operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":"\u003cp align\u003d\"center\" width\u003d\"100%\"\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":" \u003cimg width\u003d\"80%\" src\u003d\"DeveloperGuide/AddActivity.png\" alt\u003d\"Sequence Diagram of add-activity`\"/\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":"\u003c/p\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"skylee03"},"content":"### [Proposed] Implementation of DietGoalList","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":138,"author":{"gitId":"yicheng-toh"},"content":"The current implementation of DietGoalList is an ArrayList.","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"yicheng-toh"},"content":"It helps to store dietGoals, however it is not efficient in searching for a particular dietGoal.","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"yicheng-toh"},"content":"At any instance of time, there could only be the existence of one dietGoal.","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"yicheng-toh"},"content":"Verifying if there is an existence of a dietGoal using an ArrayList takes O(n) time, where n is the number of dietGoals.","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"yicheng-toh"},"content":"The proposed change will be to change the underlying data structure to a hashmap for amortised O(1) time complexity","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"yicheng-toh"},"content":"for checking the presence of a dietGoal. ","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":"### Sleep Management in AthletiCLI","lastModifiedDate":"2023-10-27"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":"#### [Implemented] Adding, Editing, Deleting, Listing Sleep","lastModifiedDate":"2023-10-27"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":"1. **Input Processing**: The user\u0027s input is passed through AthletiCLI to the Parser Class. Examples of user inputs include:","lastModifiedDate":"2023-10-27"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":" - \"add-sleep hours/8 datetime/2021-09-01 06:00\" for adding sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" - \"edit-sleep 1 hours/8 datetime/2021-09-01 06:00\" for editing sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" - \"delete-sleep 1\" for deleting sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" - \"list-sleep\" for listing all sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":154,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":155,"author":{"gitId":"DaDevChia"},"content":"2. **Command Identification**: The Parser Class identifies the type of sleep operation and passes the necessary parameters.","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"DaDevChia"},"content":"3. **Command Creation**: An instance of the corresponding command class is created (e.g., AddSleepCommand, EditSleepCommand, etc.) and returned to AthletiCLI.","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":159,"author":{"gitId":"DaDevChia"},"content":"4. **Command Execution**: AthletiCLI executes the command, interacting with the data instance of SleepList to perform the required operation.","lastModifiedDate":"2023-10-27"},{"lineNumber":160,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":161,"author":{"gitId":"DaDevChia"},"content":"5. **Result Display**: A message is returned post-execution and passed through AthletiCLI to the UI for display to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":166,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":168,"author":{"gitId":"DaDevChia"},"content":"AthletiCLI is designed for athletic individuals who are committed to optimizing their performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":169,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":170,"author":{"gitId":"DaDevChia"},"content":"These users are highly disciplined and engaged not only in regular, intense physical training but also in nutrition, mental conditioning, and recovery. ","lastModifiedDate":"2023-10-27"},{"lineNumber":171,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":172,"author":{"gitId":"DaDevChia"},"content":"They are looking for a holistic tool that integrates all facets of an athletic lifestyle. AthletiCLI serves as a daily or weekly companion, designed to monitor, track, and analyze various elements crucial for high-level athletic performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":174,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":176,"author":{"gitId":"DaDevChia"},"content":"AthletiCLI provides a streamlined, integrated solution for athletic individuals focused on achieving peak performance. ","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"DaDevChia"},"content":"While the app includes robust capabilities for tracking physical training metrics, it also offers features for monitoring dietary habits and sleep metrics. ","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"DaDevChia"},"content":"By providing a comprehensive view of various performance-related factors over time, AthletiCLI enables athletes to identify trends, refine their training and lifestyle habits, and optimize outcomes. The app is more than a tracking tool—it\u0027s a performance optimization platform that takes into account the full spectrum of an athlete\u0027s life. ","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":182,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":183,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":184,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":185,"author":{"gitId":"nihalzp"},"content":"|---------|-----------------------------------|-----------------------------------|----------------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"nihalzp"},"content":"| v1.0 | health-conscious user | add my dietary information | keep track of my daily calorie and nutrient intake |","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":"| v1.0 | organized user | delete a dietary entry | remove outdated or incorrect data from my diet records |","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":"| v1.0 | fitness enthusiast | view all my diet records | have a clear overview of my dietary habits and make informed decisions on my diet |","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"-"},"content":"| v1.0 | new user | see usage instructions | refer to them when I forget how to use the application |","lastModifiedDate":"2020-05-24"},{"lineNumber":190,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | motivated weight-conscious user | set diet goals | have the motivation to work towards keeping weight in check. |","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | forgetful user | see all my diet goals | remind myself of all the diet goals I have set. |","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | regretful user | remove my diet goals | I can rescind the strict goals I set previously when I find the goals too far fetched. |","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"yicheng-toh"},"content":"| v1.0 | motivated user | update my diet goals | I can work towards better version of myself by setting stricter goals. |","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | add my sleep information | keep track of my sleep habits and identify areas for improvement |","lastModifiedDate":"2023-10-27"},{"lineNumber":195,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | delete a sleep entry | remove outdated or incorrect data from my sleep records |","lastModifiedDate":"2023-10-27"},{"lineNumber":196,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | view all my sleep records | have a clear overview of my sleep habits and make informed decisions on my sleep |","lastModifiedDate":"2023-10-27"},{"lineNumber":197,"author":{"gitId":"DaDevChia"},"content":"| v1.0 | sleep deprived user | edit my sleep entries | correct any mistakes or update my sleep information as needed |","lastModifiedDate":"2023-10-27"},{"lineNumber":198,"author":{"gitId":"-"},"content":"| v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2020-05-24"},{"lineNumber":199,"author":{"gitId":"nihalzp"},"content":"| v2.0 | meticulous user | edit my dietary entries | correct any mistakes or update my diet information as needed |","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":201,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":202,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":204,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":206,"author":{"gitId":"yicheng-toh"},"content":"1. AthletiCLI should work on Windows, MacOS and Linux that has java 11 installed.","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"DaDevChia"},"content":"2. AthletiCLI should be able to store data locally.","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"DaDevChia"},"content":"3. AthletiCLI should be able to work offline.","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"DaDevChia"},"content":"4. AthletiCLI should be easy to use.","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":211,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":212,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":213,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"skylee03":37,"DaDevChia":37,"AlWo223":39,"yicheng-toh":41,"-":35,"nihalzp":28}},{"path":"docs/DeveloperGuide/AddActivity.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"skinparam Style strictuml","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"skinparam SequenceMessageAlignment center","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T2 #5252CE","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"participant \":AthletiCLI\" as AthletiCLI LOGIC_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"participant \":Parser\" as Parser #lightblue","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"participant \"a:Activity\" as Activity #yellow","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"participant \"c:AddActivityCommand\" as AddActivityCommand #lightgreen","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"participant \"data:Data\" as Data #lightgrey","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"participant \"activities:ActivityList\" as activities #lightgrey","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"AthletiCLI++","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"AthletiCLI -\u003e Parser++: parseCommand(userInput)","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e Parser++: parseActivity(arguments)","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e Activity++: Activity()","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"Activity --\u003e Parser--: a","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"Parser--","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"Parser -\u003e AddActivityCommand++: parseAddActivityCommand(arguments)","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand --\u003e Parser--: c","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"Parser --\u003e AthletiCLI--: c","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"AthletiCLI -\u003e AddActivityCommand++: execute(a, data)","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e Data++: getActivities()","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"Data --\u003e activities++","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"activities --\u003e Data--: activities","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"Data --\u003e AddActivityCommand--: activities","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e activities++: add(a)","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"activities --\u003e AddActivityCommand--","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"AddActivityCommand -\u003e AthletiCLI--: message","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"AlWo223":38}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"permalink: /","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"title: About AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"feature_text: |","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" # AthletiCLI","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" Your all-in-one solution to track, analyse, and optimize your athletic performance.","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"feature_image: \"https://picsum.photos/1300/400?image\u003d989\"","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"[![](https://github.com/AY2324S1-CS2113-T17-1/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2113-T17-1/tp/actions)","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"**AthletiCLI** is your all-in-one solution to track, analyse, and optimize your athletic performance. Designed for the","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"committed athlete, this command-line interface (CLI) tool not only keeps tabs on your physical activities but also","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"covers dietary habits, sleep metrics, and more.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"## Quick Start","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"* Ensure you have the required runtime environment installed on your computer.","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"* Download the latest AthletiCLI from the official repository.","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"* Copy the downloaded file to a folder you want to designate as the home for AthletiCLI.","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"* Open a command terminal, cd into the folder where you copied the file, and run java -jar AthletiCLI.jar","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"## Features","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"**Notes about Command Format**","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"* Words in UPPER_CASE are parameters provided by the user.","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"* Parameters can be in any order.","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"* Parameters enclosed in square brackets [] are optional.","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"## Activity Management","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"### Adding Activities:","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"`add-activity`, `add-run`, `add-swim`, `add-cycle`","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"You can record your activities in AtheltiCLI by adding different activities including running, cycling, and swimming.","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"* `add-activity CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"* `add-run CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"* `add-swim CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"* `add-cycle CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"* CAPTION: A short description of the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"* DURATION: The duration of the activity in minutes.","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"* DISTANCE: The distance of the activity in meters. It must be a positive number.","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"* DATETIME: The date and time of the start of the activity. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-13"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":"* `add-activity Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":"* `add-cycle Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":"### Deleting Activities:","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"`delete-activity`","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"Accidentally added an activity? You can quickly delete activities by using the following command.","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"The index must be a positive number and is not larger than the number of activities recorded.","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"* `delete-activity INDEX`","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"* INDEX: The index of the activity as shown in the displayed activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":"* `delete-activity 2` deletes the second activity in the activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"* `delete-activity 1` deletes the first activity in the activity list.","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":"### Listing Activities:","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":"`list-activity`","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":"You can see all your tracked activities in a list by using this command. For more detailed information, you can use","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"the detailed flag.","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":"* `list-activity [-d]`","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":"**Flags:**","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"* `-d`: Shows a detailed list of activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":"* `list-activity` shows a brief overview of all activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":"* `list-activity -d` shows a detailed summary of all activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":"### Editing Activities:","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":"`edit-activity`, `edit-run`, `edit-swim`, `edit-cycle`","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":"You can edit your activities in AthletiCLI by editing the activity at the specified index.","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":"* `edit-activity INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":"* `edit-run INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":"* `edit-swim INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":"* `edit-cycle INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":"* INDEX: The index of the activity to be edited - must be a positive number","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":"* see adding activities for the other parameters","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":"* `edit-activity 1 Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":"* `edit-cycle 2 Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":"### Setting Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":"\u0027set-activity-goal\u0027","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":"You can set goals for your activities in AthletiCLI by setting the target distance or duration for a specific sport.","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":"**Syntax**","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/SPORT target/TARGET period/PERIOD value/VALUE`","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":"**Parameters**","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":"* SPORT: The sport for which you want to set a goal. It must be one of the following: run, swim, cycle, general.","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":"* TARGET: The target for which you want to set a goal. It must be one of the following: distance, duration.","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":"* VALUE: The value of the target. It must be a positive number. For distance, it is in meters. For duration, it is ","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"AlWo223"},"content":" in minutes.","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"AlWo223"},"content":"**Examples**","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/running type/distance period/weekly target/10000` sets a goal of running 10km per week.","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"AlWo223"},"content":"* `set-activity-goal sport/swimming type/duration period/monthly target/120` sets a goal of swimming for 2 hours per ","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"AlWo223"},"content":" month.","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":"## Diet Management","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":"### Adding Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"nihalzp"},"content":"`add-diet`","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"nihalzp"},"content":"You can record your diet in AtheltiCLI by adding your calorie, protein, carbohydrate,and fat intake of your meals.","lastModifiedDate":"2023-10-15"},{"lineNumber":150,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":151,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":152,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":153,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/CALORIES protein/PROTEIN carb/CARB fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":155,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":156,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":157,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":158,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":159,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal.","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal.","lastModifiedDate":"2023-10-15"},{"lineNumber":161,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":162,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":163,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":164,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":166,"author":{"gitId":"nihalzp"},"content":"### Deleting Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":167,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":168,"author":{"gitId":"nihalzp"},"content":"`delete-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":169,"author":{"gitId":"nihalzp"},"content":"You can delete your diet in AtheltiCLI by deleting the diet at the specified index.","lastModifiedDate":"2023-10-15"},{"lineNumber":170,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":171,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":172,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":173,"author":{"gitId":"nihalzp"},"content":"* `delete-diet INDEX`","lastModifiedDate":"2023-10-15"},{"lineNumber":174,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":175,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-15"},{"lineNumber":176,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":177,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be deleted - must be a positive integer.","lastModifiedDate":"2023-10-15"},{"lineNumber":178,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":179,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":180,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":181,"author":{"gitId":"nihalzp"},"content":"* `delete-diet 1`","lastModifiedDate":"2023-10-15"},{"lineNumber":182,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":183,"author":{"gitId":"nihalzp"},"content":"### Listing Diets:","lastModifiedDate":"2023-10-15"},{"lineNumber":184,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":185,"author":{"gitId":"nihalzp"},"content":"`list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":186,"author":{"gitId":"nihalzp"},"content":"You can list all your diets in AtheltiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":191,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"yicheng-toh"},"content":"## Diet Goal Management","lastModifiedDate":"2023-10-18"},{"lineNumber":197,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":198,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":199,"author":{"gitId":"yicheng-toh"},"content":"### Adding Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":200,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":201,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":202,"author":{"gitId":"yicheng-toh"},"content":"`set-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":203,"author":{"gitId":"yicheng-toh"},"content":"You can create a new diet goal to track your nutrients intake with AtheltiCLI by adding the nutrients you wish to track and the target value for your nutrient goals.","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":206,"author":{"gitId":"yicheng-toh"},"content":"Currently only the following nutrients/metrics are tracked:","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"yicheng-toh"},"content":"1. Calories","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"yicheng-toh"},"content":"2. Protein","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"yicheng-toh"},"content":"3. Carbs","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"yicheng-toh"},"content":"4. Fats","lastModifiedDate":"2023-10-18"},{"lineNumber":211,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":212,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":213,"author":{"gitId":"yicheng-toh"},"content":"You can set multiple nutrients goals at once with the `set-diet-goal` command.","lastModifiedDate":"2023-10-18"},{"lineNumber":214,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":215,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":216,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"yicheng-toh"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"yicheng-toh"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"yicheng-toh"},"content":"* CARB: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"yicheng-toh"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"yicheng-toh"},"content":"You can create one or multiple nutrient goals at once with this command.","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"yicheng-toh"},"content":"Create multiple nutrients goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"yicheng-toh"},"content":"Create a single calories goal:","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"yicheng-toh"},"content":"* `set-diet-goal calories/500`","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"yicheng-toh"},"content":"### Deleting Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":249,"author":{"gitId":"yicheng-toh"},"content":"`delete-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":250,"author":{"gitId":"yicheng-toh"},"content":"You can delete your diet goals in AtheltiCLI by deleting the goal at the specified index.","lastModifiedDate":"2023-10-18"},{"lineNumber":251,"author":{"gitId":"yicheng-toh"},"content":"This index will be referenced via `list-diet-goal` command.","lastModifiedDate":"2023-10-18"},{"lineNumber":252,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":253,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":254,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":255,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":256,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"yicheng-toh"},"content":"* `delete-diet-goal INDEX`","lastModifiedDate":"2023-10-18"},{"lineNumber":258,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":259,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":260,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":261,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":262,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":263,"author":{"gitId":"yicheng-toh"},"content":"* INDEX: The index of the diet goal to be deleted. It must be a positive integer.","lastModifiedDate":"2023-10-18"},{"lineNumber":264,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":265,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":266,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":267,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":268,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":269,"author":{"gitId":"yicheng-toh"},"content":"* `delete-diet-goal 1`","lastModifiedDate":"2023-10-18"},{"lineNumber":270,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":271,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":272,"author":{"gitId":"yicheng-toh"},"content":"### Listing Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":273,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":274,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":275,"author":{"gitId":"yicheng-toh"},"content":"`list-diet-goals`","lastModifiedDate":"2023-10-18"},{"lineNumber":276,"author":{"gitId":"yicheng-toh"},"content":"You can list all your diet goals in AtheltiCLI.","lastModifiedDate":"2023-10-18"},{"lineNumber":277,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":278,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":279,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":280,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":281,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":282,"author":{"gitId":"yicheng-toh"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":283,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":284,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":285,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":286,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":287,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":288,"author":{"gitId":"yicheng-toh"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":289,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":290,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":291,"author":{"gitId":"yicheng-toh"},"content":"### Editing Diet Goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":292,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":293,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":294,"author":{"gitId":"yicheng-toh"},"content":"`edit-diet-goal`","lastModifiedDate":"2023-10-18"},{"lineNumber":295,"author":{"gitId":"yicheng-toh"},"content":"You can edit the target value of your diet goals in AtheltiCLI, redefining the target value for the specified nutrient.","lastModifiedDate":"2023-10-18"},{"lineNumber":296,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":297,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":298,"author":{"gitId":"yicheng-toh"},"content":"This command takes in at least one argument. You are able to edit multiple diet goals target value at once. No repetition is allowed.","lastModifiedDate":"2023-10-18"},{"lineNumber":299,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":300,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":301,"author":{"gitId":"yicheng-toh"},"content":"**Syntax:**","lastModifiedDate":"2023-10-18"},{"lineNumber":302,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":303,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":304,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-18"},{"lineNumber":305,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":306,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":307,"author":{"gitId":"yicheng-toh"},"content":"**Parameters:**","lastModifiedDate":"2023-10-18"},{"lineNumber":308,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":309,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":310,"author":{"gitId":"yicheng-toh"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-18"},{"lineNumber":311,"author":{"gitId":"yicheng-toh"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":312,"author":{"gitId":"yicheng-toh"},"content":"* CARBS: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":313,"author":{"gitId":"yicheng-toh"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-18"},{"lineNumber":314,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":315,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":316,"author":{"gitId":"yicheng-toh"},"content":"You can create one or multiple nutrient goals with this command.","lastModifiedDate":"2023-10-18"},{"lineNumber":317,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":318,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":319,"author":{"gitId":"yicheng-toh"},"content":"**Examples:**","lastModifiedDate":"2023-10-18"},{"lineNumber":320,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":321,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":322,"author":{"gitId":"yicheng-toh"},"content":"Edit multiple nutrients goals:","lastModifiedDate":"2023-10-18"},{"lineNumber":323,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/5000 protein/200 carb/500 fat/100`","lastModifiedDate":"2023-10-18"},{"lineNumber":324,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":325,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":326,"author":{"gitId":"yicheng-toh"},"content":"Edit a single calories goal:","lastModifiedDate":"2023-10-18"},{"lineNumber":327,"author":{"gitId":"yicheng-toh"},"content":"* `edit-diet-goal calories/5000`","lastModifiedDate":"2023-10-18"},{"lineNumber":328,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":329,"author":{"gitId":"DaDevChia"},"content":"## Sleep Management","lastModifiedDate":"2023-10-17"},{"lineNumber":330,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":331,"author":{"gitId":"DaDevChia"},"content":"### Adding Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":332,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":333,"author":{"gitId":"DaDevChia"},"content":"**Command:** `add-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":334,"author":{"gitId":"DaDevChia"},"content":"You can record your sleep timings in AtheltiCLI by adding your sleep start and end time.","lastModifiedDate":"2023-10-17"},{"lineNumber":335,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":336,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":337,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":338,"author":{"gitId":"DaDevChia"},"content":"* `add-sleep start/START end/END`","lastModifiedDate":"2023-10-17"},{"lineNumber":339,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":340,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":341,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":342,"author":{"gitId":"DaDevChia"},"content":"* START: The start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":343,"author":{"gitId":"DaDevChia"},"content":"* END: The end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":344,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":345,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":346,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":347,"author":{"gitId":"DaDevChia"},"content":"* `add-sleep start/01-09-2021 22:00 end/02-09-2021 06:00`","lastModifiedDate":"2023-10-17"},{"lineNumber":348,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":349,"author":{"gitId":"DaDevChia"},"content":"### Listing Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":350,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":351,"author":{"gitId":"DaDevChia"},"content":"**Command:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":352,"author":{"gitId":"DaDevChia"},"content":"You can list all your sleep records in AtheltiCLI.","lastModifiedDate":"2023-10-17"},{"lineNumber":353,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":354,"author":{"gitId":"DaDevChia"},"content":"**Syntax:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":355,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":356,"author":{"gitId":"DaDevChia"},"content":"**Examples:** `list-sleep`","lastModifiedDate":"2023-10-17"},{"lineNumber":357,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":358,"author":{"gitId":"DaDevChia"},"content":"### Deleting Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":359,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":360,"author":{"gitId":"DaDevChia"},"content":"**Command:** `delete-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":361,"author":{"gitId":"DaDevChia"},"content":"You can delete your sleep in AtheltiCLI by specifying the sleep\u0027s index.","lastModifiedDate":"2023-10-17"},{"lineNumber":362,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":363,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":364,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":365,"author":{"gitId":"DaDevChia"},"content":"* `delete-sleep INDEX`","lastModifiedDate":"2023-10-17"},{"lineNumber":366,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":367,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":368,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":369,"author":{"gitId":"DaDevChia"},"content":"* INDEX: The integer index of the sleep record you wish to delete.","lastModifiedDate":"2023-10-17"},{"lineNumber":370,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":371,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":372,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":373,"author":{"gitId":"DaDevChia"},"content":"* `delete-sleep 5` ","lastModifiedDate":"2023-10-17"},{"lineNumber":374,"author":{"gitId":"DaDevChia"},"content":" (Note: This will delete the 5th sleep record from your records.)","lastModifiedDate":"2023-10-17"},{"lineNumber":375,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":376,"author":{"gitId":"DaDevChia"},"content":"### Editing Sleep:","lastModifiedDate":"2023-10-17"},{"lineNumber":377,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":378,"author":{"gitId":"DaDevChia"},"content":"**Command:** `edit-sleep` ","lastModifiedDate":"2023-10-17"},{"lineNumber":379,"author":{"gitId":"nihalzp"},"content":"You can modify existing sleep records in AtheltiCLI by specifying the sleep\u0027s index and then providing the new start and","lastModifiedDate":"2023-10-18"},{"lineNumber":380,"author":{"gitId":"nihalzp"},"content":"end times.","lastModifiedDate":"2023-10-18"},{"lineNumber":381,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":382,"author":{"gitId":"DaDevChia"},"content":"**Syntax:**","lastModifiedDate":"2023-10-17"},{"lineNumber":383,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":384,"author":{"gitId":"DaDevChia"},"content":"* `edit-sleep INDEX start/START end/END`","lastModifiedDate":"2023-10-17"},{"lineNumber":385,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":386,"author":{"gitId":"DaDevChia"},"content":"**Parameters:**","lastModifiedDate":"2023-10-17"},{"lineNumber":387,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":388,"author":{"gitId":"DaDevChia"},"content":"* INDEX: The integer index of the sleep record you wish to edit.","lastModifiedDate":"2023-10-17"},{"lineNumber":389,"author":{"gitId":"DaDevChia"},"content":"* START: The new start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":390,"author":{"gitId":"DaDevChia"},"content":"* END: The new end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-17"},{"lineNumber":391,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":392,"author":{"gitId":"DaDevChia"},"content":"**Examples:**","lastModifiedDate":"2023-10-17"},{"lineNumber":393,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":394,"author":{"gitId":"DaDevChia"},"content":"* `edit-sleep 5 start/05-09-2021 23:00 end/06-09-2021 07:00` ","lastModifiedDate":"2023-10-17"},{"lineNumber":395,"author":{"gitId":"DaDevChia"},"content":" (Note: This will edit the 5th sleep record to have the new specified timings.)","lastModifiedDate":"2023-10-17"},{"lineNumber":396,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":397,"author":{"gitId":"DaDevChia"},"content":"---","lastModifiedDate":"2023-10-17"},{"lineNumber":398,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":399,"author":{"gitId":"DaDevChia"},"content":"Remember, when using AtheltiCLI:","lastModifiedDate":"2023-10-17"},{"lineNumber":400,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":401,"author":{"gitId":"DaDevChia"},"content":"* Make sure to provide accurate dates and times.","lastModifiedDate":"2023-10-17"},{"lineNumber":402,"author":{"gitId":"DaDevChia"},"content":"* Double-check indexes before deleting or editing records to prevent mistakes.","lastModifiedDate":"2023-10-17"},{"lineNumber":403,"author":{"gitId":"DaDevChia"},"content":"* If you encounter any error messages, read them carefully to understand what went wrong.","lastModifiedDate":"2023-10-17"},{"lineNumber":404,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":405,"author":{"gitId":"DaDevChia"},"content":"---","lastModifiedDate":"2023-10-17"},{"lineNumber":406,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":407,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":408,"author":{"gitId":"AlWo223"},"content":"[User Guide](UserGuide.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":409,"author":{"gitId":"AlWo223"},"content":"[Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":410,"author":{"gitId":"AlWo223"},"content":"[About Us](AboutUs.md)","lastModifiedDate":"2023-10-13"},{"lineNumber":411,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":412,"author":{"gitId":"skylee03"},"content":"* If you are interested in using AthletiCLI, head over to the [User Guide](UserGuide.html).","lastModifiedDate":"2023-10-26"},{"lineNumber":413,"author":{"gitId":"skylee03"},"content":"* If you are interested about developing AthletiCLI, the [Developer Guide](DeveloperGuide.html) is a good place to start.","lastModifiedDate":"2023-10-26"},{"lineNumber":414,"author":{"gitId":"skylee03"},"content":"* If you would like to learn more about our development team, please visit the [About Us](AboutUs.html) page.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":13,"DaDevChia":75,"AlWo223":117,"yicheng-toh":133,"-":4,"nihalzp":72}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: User Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"## Diet Management","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"### Adding Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"`add-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"You can record your diet in AtheltiCLI by adding your calorie, protein, carbohydrate,and fat intake of your meals.","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal.","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":"* DATETIME: The date and time of the meal. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":"* `add-diet calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":"### Editing Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":"`edit-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"You can edit your diet in AtheltiCLI by editing the diet at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":"* `edit-diet INDEX calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be edited - must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":"* CALORIES: The total calories of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"* PROTEIN: The total protein of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"* CARB: The total carbohydrates of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"* FAT: The total fat of the meal. [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"* DATETIME: The date and time of the meal. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM [OPTIONAL]","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500 protein/20 carb/50 fat/10 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 datetime/2021-09-01 06:00 protein/20 carb/50 calories/500 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 calories/500`","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":"* `edit-diet 1 protein/20`","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":"### Deleting Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":"`delete-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":"You can delete your diet in AtheltiCLI by deleting the diet at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":"* `delete-diet INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"* INDEX: The index of the diet to be deleted - must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":"* `delete-diet 1`","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":"### Listing Diets:","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":"`list-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"You can list all your diets in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":"* `list-diet`","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":4,"-":19,"nihalzp":60}},{"path":"docs/UserGuideTmp.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"layout: page","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"title: User Guide","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"## Quick Start","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"* Ensure you have the required runtime environment installed on your computer.","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"* Download the latest AthletiCLI from the official repository.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"* Copy the downloaded file to a folder you want to designate as the home for AthletiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"* Open a command terminal, cd into the folder where you copied the file, and run java -jar AthletiCLI.jar","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"## Features","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"**Notes about Command Format**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"* Words in UPPER_CASE are parameters provided by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"* Parameters can be in any order.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"* Parameters enclosed in square brackets [] are optional.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":"## Activity Management","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"### Adding Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":"`add-activity`, `add-run`, `add-swim`, `add-cycle`","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"You can record your activities in AtheltiCLI by adding different activities including running, cycling, and swimming.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":"* `add-activity CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"* `add-run CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"* `add-swim CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":"* `add-cycle CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"* CAPTION: A short description of the activity.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"* DURATION: The duration of the activity in minutes.","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"* DISTANCE: The distance of the activity in meters. It must be a positive number.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":"* DATETIME: The date and time of the start of the activity. It must follow the ISO Date Time Format: YYYY-MM-DD HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":"* `add-activity Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"* `add-cycle Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"### Deleting Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":"`delete-activity`","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"Accidentally added an activity? You can quickly delete activities by using the following command.","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":"The index must be a positive number and is not larger than the number of activities recorded.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":"* `delete-activity INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the activity as shown in the displayed activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":"* `delete-activity 2` deletes the second activity in the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":"* `delete-activity 1` deletes the first activity in the activity list.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":"### Listing Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":"`list-activity`","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"You can see all your tracked activities in a list by using this command. For more detailed information, you can use","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"the detailed flag.","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":"* `list-activity [-d]`","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":"**Flags:**","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":"* `-d`: Shows a detailed list of activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":"* `list-activity` shows a brief overview of all activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":"* `list-activity -d` shows a detailed summary of all activities.","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":"### Editing Activities:","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":"`edit-activity`, `edit-run`, `edit-swim`, `edit-cycle`","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":"You can edit your activities in AthletiCLI by editing the activity at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"skylee03"},"content":"* `edit-activity INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME`","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"skylee03"},"content":"* `edit-run INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"skylee03"},"content":"* `edit-swim INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS`","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"skylee03"},"content":"* `edit-cycle INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION`","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the activity to be edited - must be a positive number","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"skylee03"},"content":"* see adding activities for the other parameters","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"skylee03"},"content":"* `edit-activity 1 Morning Run duration/60 distance/10000 datetime/2021-09-01 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"skylee03"},"content":"* `edit-cycle 2 Evening Ride duration/120 distance/20000 datetime/2021-09-01 18:00 elevation/1000`","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"skylee03"},"content":"## Diet Goal Management","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"skylee03"},"content":"### Adding Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"skylee03"},"content":"`set-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"skylee03"},"content":"You can create a new diet goal to track your nutrients intake with AtheltiCLI by adding the nutrients you wish to track and the target value for your nutrient goals.","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"skylee03"},"content":"Currently only the following nutrients/metrics are tracked:","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"skylee03"},"content":"1. Calories","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"skylee03"},"content":"2. Protein","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"skylee03"},"content":"3. Carbs","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"skylee03"},"content":"4. Fats","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"skylee03"},"content":"You can set multiple nutrients goals at once with the `set-diet-goal` command.","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"skylee03"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"skylee03"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"skylee03"},"content":"* CARB: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"skylee03"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"skylee03"},"content":"You can create one or multiple nutrient goals at once with this command.","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":153,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"skylee03"},"content":"Create multiple nutrients goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/500 protein/20 carb/50 fat/10`","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":157,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":158,"author":{"gitId":"skylee03"},"content":"Create a single calories goal:","lastModifiedDate":"2023-10-26"},{"lineNumber":159,"author":{"gitId":"skylee03"},"content":"* `set-diet-goal calories/500`","lastModifiedDate":"2023-10-26"},{"lineNumber":160,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":161,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":162,"author":{"gitId":"skylee03"},"content":"### Deleting Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":163,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":164,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":165,"author":{"gitId":"skylee03"},"content":"`delete-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":166,"author":{"gitId":"skylee03"},"content":"You can delete your diet goals in AtheltiCLI by deleting the goal at the specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":167,"author":{"gitId":"skylee03"},"content":"This index will be referenced via `list-diet-goal` command.","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":169,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":170,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"skylee03"},"content":"* `delete-diet-goal INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"skylee03"},"content":"* INDEX: The index of the diet goal to be deleted. It must be a positive integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":182,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":185,"author":{"gitId":"skylee03"},"content":"* `delete-diet-goal 1`","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"skylee03"},"content":"### Listing Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":190,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"skylee03"},"content":"`list-diet-goals`","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"skylee03"},"content":"You can list all your diet goals in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":194,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"skylee03"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"skylee03"},"content":"* `list-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"skylee03"},"content":"### Editing Diet Goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"skylee03"},"content":"`edit-diet-goal`","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"skylee03"},"content":"You can edit the target value of your diet goals in AtheltiCLI, redefining the target value for the specified nutrient.","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"skylee03"},"content":"This command takes in at least one argument. You are able to edit multiple diet goals target value at once. No repetition is allowed.","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/CALORIES protein/PROTEIN carb/CARBS fat/FAT`","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"skylee03"},"content":"* CALORIES: Your target value for calories intake, in terms of cal.","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"skylee03"},"content":"* PROTEIN: The target for protein intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"skylee03"},"content":"* CARBS: Your target value for carbohydrate intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"skylee03"},"content":"* FAT: Your target value for fats intake, in terms of milligrams.","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"skylee03"},"content":"You can create one or multiple nutrient goals with this command.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":236,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":238,"author":{"gitId":"skylee03"},"content":"Edit multiple nutrients goals:","lastModifiedDate":"2023-10-26"},{"lineNumber":239,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/5000 protein/200 carb/500 fat/100`","lastModifiedDate":"2023-10-26"},{"lineNumber":240,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":241,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":242,"author":{"gitId":"skylee03"},"content":"Edit a single calories goal:","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"skylee03"},"content":"* `edit-diet-goal calories/5000`","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"skylee03"},"content":"## Sleep Management","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"skylee03"},"content":"### Adding Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"skylee03"},"content":"**Command:** `add-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"skylee03"},"content":"You can record your sleep timings in AtheltiCLI by adding your sleep start and end time.","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"skylee03"},"content":"* `add-sleep start/START end/END`","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"skylee03"},"content":"* START: The start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"skylee03"},"content":"* END: The end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"skylee03"},"content":"* `add-sleep start/01-09-2021 22:00 end/02-09-2021 06:00`","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"skylee03"},"content":"### Listing Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"skylee03"},"content":"**Command:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"skylee03"},"content":"You can list all your sleep records in AtheltiCLI.","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"skylee03"},"content":"**Syntax:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"skylee03"},"content":"**Examples:** `list-sleep`","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"skylee03"},"content":"### Deleting Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":275,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":276,"author":{"gitId":"skylee03"},"content":"**Command:** `delete-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"skylee03"},"content":"You can delete your sleep in AtheltiCLI by specifying the sleep\u0027s index.","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"skylee03"},"content":"* `delete-sleep INDEX`","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"skylee03"},"content":"* INDEX: The integer index of the sleep record you wish to delete.","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"skylee03"},"content":"* `delete-sleep 5` ","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"skylee03"},"content":" (Note: This will delete the 5th sleep record from your records.)","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"skylee03"},"content":"### Editing Sleep:","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"skylee03"},"content":"**Command:** `edit-sleep` ","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"skylee03"},"content":"You can modify existing sleep records in AtheltiCLI by specifying the sleep\u0027s index and then providing the new start and","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"skylee03"},"content":"end times.","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":298,"author":{"gitId":"skylee03"},"content":"**Syntax:**","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"skylee03"},"content":"* `edit-sleep INDEX start/START end/END`","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"skylee03"},"content":"**Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"skylee03"},"content":"* INDEX: The integer index of the sleep record you wish to edit.","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"skylee03"},"content":"* START: The new start time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"skylee03"},"content":"* END: The new end time of the sleep in the following Date Time Format: DD-MM-YYYY HH:MM","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":308,"author":{"gitId":"skylee03"},"content":"**Examples:**","lastModifiedDate":"2023-10-26"},{"lineNumber":309,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"skylee03"},"content":"* `edit-sleep 5 start/05-09-2021 23:00 end/06-09-2021 07:00` ","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"skylee03"},"content":" (Note: This will edit the 5th sleep record to have the new specified timings.)","lastModifiedDate":"2023-10-26"},{"lineNumber":312,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":313,"author":{"gitId":"skylee03"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":314,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":315,"author":{"gitId":"skylee03"},"content":"Remember, when using AtheltiCLI:","lastModifiedDate":"2023-10-26"},{"lineNumber":316,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":317,"author":{"gitId":"skylee03"},"content":"* Make sure to provide accurate dates and times.","lastModifiedDate":"2023-10-26"},{"lineNumber":318,"author":{"gitId":"skylee03"},"content":"* Double-check indexes before deleting or editing records to prevent mistakes.","lastModifiedDate":"2023-10-26"},{"lineNumber":319,"author":{"gitId":"skylee03"},"content":"* If you encounter any error messages, read them carefully to understand what went wrong.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"skylee03":319}},{"path":"docs/puml/DietGoals.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"skinparam Style strictuml","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"skinparam SequenceMessageAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"participant \":AthletiCLI\" as AthletiCLI #lightblue","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"participant \":Parser\" as Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"participant \":dietGoal\" as dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"participant \":SetDietGoalCommand\" as SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"participant \"temp:dietGoalList\" as tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"participant \"data:dietGoalList\" as dataDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"\u0027autonumber","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI++","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI -\u003e Parser++ : ParseCommand(\"set-diet-goal fats/1\")","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e Parser++ : ParseDietGoalSetEdit(\"fats/1\")","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"create tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e tempDietGoalList++ : dietGoalList()","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"tempDietGoalList --\u003e Parser-- : dietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" loop number of valid new diet goals","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" create dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" Parser -\u003e dietGoal++ : dietGoal()","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" dietGoal --\u003e Parser-- : dietGoal","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" end","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":"Parser --\u003e Parser-- : dietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":"create SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"Parser -\u003e SetDietGoalCommand++ : SetDietGoalCommand()","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand --\u003e Parser-- : SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"Parser --\u003e AthletiCLI-- : SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":"AthletiCLI -\u003e SetDietGoalCommand++ : execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand -\u003e dataDietGoalList++ : add()","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":"dataDietGoalList --\u003e SetDietGoalCommand--","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"destroy tempDietGoalList","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":"SetDietGoalCommand --\u003e AthletiCLI-- : messages","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":"destroy SetDietGoalCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"yicheng-toh":39}},{"path":"docs/team/skylee03.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"# Yang Ming-Tian - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"skylee03":6}},{"path":"docs/team/yicheng.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"# John Doe - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"yicheng-toh":6}},{"path":"src/main/java/athleticli/AthletiCLI.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.logging.ConsoleHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.SaveCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Parser;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" * Defines the basic structure and the behavior of AthletiCLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"public class AthletiCLI {","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" private static Logger logger \u003d Logger.getLogger(AthletiCLI.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" private static Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" private static Data data \u003d Data.getInstance();","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Constructs an \u003ccode\u003eAthletiCLI\u003c/code\u003e object.","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" private AthletiCLI() {","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" logger.addHandler(new FileHandler(\"%t/athleticli-log.txt\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" } catch(IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" logger.addHandler(new ConsoleHandler());","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" * Creates an `AthletiCLI` object and runs it.","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * @param args Arguments obtained from the command line.","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" /* save data when the JVM begins its shutdown sequence */","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" Runtime.getRuntime().addShutdownHook(new Thread(() -\u003e {","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" final String[] feedback \u003d new SaveCommand().execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" ui.showMessages(feedback);","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" }));","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" new AthletiCLI().run();","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" * Displays the welcome interface, continuously reads user input","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" * and executes corresponding instructions until exiting.","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" private void run() {","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" logger.entering(getClass().getName(), \"run\");","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" data.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" ui.showWelcome();","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" final String rawUserInput \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" logger.info(\"Command read: \" + rawUserInput);","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" final Command command \u003d Parser.parseCommand(rawUserInput);","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" final String[] feedback \u003d command.execute(data);","lastModifiedDate":"2023-10-08"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" ui.showMessages(feedback);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" logger.info(\"Command executed successfully\");","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" isExit \u003d command.isExit();","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" logger.warning(\"Exception caught: \" + e);","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" logger.exiting(getClass().getName(), \"run\");","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":79}},{"path":"src/main/java/athleticli/commands/ByeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class ByeCommand extends Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" * Returns \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * @return \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" public boolean isExit() {","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" return true;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" * Returns the bye message to be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" return new String[] {Message.MESSAGE_BYE};","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":26}},{"path":"src/main/java/athleticli/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods of a command.","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * Executes the command and returns the messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public abstract String[] execute(Data data) throws AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * Returns \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @return \u003ccode\u003etrue\u003c/code\u003e if this is a \u003ccode\u003eByeCommand\u003c/code\u003e object, otherwise returns \u003ccode\u003efalse\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" public boolean isExit() {","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" return false;","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":27}},{"path":"src/main/java/athleticli/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.activity.FindActivityCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.diet.FindDietCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.sleep.FindSleepCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" protected LocalDate date;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" public FindCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * Returns the records to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" * @return The records to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" var activities \u003d Stream.of(new FindActivityCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" var diets \u003d Stream.of(new FindDietCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" var sleeps \u003d Stream.of(new FindSleepCommand(date).execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" return Stream.of(activities, diets, sleeps)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" .reduce(Stream::concat)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .orElseGet(Stream::empty)","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":36}},{"path":"src/main/java/athleticli/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static java.util.Map.entry;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.CommandName;","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" private static final String[] HELP_ALL \u003d {","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" \"\\nActivity Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_RUN,","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_SWIM,","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_CYCLE,","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_ACTIVITY,","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_RUN,","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_SWIM,","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_CYCLE,","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_ACTIVITY,","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" \"\\nDiet Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_DIET,","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_DIET,","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" \"\\nSleep Management:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" Message.HELP_ADD_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" Message.HELP_LIST_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" Message.HELP_DELETE_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" Message.HELP_EDIT_SLEEP,","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND_SLEEP,","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" /* Misc */","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" \"\\nMisc:\",","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" Message.HELP_FIND,","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" Message.HELP_SAVE,","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" Message.HELP_BYE,","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" Message.HELP_HELP,","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" \"\\n\" + Message.HELP_DETAILS","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" };","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" private static final Map\u003cString, String\u003e HELP_MESSAGES \u003d Map.ofEntries(","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY, Message.HELP_ADD_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_RUN, Message.HELP_ADD_RUN),","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SWIM, Message.HELP_ADD_SWIM),","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_CYCLE, Message.HELP_ADD_CYCLE),","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_DELETE, Message.HELP_DELETE_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_LIST, Message.HELP_LIST_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_EDIT, Message.HELP_EDIT_ACTIVITY),","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_RUN_EDIT, Message.HELP_EDIT_RUN),","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SWIM_EDIT, Message.HELP_EDIT_SWIM),","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_CYCLE_EDIT, Message.HELP_EDIT_CYCLE),","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_ACTIVITY_FIND, Message.HELP_FIND_ACTIVITY),","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_ADD, Message.HELP_ADD_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" entry(CommandName.COMMAND_DIET_EDIT, Message.HELP_EDIT_DIET),","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_DELETE, Message.HELP_DELETE_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_LIST, Message.HELP_LIST_DIET),","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_DIET_FIND, Message.HELP_FIND_DIET),","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_ADD, Message.HELP_ADD_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_LIST, Message.HELP_LIST_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_DELETE, Message.HELP_DELETE_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_EDIT, Message.HELP_EDIT_SLEEP),","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SLEEP_FIND, Message.HELP_FIND_SLEEP),","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" /* Misc */","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_FIND, Message.HELP_FIND),","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_SAVE, Message.HELP_SAVE),","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_BYE, Message.HELP_BYE),","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" entry(CommandName.COMMAND_HELP, Message.HELP_HELP)","lastModifiedDate":"2023-10-21"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" );","lastModifiedDate":"2023-10-21"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" private String command;","lastModifiedDate":"2023-10-21"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" public HelpCommand(String command) {","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" this.command \u003d command;","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" * Returns the help messages to be shown to the user.","lastModifiedDate":"2023-10-21"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":" if (HELP_MESSAGES.containsKey(command)) {","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"skylee03"},"content":" return new String[] {\"Usage: \" + HELP_MESSAGES.get(command)};","lastModifiedDate":"2023-10-21"},{"lineNumber":96,"author":{"gitId":"skylee03"},"content":" } else {","lastModifiedDate":"2023-10-21"},{"lineNumber":97,"author":{"gitId":"skylee03"},"content":" return HELP_ALL;","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"skylee03":99,"nihalzp":1}},{"path":"src/main/java/athleticli/commands/SaveCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class SaveCommand extends Command {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * Saves the data into the file.","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" assert data !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" data.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" throw new AthletiException(Message.MESSAGE_IO_EXCEPTION);","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" return new String[] {Message.MESSAGE_SAVE};","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":27}},{"path":"src/main/java/athleticli/commands/activity/AddActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" * Executes the add activity commands provided by the user.","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class AddActivityCommand extends Command {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final Activity activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * Constructor for AddActivityCommand.","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * @param activity Activity to be added.","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" public AddActivityCommand(Activity activity){","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" this.activity \u003d activity;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * Updates the activity list.","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity list.","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" activities.add(this.activity);","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" activities.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" int size \u003d activities.size();","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" String countMessage;","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" if (size \u003e 1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" countMessage \u003d String.format(Message.MESSAGE_ACTIVITY_COUNT, size);","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" countMessage \u003d Message.MESSAGE_ACTIVITY_FIRST;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_ADDED, this.activity.toString(), countMessage};","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":40}},{"path":"src/main/java/athleticli/commands/activity/DeleteActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" * Executes the delete activity command provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"public class DeleteActivityCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private final Integer index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * Constructor for DeleteActivityCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * @param index Index of activity to be deleted.","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public DeleteActivityCommand(Integer index) {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * Executes the delete activity command.","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @param data Data object containing the current list of activities.","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" final Activity activity \u003d activities.get(index-1);","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" activities.remove(activity);","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_DELETED, activity.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" String.format(Message.MESSAGE_ACTIVITY_COUNT, activities.size())};","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS);","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":41}},{"path":"src/main/java/athleticli/commands/activity/EditActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" * Executes the edit activity command provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"public class EditActivityCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static Logger logger \u003d Logger.getLogger(\"EditActivityCommand\");","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private final int index;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private final Activity activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * Constructor for EditActivityCommand.","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param index Index of the activity to be edited.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param activity Updated Activity.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public EditActivityCommand(Activity activity, int index) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assert index \u003e 0 : \"Index should be greater than 0\";","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" this.activity \u003d activity;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * Executes the edit activity command.","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @param data Data object containing the current list of activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" logger.log(Level.INFO, \"Editing activity at index \" + index);","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" activities.set(index-1, activity);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" logger.log(java.util.logging.Level.INFO, \"Activity at index \" + index + \"successfully edited\");","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_UPDATED, activity.toString(),","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String.format(Message.MESSAGE_ACTIVITY_COUNT, activities.size())};","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" logger.log(java.util.logging.Level.WARNING, \"Activity index out of bounds\");","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS);","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":49}},{"path":"src/main/java/athleticli/commands/activity/FindActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindActivityCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public FindActivityCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Returns the activities matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getActivities()","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" .filter(Activity.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" .map(Activity.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .map(Activity::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_ACTIVITY_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35}},{"path":"src/main/java/athleticli/commands/activity/ListActivityCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" * Executes the list activity command provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"public class ListActivityCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final boolean isDetailed;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" * Constructor for ListActivityCommand.","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * @param isDetailed Whether the list should be detailed.","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" public ListActivityCommand(boolean isDetailed) {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" this.isDetailed \u003d isDetailed;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * Lists the activities.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity list.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" final int size \u003d activities.size();","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" if (isDetailed) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" return printDetailedList(activities, size);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" return printList(activities, size);","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" * Prints the list of activities.","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * @param activities The current activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" * @param size The size of the activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" public String[] printList(ActivityList activities, int size) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String[] output \u003d new String[size + 1];","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" output[0] \u003d Message.MESSAGE_ACTIVITY_LIST;","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" output[i+1] \u003d (i+1) + \".\" + activities.get(i).toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" return output;","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" * Prints the detailed list of activities.","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" * @param activities The current activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" * @param size The size of the activity list.","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" * @return The message containing listing of activities which will be shown to the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" public String[] printDetailedList(ActivityList activities, int size) {","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" String[] output \u003d new String[size + 1];","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" output[0] \u003d Message.MESSAGE_ACTIVITY_LIST;","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" output[i+1] \u003d activities.get(i).toDetailedString();","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" return output;","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"AlWo223":64}},{"path":"src/main/java/athleticli/commands/activity/SetActivityGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoalList;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"public class SetActivityGoalCommand extends Command {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" private final ActivityGoal activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" * Constructor for SetActivityGoalCommand.","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" * @param activityGoal Activity goal to be added.","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" public SetActivityGoalCommand(ActivityGoal activityGoal){","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" this.activityGoal \u003d activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * Updates the activity goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param data The current data containing the activity goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" ActivityGoalList activityGoals \u003d data.getActivityGoals();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" activityGoals.add(this.activityGoal);","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" return new String[]{Message.MESSAGE_ACTIVITY_GOAL_ADDED, this.activityGoal.toString(data)};","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"AlWo223":31}},{"path":"src/main/java/athleticli/commands/diet/AddDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Executes the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"public class AddDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private final Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Constructor for AddDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" * @param diet Diet to be added.","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" public AddDietCommand(Diet diet) {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" this.diet \u003d diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" DietList diets \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" diets.add(this.diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" int size \u003d diets.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" String countMessage;","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" if (size \u003e 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" countMessage \u003d String.format(Message.MESSAGE_DIET_COUNT, size);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" countMessage \u003d String.format(Message.MESSAGE_DIET_FIRST, size);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_ADDED, this.diet.toString(), countMessage};","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":44}},{"path":"src/main/java/athleticli/commands/diet/DeleteDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" * Executes the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"public class DeleteDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private final int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Constructor for AddDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" * @param index Diet to be added.","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" public DeleteDietCommand(int index) {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" assert index \u003e 0 : \"Index cannot be less than 1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" DietList dietList \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" int size \u003d dietList.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" if (index \u003e size) {","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_INVALID_DIET_INDEX);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" Diet oldDiet \u003d dietList.get(index - 1);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" dietList.remove(index - 1);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_DELETED, oldDiet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" String.format(Message.MESSAGE_DIET_COUNT, size - 1)};","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":43}},{"path":"src/main/java/athleticli/commands/diet/DeleteDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.ConsoleHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" * Executes the delete-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":"public class DeleteDietGoalCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private static final Logger logger \u003d Logger.getLogger(DeleteDietGoalCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" private final int deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the delete diet goal command.","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" * @param deleteIndex Index of the diet goal to be deleted in the users\u0027 perspective.","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" public DeleteDietGoalCommand(int deleteIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" //deleteIndex that is less than or equal to zero would result in exception","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" assert deleteIndex \u003e\u003d 1: \"\u0027deleteIndex\u0027 should have the value of 1 minimally.\";","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" this.deleteIndex \u003d deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" logger.addHandler(new FileHandler(\"%t/athleticli-log.txt\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" } catch(IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" logger.addHandler(new ConsoleHandler());","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" * Deletes a goal from the Diet Goal List.","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrient goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" logger.log(Level.FINE, \"Executing delete command for diet goals\");","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList dietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" if (dietGoals.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_EMPTY_DIETGOALLIST);","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" DietGoal dietGoalRemoved \u003d dietGoals.get(deleteIndex - 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" dietGoals.remove(deleteIndex - 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" logger.log(Level.FINE, String.format(\"Diet goals %s has been successfully removed\",","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" dietGoalRemoved.getNutrients()));","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_DELETE_HEADER,","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" dietGoalRemoved.toString()};","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_OUT_OF_BOUND, dietGoals.size()));","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yicheng-toh":65}},{"path":"src/main/java/athleticli/commands/diet/EditDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parameter;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" * Executes the edit diet command provided by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"public class EditDietCommand extends Command {","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private final int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private final HashMap\u003cString, String\u003e dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * Constructor for EditDietCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" * @param index Index of the diet to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * @param dietMap Updated Diet.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" public EditDietCommand(int index, HashMap\u003cString, String\u003e dietMap) {","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" assert index \u003e 0 : \"Index should be greater than 0\";","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assert !dietMap.isEmpty() : \"Diet map should not be empty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" this.dietMap \u003d dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" * Executes the edit diet command.","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" * @param data Data object containing the current list of diets.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" * @return String array containing the messages to be printed to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the index provided is out of bounds.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" DietList diets \u003d data.getDiets();","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" int size \u003d diets.size();","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" if (index \u003e size) {","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_INVALID_DIET_INDEX);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" Diet oldDiet \u003d diets.get(index - 1);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" for (String key : dietMap.keySet()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" assert !java.util.Objects.equals(dietMap.get(key), \"\") : \"Diet parameter should not be empty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" switch (key) {","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" case Parameter.CALORIES_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" oldDiet.setCalories(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" case Parameter.PROTEIN_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" oldDiet.setProtein(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" case Parameter.CARB_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" oldDiet.setCarb(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" case Parameter.FAT_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" oldDiet.setFat(Integer.parseInt(dietMap.get(key)));","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" case Parameter.DATETIME_SEPARATOR:","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" LocalDateTime dateTime \u003d Parser.parseDateTime(dietMap.get(key));","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" oldDiet.setDateTime(dateTime);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" default:","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" diets.set(index - 1, oldDiet);","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_UPDATED, oldDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"nihalzp":76}},{"path":"src/main/java/athleticli/commands/diet/EditDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" * Executes the edit-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"public class EditDietGoalCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private final ArrayList\u003cDietGoal\u003e userUpdatedDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the edit diet goal command.","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" * @param dietGoals This is a list consisting of updated existing diet goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" * to be added to the current goal list.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" public EditDietGoalCommand(ArrayList\u003cDietGoal\u003e dietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" userUpdatedDietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" * Updates the Diet Goal List.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrient goals.","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList currentDietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e currentDietGoalsNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" // Populate the set with current diet goal nutrients","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal dietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoalsNutrients.add(dietGoal.getNutrients());","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" // Check if user edited diet goals is in records previously","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" boolean isNutrientGoalInCurrentDietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userDietGoal : userUpdatedDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" String userNewNutrient \u003d userDietGoal.getNutrients();","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" isNutrientGoalInCurrentDietGoalList \u003d currentDietGoalsNutrients.contains(userNewNutrient);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" if (!isNutrientGoalInCurrentDietGoalList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_NOT_EXISTED, userNewNutrient));","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" // Edit updated goals to current diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" int newTargetValue;","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userUpdatedDietGoal : userUpdatedDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal currentDietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" if (!userUpdatedDietGoal.getNutrients().equals(currentDietGoal.getNutrients())) {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" continue;","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" //update new target value to the current goal","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" newTargetValue \u003d userUpdatedDietGoal.getTargetValue();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoal.setTargetValue(newTargetValue);","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d currentDietGoals.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, currentDietGoals.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"yicheng-toh":70}},{"path":"src/main/java/athleticli/commands/diet/FindDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Finds diets matching the date.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"public class FindDietCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public FindDietCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * Returns the diets matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getDiets()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .filter(Diet.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" .map(Diet.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" .map(Diet::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_DIET_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35,"nihalzp":4}},{"path":"src/main/java/athleticli/commands/diet/ListDietCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" * Executes the list diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"public class ListDietCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Constructor for ListDietCommand.","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" public ListDietCommand() {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" * Updates the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" * @param data The current data containing the diet list.","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" DietList dietList \u003d data.getDiets();","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" int size \u003d dietList.size();","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" return new String[]{Message.MESSAGE_DIET_LIST, dietList.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" String.format(Message.MESSAGE_DIET_COUNT, size)};","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":31}},{"path":"src/main/java/athleticli/commands/diet/ListDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":" * Executes the list diet goal commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"public class ListDietGoalCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" * Constructor for ListDietGoalCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" public ListDietGoalCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" * Iterate and returns the string representation for each goal.","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the diet goal list.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList dietGoalList \u003d data.getDietGoals();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d dietGoalList.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" if (dietGoalNum \u003d\u003d 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_NONE};","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, dietGoalList.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":34}},{"path":"src/main/java/athleticli/commands/diet/SetDietGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" * Executes the set-diet-goal commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"public class SetDietGoalCommand extends Command {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private final ArrayList\u003cDietGoal\u003e userNewDietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" * This is a constructor to set up the set diet goal command","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" * @param dietGoals This is a list consisting of new diet goals","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" * to be added to the current goal list.","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" public SetDietGoalCommand(ArrayList\u003cDietGoal\u003e dietGoals) {","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" userNewDietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" * Updates the Diet Goal list.","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" * @param data The current data containing the different nutrients goal value.","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoalList currentDietGoals \u003d data.getDietGoals();","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e currentDietGoalsNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" // Populate the set with current diet goal nutrients","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal dietGoal : currentDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoalsNutrients.add(dietGoal.getNutrients());","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" // Check against user new diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" for (DietGoal userDietGoal : userNewDietGoals) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" String userNewNutrient \u003d userDietGoal.getNutrients();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" if (currentDietGoalsNutrients.contains(userNewNutrient)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(String.format(Message.MESSAGE_DIETGOAL_ALREADY_EXISTED, userNewNutrient));","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" // Add new diet goals to current diet goals","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" currentDietGoals.addAll(userNewDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" int dietGoalNum \u003d currentDietGoals.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" return new String[]{Message.MESSAGE_DIETGOAL_LIST_HEADER, currentDietGoals.toString(),","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" String.format(Message.MESSAGE_DIETGOAL_COUNT, dietGoalNum)};","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"yicheng-toh":59}},{"path":"src/main/java/athleticli/commands/sleep/AddSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" * Executes the add sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"public class AddSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(AddSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" * Constructor for AddSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" * @param from Start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" * @param to End time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" public AddSleepCommand(LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" assert from !\u003d null : \"Start time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" assert to !\u003d null : \"End time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" assert from.isBefore(to) : \"Start time must be before end time\";","lastModifiedDate":"2023-10-20"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating AddSleepCommand with from: \" + from + \" and to: \" + to);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" * Adds the sleep record to the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" Sleep newSleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(newSleep);","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" logger.info(\"Added sleep: \" + newSleep);","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Sleep list: \" + sleepList);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String returnMessage2 \u003d String.format(Message.MESSAGE_SLEEP_ADD_RETURN_2, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" Message.MESSAGE_SLEEP_ADD_RETURN_1,","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" newSleep.toString(),","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" returnMessage2","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":55}},{"path":"src/main/java/athleticli/commands/sleep/DeleteSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" * Executes the delete sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"public class DeleteSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(DeleteSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" * Constructor for DeleteSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" * @param index Index of the sleep to be deleted.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" public DeleteSleepCommand(int index) {","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating DeleteSleepCommand with index: \" + index);","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" * Deletes the sleep record at the specified index.","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" //accessIndex is the index of the sleep in the list accounting for zero-indexing","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" int accessIndex \u003d index - 1; ","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" if (accessIndex \u003c 0 || accessIndex \u003e\u003d sleepList.size()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE);","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003e\u003d 0 : \"Access index cannot be less than 0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003c sleepList.size() : \"Index cannot be more than size of sleep list\";","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" Sleep oldSleep \u003d sleepList.get(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" sleepList.remove(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Deleted sleep: \" + oldSleep);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String returnMessage \u003d String.format(Message.MESSAGE_SLEEP_DELETE_RETURN, index, oldSleep.toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" returnMessage","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":55}},{"path":"src/main/java/athleticli/commands/sleep/EditSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" * Executes the edit sleep commands provided by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class EditSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private final Logger logger \u003d Logger.getLogger(EditSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" * Constructor for EditSleepCommand.","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" * @param index Index of the sleep to be edited.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" * @param from New start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" * @param to New end time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" public EditSleepCommand(int index, LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" this.index \u003d index;","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" assert from !\u003d null : \"Start time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" assert to !\u003d null : \"End time cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" assert from.isBefore(to) : \"Start time must be before end time\";","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Creating EditSleepCommand with index: \" + index + \" from: \" + from + \" and to: \" + to);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" * Edits the sleep record at the specified index.","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d data.getSleeps();","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" //accessIndex is the index of the sleep in the list accounting for zero-indexing","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" int accessIndex \u003d index - 1;","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" if (accessIndex \u003c 0 || accessIndex \u003e\u003d sleepList.size()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE);","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003e\u003d 0 : \"Index cannot be less than 0\";","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" assert accessIndex \u003c sleepList.size() : \"Index cannot be more than size of sleep list\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" Sleep oldSleep \u003d sleepList.get(accessIndex);","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" Sleep newSleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" sleepList.set(accessIndex, newSleep);","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":" String returnMessage \u003d String.format(Message.MESSAGE_SLEEP_EDIT_RETURN, index);","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":" returnMessage,","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"DaDevChia"},"content":" \"original: \" + oldSleep.toString(),","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"DaDevChia"},"content":" \"to new: \" + newSleep.toString(),","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"skylee03":3,"DaDevChia":70}},{"path":"src/main/java/athleticli/commands/sleep/FindSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"public class FindSleepCommand extends FindCommand {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public FindSleepCommand(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" super(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Returns the sleeps matching the date to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @param data The current data.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @return The messages to be shown to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" public String[] execute(Data data) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" var resultStream \u003d data.getSleeps()","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" .find(date)","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" .stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" .filter(Sleep.class::isInstance)","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" .map(Sleep.class::cast)","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" .map(Sleep::toString);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" return Stream.concat(Stream.of(Message.MESSAGE_SLEEP_FIND), resultStream)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" .toArray(String[]::new);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":35}},{"path":"src/main/java/athleticli/commands/sleep/ListSleepCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import athleticli.ui.Message;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class ListSleepCommand extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private static final Logger logger \u003d Logger.getLogger(ListSleepCommand.class.getName());","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" * Lists all the sleep records in the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" * @param data The current data containing the sleep list.","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" * @return The message which will be shown to the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" public String[] execute(Data data) {","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" logger.info(\"Executing ListSleepCommand\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" SleepList sleeps \u003d data.getSleeps();","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" final int size \u003d sleeps.size();","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" if (size \u003d\u003d 0) {","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" logger.warning(\"Sleep list is empty\");","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" return new String[] {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" Message.MESSAGE_SLEEP_LIST_EMPTY","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" return printList(sleeps, size);","lastModifiedDate":"2023-10-20"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public String[] printList(SleepList sleeps, int size) {","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" logger.fine(\"Printing sleep list\");","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" String[] returnString \u003d new String[size+1];","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" returnString[0] \u003d Message.MESSAGE_SLEEP_LIST;","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" assert sleeps.get(i) !\u003d null : \"Sleep record cannot be null\";","lastModifiedDate":"2023-10-20"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" returnString[i+1] \u003d (i + 1) + \". \" + sleeps.get(i).toString();","lastModifiedDate":"2023-10-20"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" return returnString;","lastModifiedDate":"2023-10-20"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"DaDevChia":43}},{"path":"src/main/java/athleticli/commands/sleep/SetSleepGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class SetSleepGoalCommand {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"DaDevChia":4}},{"path":"src/main/java/athleticli/commands/sleep/ViewSleepGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"public class ViewSleepGoalCommand {","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"DaDevChia":8}},{"path":"src/main/java/athleticli/data/Data.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.ActivityGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.data.diet.DietGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.DietList;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.SleepGoalList;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" * Defines the basic fields and methods of data.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"public class Data {","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" private static Data dataInstance;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" private ActivityList activities \u003d new ActivityList();","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" private ActivityGoalList activityGoals \u003d new ActivityGoalList();","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" private DietList diets \u003d new DietList();","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" private DietGoalList dietGoals \u003d new DietGoalList();","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" private SleepList sleeps \u003d new SleepList();","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" private SleepGoalList sleepGoals \u003d new SleepGoalList();","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Returns the singleton instance of `Data`.","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" * @return The singleton instance of `Data`.","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public static Data getInstance() {","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" if (dataInstance \u003d\u003d null) {","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" dataInstance \u003d new Data();","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" return dataInstance;","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" * Loads data from files.","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" public void load() {","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" activities.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" activityGoals.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" diets.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" dietGoals.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" sleeps.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" sleepGoals.load();","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" * Saves data to files.","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" public void save() throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" activities.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" activityGoals.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" diets.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" dietGoals.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" sleeps.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" sleepGoals.save();","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" * Get all the objects","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":" public ActivityList getActivities() {","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"DaDevChia"},"content":" return activities;","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"DaDevChia"},"content":" public ActivityGoalList getActivityGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"DaDevChia"},"content":" return activityGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"DaDevChia"},"content":" public DietList getDiets() {","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"DaDevChia"},"content":" return diets;","lastModifiedDate":"2023-10-14"},{"lineNumber":74,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"DaDevChia"},"content":" public DietGoalList getDietGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"DaDevChia"},"content":" return dietGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"DaDevChia"},"content":" public SleepList getSleeps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":81,"author":{"gitId":"DaDevChia"},"content":" return sleeps;","lastModifiedDate":"2023-10-12"},{"lineNumber":82,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":83,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":84,"author":{"gitId":"DaDevChia"},"content":" public SleepGoalList getSleepGoals() {","lastModifiedDate":"2023-10-12"},{"lineNumber":85,"author":{"gitId":"DaDevChia"},"content":" return sleepGoals;","lastModifiedDate":"2023-10-12"},{"lineNumber":86,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":87,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"DaDevChia"},"content":" * Set all the objects","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"DaDevChia"},"content":" public void setActivities(ActivityList activities) {","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"DaDevChia"},"content":" this.activities \u003d activities;","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"DaDevChia"},"content":" public void setActivityGoals(ActivityGoalList activityGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"DaDevChia"},"content":" this.activityGoals \u003d activityGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"DaDevChia"},"content":" public void setDiets(DietList diets) {","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"DaDevChia"},"content":" this.diets \u003d diets;","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"DaDevChia"},"content":" public void setDietGoals(DietGoalList dietGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"DaDevChia"},"content":" this.dietGoals \u003d dietGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"DaDevChia"},"content":" public void setSleeps(SleepList sleeps) {","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"DaDevChia"},"content":" this.sleeps \u003d sleeps;","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"DaDevChia"},"content":" public void setSleepGoals(SleepGoalList sleepGoals) {","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"DaDevChia"},"content":" this.sleepGoals \u003d sleepGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-12"},{"lineNumber":116,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":58,"DaDevChia":57,"nihalzp":1}},{"path":"src/main/java/athleticli/data/Findable.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public interface Findable {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" * Returns a list of objects matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" * @return A list of objects matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date);","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"skylee03":14}},{"path":"src/main/java/athleticli/data/Goal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" * Defines the basic fields and methods for a goal.","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"public abstract class Goal {","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" * Defines different types of timespans.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" public enum Timespan {","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" DAILY(1),","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" WEEKLY(7),","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" MONTHLY(30),","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" YEARLY(365);","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" private final int days;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" Timespan(int days) {","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" this.days \u003d days;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Returns the number of days in the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" * @return The number of days in the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public int getDays() {","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" return days;","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" private Timespan timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" public Goal(Timespan timespan) {","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" this.timespan \u003d timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * Returns the timespan of this goal.","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" * @return The timespan of this goal.","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" public Timespan getTimespan() {","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" return timespan;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" * Checks whether the date is between the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan of the goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" * @return Whether the date is between the timespan.","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" public static boolean checkDate(LocalDate date, Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" final LocalDate endDate \u003d LocalDate.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" final LocalDate startDate \u003d endDate.minusDays(timespan.getDays() - 1);","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" return !(date.isBefore(startDate) || date.isAfter(endDate));","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * Returns whether the goal is achieved.","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" * @param data The current data containing all records.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" * @return Whether the goal is achieved.","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" public abstract boolean isAchieved(Data data);","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"skylee03":67,"AlWo223":3}},{"path":"src/main/java/athleticli/data/StorableList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.storage.Storage;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"public abstract class StorableList\u003cT\u003e extends ArrayList\u003cT\u003e {","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" private String path;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" * Constructs an empty list with its storage path.","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" public StorableList(String path) {","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" this.path \u003d path;","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" * Saves to a file.","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" public void save() throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" Storage.save(path, this.stream().map(this::unparse));","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * Loads from a file.","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" public void load() {","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" Storage.load(path).map(this::parse).forEachOrdered(this::add);","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" this.clear();","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" * Parses a T object from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" * @return The T object parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" public abstract T parse(String s);","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" * Unparses a T object to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" * @param t The T object to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the T object.","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" public abstract String unparse(T t);","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"skylee03":51}},{"path":"src/main/java/athleticli/data/activity/Activity.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" * Represents a physical activity consisting of basic sports data.","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"public class Activity {","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" public static final DateTimeFormatter DATE_TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"MMMM d, \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" \"yyyy \u0027at\u0027 h:mm a\", Locale.ENGLISH);","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" public static final DateTimeFormatter TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"HH:mm:ss\",","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" Locale.ENGLISH);","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int columnWidth \u003d 40;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private String description;","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private final String caption;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private final LocalTime movingTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private final int distance;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private int calories;","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" private final LocalDateTime startDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" * Generates a new general sports activity with some basic stats.","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" public Activity(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime) {","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" this.movingTime \u003d movingTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" this.distance \u003d distance;","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" this.startDateTime \u003d startDateTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" this.caption \u003d caption;","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public LocalTime getMovingTime() {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" return movingTime;","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public int getDistance() {","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" return distance;","lastModifiedDate":"2023-10-10"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public String getCaption() {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" return caption;","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" public LocalDateTime getStartDateTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" return startDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public int getCalories() {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" return this.calories;","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" public int getColumnWidth() {","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" return columnWidth;","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the activity","lastModifiedDate":"2023-10-13"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" return \"[Activity] \" + caption + \" | \" + distanceOutput + \" | \" + movingTimeOutput + \" | \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" startDateTimeOutput;","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" * Returns distance in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the distance","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" public String generateDistanceStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" double distanceInKm \u003d distance / 1000.0;","lastModifiedDate":"2023-10-13"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" return \"Distance: \" + String.format(Locale.ENGLISH, \"%.2f\", distanceInKm)","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" + \" km\";","lastModifiedDate":"2023-10-13"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" * Returns moving time in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the moving time","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" public String generateMovingTimeStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" return \"Time: \" + movingTime.format(TIME_FORMATTER);","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" * Returns a short representation of the moving time with the format depending on the duration.","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the moving time","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":" public String generateShortMovingTimeStringOutput() {","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" String output \u003d \"\";","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" if (movingTime.getHour() \u003e 0) {","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":" output +\u003d movingTime.getHour() + \"h \" + movingTime.getMinute() + \"m\";","lastModifiedDate":"2023-10-24"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-24"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" output +\u003d movingTime.getMinute() + \"m \" + movingTime.getSecond() + \"s\";","lastModifiedDate":"2023-10-24"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" return \"Time: \" + output;","lastModifiedDate":"2023-10-24"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":" * Returns start date and time in user-friendly output format.","lastModifiedDate":"2023-10-22"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the start date and time","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":" public String generateStartDateTimeStringOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":" return startDateTime.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-24"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the activity.","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the activity","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Activity - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, movingTimeOutput, columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tCalories: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"AlWo223"},"content":" this.getCalories() + \" kcal\", \"...\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"AlWo223"},"content":" * Formats two strings into two columns of equal width.","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"AlWo223"},"content":" * @param left String to be placed in the left column","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"AlWo223"},"content":" * @param right String to be placed in the right column","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"AlWo223"},"content":" * @param columnWidth width of each column","lastModifiedDate":"2023-10-22"},{"lineNumber":141,"author":{"gitId":"AlWo223"},"content":" * @return a formatted string with two columns of equal width","lastModifiedDate":"2023-10-22"},{"lineNumber":142,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"AlWo223"},"content":" public String formatTwoColumns(String left, String right, int columnWidth) {","lastModifiedDate":"2023-10-17"},{"lineNumber":144,"author":{"gitId":"AlWo223"},"content":" return String.format(\"%-\" + columnWidth + \"s%s\", left, right);","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":146,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":5,"AlWo223":141}},{"path":"src/main/java/athleticli/data/activity/ActivityGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class ActivityGoal extends Goal {","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":" public enum GoalType {","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DURATION // can be extended","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" public enum Sport {","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" RUNNING, CYCLING, SWIMMING, GENERAL","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private int targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private final GoalType goalType;","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private final Sport sport;","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" * Constructs an activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan of the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * @param goalType The goal type of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param sport The sport of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param targetValue The target value of the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" public ActivityGoal(Timespan timespan, GoalType goalType, Sport sport, int targetValue) {","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" super(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" this.goalType \u003d goalType;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" this.sport \u003d sport;","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * Examines whether the activity goal is achieved.","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" * @param data The data containing the activity list.","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" * @return Whether the activity goal is achieved.","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" public boolean isAchieved(Data data) throws IllegalStateException {","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" int total \u003d getCurrentValue(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" return total \u003e\u003d targetValue;","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" * Returns the current value of the activity goal metric.","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" * @param data The data containing the activity list.","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" * @return The current value of the activity goal metric.","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" public int getCurrentValue(Data data) throws IllegalStateException {","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e activityClass \u003d getActivityClass();","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" int total;","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" switch(goalType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" case DISTANCE:","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" total \u003d activities.getTotalDistance(activityClass, this.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" case DURATION:","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" total \u003d activities.getTotalDuration(activityClass, this.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" total \u003d total / 60;","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" throw new IllegalStateException(\"Unexpected value: \" + goalType);","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" return total;","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" public void setTargetValue(int targetValue) {","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" * Returns the class of the activity associated with the activity goal.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" * @return The class of the activity.","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" public Class\u003c?\u003e getActivityClass() {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" switch (this.sport) {","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" case RUNNING:","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" return Run.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" case CYCLING:","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" return Cycle.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" case SWIMMING:","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" return Swim.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" return Activity.class;","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" * Returns the string representation of the activity goal including progress information.","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" * @return The string representation of the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" public String toString(Data data) {","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" String goalTypeString \u003d goalType.name();","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" String sportString \u003d sport.name();","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" return (getTimespan().name().toLowerCase() + \" \" + sportString.toLowerCase() + \" \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":" goalTypeString.toLowerCase() + \": \" + getCurrentValue(data) + \" / \" + targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" public GoalType getGoalType() {","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" return goalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" public Sport getSport() {","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" return sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" public int getTargetValue() {","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" return targetValue;","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"AlWo223":106}},{"path":"src/main/java/athleticli/data/activity/ActivityGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_ACTIVITY_GOAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class ActivityGoalList extends StorableList\u003cActivityGoal\u003e {","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" * Constructs an activity goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" public ActivityGoalList() {","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" super(PATH_ACTIVITY_GOAL);","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * Parses an activity goal from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" * @return The activity goal parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" public ActivityGoal parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" * Unparses an activity goal to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" * @param activityGoal The activity goal to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" public String unparse(ActivityGoal activityGoal) {","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":38}},{"path":"src/main/java/athleticli/data/activity/ActivityList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_ACTIVITY;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.util.Comparator;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"public class ActivityList extends StorableList\u003cActivity\u003e implements Findable {","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * Constructs an empty activity list.","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" public ActivityList() {","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" super(PATH_ACTIVITY);","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" * Returns a list of activities matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * @return A list of activities matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cObject\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : this) {","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" if (activity.getStartDateTime().toLocalDate().equals(date)) {","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" result.add(activity);","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * Sorts the activities in the list by date.","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public void sort() {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" this.sort(Comparator.comparing(Activity::getStartDateTime).reversed());","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" * Returns a list of activities within the timespan.","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" * @param timespan The timespan to be matched.","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" * @return A list of activities within the timespan.","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public ArrayList\u003cActivity\u003e filterByTimespan(Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : this) {","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" LocalDate activityDate \u003d activity.getStartDateTime().toLocalDate();","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" if (Goal.checkDate(activityDate, timespan)) {","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" result.add(activity);","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" * Returns the total distance of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" * @param activityClass The activity class to be matched.","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" * @return The total distance of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" public int getTotalDistance(Class\u003c?\u003e activityClass, Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredActivities \u003d filterByTimespan(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" int runningDistance \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : filteredActivities) {","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" if (activityClass.isInstance(activity)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" runningDistance +\u003d activity.getDistance();","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" return runningDistance;","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" * Returns the total moving time in seconds of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" * @param activityClass The activity class to be matched.","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" * @return The total moving time of all activities in the list matching the specified activity class.","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" public int getTotalDuration(Class\u003c?\u003e activityClass, Goal.Timespan timespan) {","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredActivities \u003d filterByTimespan(timespan);","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" int movingTime \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" for (Activity activity : filteredActivities) {","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" if (activityClass.isInstance(activity)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d activity.getMovingTime();","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" movingTime +\u003d duration.getHour() * 3600 + duration.getMinute() * 60 + duration.getSecond();","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" return movingTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"skylee03"},"content":" * Parses an activity from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"skylee03"},"content":" * @return The activity parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"skylee03"},"content":" public Activity parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"skylee03"},"content":" * Unparses an activity to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"skylee03"},"content":" * @param activity The activity to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the activity.","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"skylee03"},"content":" public String unparse(Activity activity) {","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":51,"AlWo223":67}},{"path":"src/main/java/athleticli/data/activity/Cycle.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" * Represents a cycling activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Cycle extends Activity {","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final int elevationGain;","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" private final double averageSpeed;","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * Generates a new cycling activity with cycling specific stats.","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * averageSpeed is calculated automatically based on the distance and movingTime.","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * @param elevationGain elevation gain in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" public Cycle(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, int elevationGain) {","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.elevationGain \u003d elevationGain;","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" this.averageSpeed \u003d this.calculateAverageSpeed();","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" * Calculates the average speed of the cycle in km/h.","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * @return average speed of the cycle in km/h","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" public double calculateAverageSpeed() {","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" double dist \u003d (double) this.getDistance();","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double time \u003d (double) this.getMovingTime().toSecondOfDay() / 3600;","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" return (dist/1000) / time;","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the cycling activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the cycle","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Cycle]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" String speedOutput \u003d generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Speed: \" + speedOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" * Returns a string representation of the average speed of the cycle.","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the average speed of the cycle","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public String generateSpeedStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" return String.format(Locale.ENGLISH, \"%.2f\", this.averageSpeed) + \" km/h\";","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the cycle.","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the cycle","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String speedOutput \u003d generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Cycle - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, \"Elevation Gain: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" elevationGain + \" m\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\t\" + movingTimeOutput, \"Avg Speed: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" speedOutput, columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tCalories: \" + this.getCalories() + \" kcal\", \"Max Speed: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" \"tbd\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" public int getElevationGain() {","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" return this.elevationGain;","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":1,"AlWo223":86}},{"path":"src/main/java/athleticli/data/activity/Run.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":" * Represents a running activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class Run extends Activity {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" private final int elevationGain;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" private final double averagePace;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final int steps;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" * Generates a new running activity with running specific stats.","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" * averageSpeed is calculated automatically based on the distance and movingTime.","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in minutes","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * @param elevationGain elevation gain in meters","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" public Run(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, int elevationGain) {","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" this.elevationGain \u003d elevationGain;","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" this.averagePace \u003d this.calculateAveragePace();","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" this.steps \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" * Calculates the average pace of the run in minutes per km.","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" * @return average pace of the run in minutes per km","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" public double calculateAveragePace() {","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" double time \u003d (double) this.getMovingTime().toSecondOfDay() / 60;","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double distance \u003d (double) this.getDistance() / 1000;","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" return time / distance;","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" * Converts the average pace of the run to the user-friendly format mm:ss.","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" * @return average pace of run in mm:ss format","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" public String convertAveragePaceToString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" int totalSeconds \u003d (int) Math.round(this.averagePace*60);","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" int minutes \u003d totalSeconds / 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" int seconds \u003d totalSeconds % 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" return String.format(\"%d:%02d\", minutes, seconds);","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" * Returns a single line summary of the running activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the run","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Run]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" String paceOutput \u003d this.convertAveragePaceToString() + \" /km\";","lastModifiedDate":"2023-10-13"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Pace: \" + paceOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the run.","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the run","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String paceOutput \u003d this.convertAveragePaceToString() + \" /km\";","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Run - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, \"Avg Pace: \" + paceOutput,","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tMoving Time: \" + movingTimeOutput, \"Elevation Gain: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" elevationGain + \" m\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tCalories: \" + this.getCalories() + \" kcal\", \"Steps: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" this.steps, columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" public int getElevationGain() {","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" return elevationGain;","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":1,"AlWo223":91}},{"path":"src/main/java/athleticli/data/activity/Swim.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":" * Represents a swimming activity consisting of relevant evaluation data.","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class Swim extends Activity {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" private final int laps;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" private final SwimmingStyle style;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":" private final int averageLapTime;","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" public enum SwimmingStyle {","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" BUTTERFLY,","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" BACKSTROKE,","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" BREASTSTROKE,","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" FREESTYLE","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" * Generates a new swimming activity with swimming specific stats.","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" * By default, calories is 0, i.e., not tracked.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" * averageLapTime is calculated automatically based on the movingTime and laps.","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" * @param movingTime duration of the activity in HH:mm:ss format","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" * @param distance distance covered in meters","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" * @param startDateTime start date and time of the activity","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" * @param caption a caption of the activity chosen by the user (e.g., \"Morning Run\")","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" * @param style swimming style","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" public Swim(String caption, LocalTime movingTime, int distance, LocalDateTime startDateTime, SwimmingStyle style) {","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" super(caption, movingTime, distance, startDateTime);","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" this.laps \u003d this.calculateLaps();","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" this.style \u003d style;","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" this.averageLapTime \u003d this.calculateAverageLapTime();","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" * Calculates the average lap time in seconds.","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" * @return average lap time in seconds","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public int calculateAverageLapTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" return this.getMovingTime().toSecondOfDay() / this.laps;","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" * Calculates the number of laps.","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" * @return number of laps","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public int calculateLaps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" return this.getDistance() / 50;","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" public int getLaps() {","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" return laps;","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public int getAverageLapTime() {","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" return averageLapTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" * Returns a short string representation of the swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" * @return a string representation of the swim","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" String result \u003d super.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"[Activity]\", \"[Swim]\");","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String averageLapTimeOutput \u003d this.averageLapTime + \"s\";","lastModifiedDate":"2023-10-13"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" result \u003d result.replace(\"Time: \", \"Avg Lap Time: \" + averageLapTimeOutput + \" | Time: \");","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" return result;","lastModifiedDate":"2023-10-13"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" * Returns a detailed summary of the swim.","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" * @return a multiline string representation of the swim","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" public String toDetailedString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" String startDateTimeOutput \u003d generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" String movingTimeOutput \u003d generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" String distanceOutput \u003d generateDistanceStringOutput();","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" int columnWidth \u003d getColumnWidth();","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" String header \u003d \"[Swim - \" + this.getCaption() + \" - \" + startDateTimeOutput + \"]\";","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" String firstRow \u003d formatTwoColumns(\"\\t\" + distanceOutput, movingTimeOutput, columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" String secondRow \u003d formatTwoColumns(\"\\tLaps: \" + this.getLaps(), \"Style: \"","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" + this.getStyle(), columnWidth);","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" String thirdRow \u003d formatTwoColumns(\"\\tAvg Lap Time: \" + averageLapTime + \" s\", \"Calories: \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" this.getCalories() + \" kcal\", columnWidth);","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" return String.join(System.lineSeparator(), header, firstRow, secondRow, thirdRow);","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":" public SwimmingStyle getStyle() {","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":" return style;","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"skylee03":1,"AlWo223":98}},{"path":"src/main/java/athleticli/data/diet/Diet.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":" * Defines the basic fields and methods of a diet.","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Diet {","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" public static final DateTimeFormatter DATE_TIME_FORMATTER \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" DateTimeFormatter.ofPattern(\"MMMM d, \" + \"yyyy \u0027at\u0027 h:mm a\", Locale.ENGLISH);","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" private int calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private int protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private int carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private int fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private LocalDateTime dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" * Constructs a \u003ccode\u003eDiet\u003c/code\u003e object.","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" * @param calories The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" * @param protein Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" * @param carb Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" * @param fat Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * @param dateTime The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" public Diet(int calories, int protein, int carb, int fat, LocalDateTime dateTime) {","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" assert calories \u003e\u003d 0 : \"Calories cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" this.calories \u003d calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" assert protein \u003e\u003d 0 : \"Protein cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" this.protein \u003d protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" assert carb \u003e\u003d 0 : \"Carb cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" this.carb \u003d carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" assert fat \u003e\u003d 0 : \"Fat cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" this.fat \u003d fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" this.dateTime \u003d dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" * Returns the caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" * @return The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" public int getCalories() {","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" return calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" * Sets the caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" * @param calories The caloric value of the diet in cal.","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" public void setCalories(int calories) {","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" assert calories \u003e\u003d 0 : \"Calories cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" this.calories \u003d calories;","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" * Returns the protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" * @return Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" public int getProtein() {","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" return protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" * Sets the protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" * @param protein Protein intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" public void setProtein(int protein) {","lastModifiedDate":"2023-10-14"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" assert protein \u003e\u003d 0 : \"Protein cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" this.protein \u003d protein;","lastModifiedDate":"2023-10-14"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" * Returns the carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" * @return Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" public int getCarb() {","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" return carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" * Sets the carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" * @param carb Carbohydrate intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" public void setCarb(int carb) {","lastModifiedDate":"2023-10-14"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" assert carb \u003e\u003d 0 : \"Carb cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" this.carb \u003d carb;","lastModifiedDate":"2023-10-14"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" * Returns the fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" * @return Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" public int getFat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":" return fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" * Sets the fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" * @param fat Fat intake in grams.","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":" public void setFat(int fat) {","lastModifiedDate":"2023-10-14"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":" assert fat \u003e\u003d 0 : \"Fat cannot be negative\";","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" this.fat \u003d fat;","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" * Returns the date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" * @return The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" public LocalDateTime getDateTime() {","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" return dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" * Sets the date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"nihalzp"},"content":" * @param dateTime The date and time of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" public void setDateTime(LocalDateTime dateTime) {","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"nihalzp"},"content":" this.dateTime \u003d dateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet.","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" return \"Calories: \" + calories + \" Protein: \" + protein + \" Carb: \" + carb + \" Fat: \" + fat +","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" \" Date: \" + dateTime.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":145,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":5,"nihalzp":140}},{"path":"src/main/java/athleticli/data/diet/DietGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":" * Represents a diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class DietGoal {","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":" private String nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":" private int targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" private int currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" private boolean isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal with no current value.","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" public DietGoal(String nutrients, int targetValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" currentValue \u003d 0;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" isGoalAchieved \u003d false;","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal with a current value.","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" * @param currentValue The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" public DietGoal(String nutrients, int targetValue, int currentValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" this.currentValue \u003d currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" isGoalAchieved \u003d currentValue \u003e\u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" * Returns the nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" * @return The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" public String getNutrients() {","lastModifiedDate":"2023-10-13"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" return nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" * Sets the nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" * @param nutrients The nutrients of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" public void setNutrients(String nutrients) {","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" this.nutrients \u003d nutrients;","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" * Returns the target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" * @return The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" public int getTargetValue() {","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" return targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" * Sets the target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" * @param targetValue The target value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" public void setTargetValue(int targetValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" this.targetValue \u003d targetValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" setIsGoalAchieved(currentValue \u003e\u003d targetValue);","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" * Returns the current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" * @return The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" public int getCurrentValue() {","lastModifiedDate":"2023-10-13"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" return currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" * Sets the current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" * @param currentValue The current value of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" public void setCurrentValue(int currentValue) {","lastModifiedDate":"2023-10-13"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" this.currentValue \u003d currentValue;","lastModifiedDate":"2023-10-13"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" setIsGoalAchieved(currentValue \u003e\u003d targetValue);","lastModifiedDate":"2023-10-14"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" * Returns whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" * @return Whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" public boolean getIsGoalAchieved() {","lastModifiedDate":"2023-10-13"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" return isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":" * Sets whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" * @param isGoalAchieved Whether the diet goal is achieved.","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" private void setIsGoalAchieved(boolean isGoalAchieved) {","lastModifiedDate":"2023-10-13"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" this.isGoalAchieved \u003d isGoalAchieved;","lastModifiedDate":"2023-10-13"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":" * Returns the string representation of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":" * @return The string representation of the diet goal.","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-13"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" return nutrients + \" intake progress: (\" + currentValue + \"/\" + targetValue + \")\\n\";","lastModifiedDate":"2023-10-14"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":122,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"nihalzp":118}},{"path":"src/main/java/athleticli/data/diet/DietGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_DIET_GOAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":" * Represents a list of diet goals.","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class DietGoalList extends StorableList\u003cDietGoal\u003e {","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" public DietGoalList() {","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" super(PATH_DIET_GOAL);","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet goal list.","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c size(); i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" result.append(\"\\t\").append(i + 1).append(\". \").append(get(i).toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" if (i !\u003d size() - 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" result.append(\"\\n\");","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" return result.toString();","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" * Parses a diet goal from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * @return The diet goal parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" public DietGoal parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" * Unparses a diet goal to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" * @param dietGoal The diet goal to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the diet goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" public String unparse(DietGoal dietGoal) {","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":33,"yicheng-toh":1,"nihalzp":24}},{"path":"src/main/java/athleticli/data/diet/DietList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_DIET;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" * Represents a list of diets.","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":"public class DietList extends StorableList\u003cDiet\u003e implements Findable {","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Constructs a diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" public DietList() {","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" super(PATH_DIET);","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" * Returns a string representation of the diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" * @return A string representation of the diet list.","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c size(); i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" result.append(i + 1).append(\". \").append(get(i).toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" if (i !\u003d size() - 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" result.append(\"\\n\");","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" return result.toString();","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * Returns a list of diets matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" * @return A list of diets matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" ArrayList\u003cObject\u003e result \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" for (Diet diet : this) {","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" if (diet.getDateTime().toLocalDate().equals(date)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" result.add(diet);","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" return result;","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" * Parses a diet from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" * @return The diet parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" public Diet parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" * Unparses a diet to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" * @param diet The diet to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the diet.","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" public String unparse(Diet diet) {","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":46,"nihalzp":34}},{"path":"src/main/java/athleticli/data/sleep/Sleep.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":" * Represents a sleep record.","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"public class Sleep {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":" private static final DateTimeFormatter DATE_TIME_FORMATTER \u003d DateTimeFormatter.ofPattern(\"dd-MM-YYYY HH:mm\");","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" * Constructor for Sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" * @param from Start time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" * @param to End time of the sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" public Sleep(LocalDateTime from, LocalDateTime to) {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" this.from \u003d from;","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" this.to \u003d to;","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" * toString method for Sleep.","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" * @return String representation of the sleep record.","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" return \"sleep record from \" + from.format(DATE_TIME_FORMATTER) + \" to \" + to.format(DATE_TIME_FORMATTER);","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":3,"DaDevChia":32}},{"path":"src/main/java/athleticli/data/sleep/SleepGoal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"public class SleepGoal {","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":4,"DaDevChia":4}},{"path":"src/main/java/athleticli/data/sleep/SleepGoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":" * To be implemented in future version of AthletiCLI.","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_SLEEP_GOAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class SleepGoalList extends StorableList\u003cSleepGoal\u003e {","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" * Constructs a sleep goal list.","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" public SleepGoalList() {","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" super(PATH_SLEEP_GOAL);","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" * Parses a sleep goal from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @return The sleep goal parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" public SleepGoal parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" * Unparses a sleep goal to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" * @param sleepGoal The sleep goal to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the sleep goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" public String unparse(SleepGoal sleepGoal) {","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":38,"DaDevChia":3}},{"path":"src/main/java/athleticli/data/sleep/SleepList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import static athleticli.storage.Config.PATH_SLEEP;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import athleticli.data.Findable;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import athleticli.data.StorableList;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" * Represents a list of sleep records.","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"public class SleepList extends StorableList\u003cSleep\u003e implements Findable {","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * Constructs a sleep list with its storage path.","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" public SleepList() {","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" super(PATH_SLEEP);","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" * Returns a list of sleeps matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * @param date The date to be matched.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * @return A list of sleeps matching the date.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" public ArrayList\u003cObject\u003e find(LocalDate date) {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" * Parses a sleep from a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" * @param s The string to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" * @return The sleep parsed from the string.","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" public Sleep parse(String s) {","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" * Unparses a sleep to a string.","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":" * @param sleep The sleep to be parsed.","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" * @return The string unparsed from the sleep.","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" public String unparse(Sleep sleep) {","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" // TODO","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" return null;","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":54,"DaDevChia":3}},{"path":"src/main/java/athleticli/exceptions/AthletiException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.exceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Represents the exceptions that need to be shown to the user.","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class AthletiException extends Exception {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public AthletiException(String message) {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" super(message);","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":10}},{"path":"src/main/java/athleticli/exceptions/WrappedIOException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.exceptions;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" * Wraps an \u003ccode\u003eIOException\u003c/code\u003e in \u003ccode\u003eRuntimeExcpetion\u003c/code\u003e so that it can be thrown from inside a stream.","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"public class WrappedIOException extends RuntimeException {","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" private IOException cause;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" public WrappedIOException(IOException cause) {","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" this.cause \u003d cause;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" public IOException getCause() {","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" return cause;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"skylee03":19}},{"path":"src/main/java/athleticli/storage/Config.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Defines string literals or configurations used for file storage.","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class Config {","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String PATH_ACTIVITY \u003d \"./data/activity.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" public static final String PATH_ACTIVITY_GOAL \u003d \"./data/activity_goal.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" public static final String PATH_SLEEP \u003d \"./data/sleep.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" public static final String PATH_SLEEP_GOAL \u003d \"./data/sleep_goal.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" public static final String PATH_DIET \u003d \"./data/diet.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" public static final String PATH_DIET_GOAL \u003d \"./data/diet_goal.txt\";","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":13}},{"path":"src/main/java/athleticli/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":"import java.util.Objects;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.WrappedIOException;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods for file storage.","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":"public class Storage {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * Saves strings into a file.","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" * @param path The path to the file.","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" * @param items The stream of strings.","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" * @throws IOException","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" public static void save(String path, Stream\u003cString\u003e items) throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" File file \u003d new File(path);","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" if (!file.exists()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" file.getParentFile().mkdirs();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" file.createNewFile();","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" FileWriter fileWriter \u003d new FileWriter(file);","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" items.filter(Objects::nonNull).forEachOrdered(str -\u003e {","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" fileWriter.write(str);","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" throw new WrappedIOException(e);","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" });","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" } catch (WrappedIOException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" throw e.getCause();","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" fileWriter.close();","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" public static Stream\u003cString\u003e load(String path) throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" return Files.lines(Path.of(path));","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"skylee03":48}},{"path":"src/main/java/athleticli/ui/CommandName.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" * Defines string literals for command names.","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"public class CommandName {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_BYE \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_HELP \u003d \"help\";","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_SAVE \u003d \"save\";","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_FIND \u003d \"find\";","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_ADD \u003d \"add-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_EDIT \u003d \"edit-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_DELETE \u003d \"delete-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" public static final String COMMAND_SLEEP_LIST \u003d \"list-sleep\";","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_SLEEP_FIND \u003d \"find-sleep\";","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_RUN \u003d \"add-run\";","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY \u003d \"add-activity\";","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_CYCLE \u003d \"add-cycle\";","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_SWIM \u003d \"add-swim\";","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_DELETE \u003d \"delete-activity\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_LIST \u003d \"list-activity\";","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_EDIT \u003d \"edit-activity\";","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_ACTIVITY_FIND \u003d \"find-activity\";","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_RUN_EDIT \u003d \"edit-run\";","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_CYCLE_EDIT \u003d \"edit-cycle\";","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_SWIM_EDIT \u003d \"edit-swim\";","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" public static final String COMMAND_ACTIVITY_GOAL_SET \u003d \"set-activity-goal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_SET \u003d \"set-diet-goal\";","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_EDIT \u003d \"edit-diet-goal\";","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_LIST \u003d \"list-diet-goal\";","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" public static final String COMMAND_DIET_GOAL_DELETE \u003d \"delete-diet-goal\";","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_ADD \u003d \"add-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_DELETE \u003d \"delete-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_EDIT \u003d \"edit-diet\";","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" public static final String COMMAND_DIET_LIST \u003d \"list-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" public static final String COMMAND_DIET_FIND \u003d \"find-diet\";","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":18,"DaDevChia":6,"AlWo223":11,"yicheng-toh":4,"nihalzp":4}},{"path":"src/main/java/athleticli/ui/Message.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"public class Message {","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":" public static final String PROMPT \u003d \"\u003e \";","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":" public static final String LINE \u003d \"____________________________________________________________\\n\";","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":" public static final String PREFIX_MESSAGE \u003d \" \";","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":" public static final String PREFIX_EXCEPTION \u003d \"OOPS!!! \";","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_BYE \u003d \"Bye. Hope to see you again soon!\";","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" public static final String[] MESSAGE_HELLO \u003d {\"Hello! I\u0027m AthletiCLI!\", \"What can I do for you?\"};","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_SAVE \u003d \"File saved successfully!\";","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_CAPTION_MISSING \u003d \"The caption of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DURATION_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"duration/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DISTANCE_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"distance/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATETIME_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" \"Please specify the activity duration using \\\"datetime/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" \"Please specify the calories burned using \\\"calories/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_SPORT_MISSING \u003d \"Please specify the sport using \\\"sport/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_TYPE_MISSING \u003d \"Please specify the goal type using \\\"type/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_PERIOD_MISSING \u003d \"Please specify the period using \\\"period/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITYGOAL_TARGET_MISSING \u003d \"Please specify the target value using \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" \"\\\"target/\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" \"Please specify the protein intake using \\\"protein/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" \"Please specify the carbohydrate intake using \\\"carb/\\\"!\";","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_MISSING \u003d \"Please specify the fat intake using \\\"fat/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DATETIME_MISSING \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" \"Please specify the datetime of the diet using \\\"datetime/\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_CAPTION_EMPTY \u003d \"The caption of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DURATION_EMPTY \u003d \"The duration of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DISTANCE_EMPTY \u003d \"The distance of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DATETIME_EMPTY \u003d \"The datetime of an activity cannot be empty!\";","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_EMPTY \u003d \"The calories burned cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_EMPTY \u003d \"The protein intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_EMPTY \u003d \"The carbohydrate intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_EMPTY \u003d \"The fat intake cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DATETIME_EMPTY \u003d \"The datetime of a diet cannot be empty!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_UPDATED \u003d \"Ok, I\u0027ve updated this diet:\";","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DURATION_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" \"The duration of an activity must be in the format \\\"hh:mm:ss\\\"!\";","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DISTANCE_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" \"The distance of an activity must be a positive integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_DISTANCE_NEGATIVE \u003d","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" \"The distance of an activity cannot be negative!\";","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TARGET_NEGATIVE \u003d \"The target value cannot be negative. \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" \"You wanna make progress, not regress ;)\";","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TARGET_INVALID \u003d \"The target value of an activity goal must be a positive \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" \"integer!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATETIME_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" \"The datetime must be in the format \\\"yyyy-MM-dd HH:mm\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DATE_INVALID \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" \"The date must be in the format \\\"yyyy-MM-dd\\\"!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CALORIES_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" \"The calories burned must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_SPORT_INVALID \u003d \"The sport of an activity must be one of the following: \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" \"\\\"running\\\", \\\"cycling\\\", \\\"swimming\\\", \\\"general\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_TYPE_INVALID \u003d \"The type of an activity must be either \\\"distance\\\" or \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" \"\\\"duration\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_PERIOD_INVALID \u003d \"The period of an activity must be either \\\"weekly\\\" or \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" \"\\\"monthly\\\"!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_PROTEIN_INVALID \u003d \"The protein intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_CARB_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" \"The carbohydrate intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_FAT_INVALID \u003d \"The fat intake must be a non-negative integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_ACTIVITY_FIND \u003d \"I\u0027ve found these activities:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_ADDED \u003d \"Well done! I\u0027ve added this activity:\";","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_GOAL_ADDED \u003d \"Alright, I\u0027ve added this activity goal:\";","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_DELETED \u003d \"Gotcha, I\u0027ve deleted this activity:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_ADDED \u003d \"Well done! I\u0027ve added this diet:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ELEVATION_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" \"Please specify the elevation gain using \\\"elevation/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_ELEVATION_EMPTY \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":" \"The elevation gain of an activity cannot be empty!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ELEVATION_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" \"The elevation gain of an activity must be an integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_INDEX_INVALID \u003d \"The activity index must be an integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_INDEX_OUT_OF_BOUNDS \u003d \"The activity index does not exist, check your \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" \"list for the correct index!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_SWIMMINGSTYLE_MISSING \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" \"Please specify the swimming style using \\\"style/\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_SWIMMINGSTYLE_INVALID \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" \"The swimming style of an activity must be one of \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" \"the following: \\\"butterfly\\\", \\\"backstroke\\\", \\\"breaststroke\\\", \\\"freestyle\\\"!\";","lastModifiedDate":"2023-10-13"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ACTIVITY_COUNT \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" \"You have tracked a total of %d activities. Keep pushing!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_LIST \u003d \"These are the activities you have tracked so far:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_EDIT_INVALID \u003d \"Oops, the format of the edit command is wrong! Please\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" \" provide the index and the updated entry!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" public static final String MESSAGE_ACTIVITY_UPDATED \u003d \"Ok, I\u0027ve updated this activity:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_COUNT \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of %d diets. Keep grinding!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_ACTIVITY_FIRST \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your first activity. This is just the beginning!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT \u003d \"The target value for nutrients \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"yicheng-toh"},"content":" \"must be a positive integer!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INVALID_NUTRIENT \u003d \"Key word to nutrients goals has to be one of the \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"yicheng-toh"},"content":" \"following: \\\"calories\\\", \\\"protein\\\", \\\"carb\\\", \\\"fats\\\"!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_ALREADY_EXISTED \u003d \"Diet goal for %s has already existed. \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"yicheng-toh"},"content":" \"Please edit the goal instead!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_NOT_EXISTED \u003d \"Diet goal for %s is not present. \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"yicheng-toh"},"content":" \"Please add the goal before editing it!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_COUNT \u003d \"Now you have %d diet goal(s).\";","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_NONE \u003d \"There are no goals at the moment. Add a diet goal to start.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_LIST_HEADER \u003d \"These are your goal(s):\\n\";","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT \u003d \"Please provide a positive integer.\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_EMPTY_DIETGOALLIST \u003d \"There is no diet goals at the moment. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"yicheng-toh"},"content":" \"Please add one to continue.\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_DELETE_HEADER \u003d \"The following goal has been deleted:\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_OUT_OF_BOUND \u003d \"Unable to fetch diet goal. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"yicheng-toh"},"content":" \"Please enter a value from 1 to %d.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSAGE_DIETGOAL_INSUFFICIENT_INPUT \u003d \"Please input the following keywords \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"yicheng-toh"},"content":" \"to create or edit your diet goals:\\n \\\"calories\\\", \\\"protein\\\", \\\"carb\\\", \\\"fats\\\" \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":117,"author":{"gitId":"yicheng-toh"},"content":" \"followed by the target value.\\n\" + \"\\te.g. calories/100\";","lastModifiedDate":"2023-10-24"},{"lineNumber":118,"author":{"gitId":"yicheng-toh"},"content":" public static final String MESSSAGE_DIETGOAL_REPEATED_NUTRIENT \u003d \"Please ensure that there are \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"yicheng-toh"},"content":" \"no repetitions for your diet goal nutrients.\";","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_FIRST \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your first diet. This is just the beginning!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_INVALID_DIET_INDEX \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":" \"The diet index is invalid! Please enter a valid diet index!\";","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_INDEX_TYPE_INVALID \u003d \"The diet index must be a positive integer!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_DELETED \u003d \"Noted. I\u0027ve removed this diet:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_LIST \u003d \"Here are the diets in your list:\";","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_DIET_FIND \u003d \"I\u0027ve found these diets:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" public static final String MESSAGE_DIET_NO_CHANGE_REQUESTED \u003d \"No change requested. Specify the appropriate \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" \"parameters to edit the diet.\";","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_DELETE_INVALID_INDEX \u003d \"Invalid index. Please enter a valid index.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_DELETE_RETURN \u003d \"Got it. I\u0027ve deleted this sleep record at index %d: %s\";","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_EDIT_RETURN \u003d \"Got it. I\u0027ve changed this sleep record at index %d:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_LIST \u003d \"Here are the sleep records in your list:\\n\";","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_LIST_EMPTY \u003d \"You have no sleep records in your list.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_ADD_RETURN_1 \u003d \"Got it. I\u0027ve added this sleep record:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"DaDevChia"},"content":" public static final String MESSAGE_SLEEP_ADD_RETURN_2 \u003d \"Now you have %d sleep records in the list.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_SLEEP_FIND \u003d \"I\u0027ve found these sleeps:\";","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"DaDevChia"},"content":" \"Invalid date-time format. Please use dd-MM-yyyy HH:mm.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"DaDevChia"},"content":" \"Please specify both the start and end time of your sleep.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":144,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the start time of your sleep before the end time.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_DELETE_NO_INDEX \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the index of the sleep record you want to delete.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_PARSER_SLEEP_EDIT_NO_INDEX \u003d ","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":" \"Please specify the index of the sleep record you want to edit.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_SLEEP_EDIT_INDEX_OOBE \u003d ","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" \"The index of the sleep record you want to edit is out of bounds.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" public static final String ERRORMESSAGE_SLEEP_DELETE_INDEX_OOBE \u003d","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" \"The index of the sleep record you want to delete is out of bounds.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"I\u0027m sorry, but I don\u0027t know what that means :-(\";","lastModifiedDate":"2023-10-16"},{"lineNumber":155,"author":{"gitId":"skylee03"},"content":" public static final String MESSAGE_IO_EXCEPTION \u003d \"An I/O exception occurred.\";","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":157,"author":{"gitId":"skylee03"},"content":" /* Help Messages */","lastModifiedDate":"2023-10-21"},{"lineNumber":158,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY","lastModifiedDate":"2023-10-21"},{"lineNumber":159,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME\";","lastModifiedDate":"2023-10-21"},{"lineNumber":160,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_RUN \u003d CommandName.COMMAND_RUN","lastModifiedDate":"2023-10-21"},{"lineNumber":161,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":162,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_SWIM \u003d CommandName.COMMAND_SWIM","lastModifiedDate":"2023-10-21"},{"lineNumber":163,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS\";","lastModifiedDate":"2023-10-21"},{"lineNumber":164,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_CYCLE \u003d CommandName.COMMAND_CYCLE","lastModifiedDate":"2023-10-21"},{"lineNumber":165,"author":{"gitId":"skylee03"},"content":" + \" CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":166,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":167,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":168,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_LIST","lastModifiedDate":"2023-10-21"},{"lineNumber":169,"author":{"gitId":"skylee03"},"content":" + \" [-d]\";","lastModifiedDate":"2023-10-21"},{"lineNumber":170,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":171,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME\";","lastModifiedDate":"2023-10-21"},{"lineNumber":172,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_RUN \u003d CommandName.COMMAND_RUN_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":173,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":174,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_SWIM \u003d CommandName.COMMAND_SWIM_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":175,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME laps/LAPS\";","lastModifiedDate":"2023-10-21"},{"lineNumber":176,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_CYCLE \u003d CommandName.COMMAND_CYCLE_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":177,"author":{"gitId":"skylee03"},"content":" + \" INDEX CAPTION duration/DURATION distance/DISTANCE datetime/DATETIME elevation/ELEVATION\";","lastModifiedDate":"2023-10-21"},{"lineNumber":178,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_ACTIVITY \u003d CommandName.COMMAND_ACTIVITY_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":180,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_DIET \u003d CommandName.COMMAND_DIET_ADD","lastModifiedDate":"2023-10-21"},{"lineNumber":181,"author":{"gitId":"nihalzp"},"content":" + \" calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME\";","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"nihalzp"},"content":" public static final String HELP_EDIT_DIET \u003d CommandName.COMMAND_DIET_EDIT","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"nihalzp"},"content":" + \" INDEX calories/CALORIES protein/PROTEIN carb/CARB fat/FAT datetime/DATETIME\";","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_DIET \u003d CommandName.COMMAND_DIET_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":185,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":186,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_DIET \u003d CommandName.COMMAND_DIET_LIST;","lastModifiedDate":"2023-10-21"},{"lineNumber":187,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_DIET \u003d CommandName.COMMAND_DIET_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":188,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":189,"author":{"gitId":"skylee03"},"content":" public static final String HELP_ADD_SLEEP \u003d CommandName.COMMAND_SLEEP_ADD","lastModifiedDate":"2023-10-21"},{"lineNumber":190,"author":{"gitId":"skylee03"},"content":" + \" start/START end/END\";","lastModifiedDate":"2023-10-21"},{"lineNumber":191,"author":{"gitId":"skylee03"},"content":" public static final String HELP_LIST_SLEEP \u003d CommandName.COMMAND_SLEEP_LIST;","lastModifiedDate":"2023-10-21"},{"lineNumber":192,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DELETE_SLEEP \u003d CommandName.COMMAND_SLEEP_DELETE","lastModifiedDate":"2023-10-21"},{"lineNumber":193,"author":{"gitId":"skylee03"},"content":" + \" INDEX\";","lastModifiedDate":"2023-10-21"},{"lineNumber":194,"author":{"gitId":"skylee03"},"content":" public static final String HELP_EDIT_SLEEP \u003d CommandName.COMMAND_SLEEP_EDIT","lastModifiedDate":"2023-10-21"},{"lineNumber":195,"author":{"gitId":"skylee03"},"content":" + \" INDEX start/START end/END\";","lastModifiedDate":"2023-10-21"},{"lineNumber":196,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND_SLEEP \u003d CommandName.COMMAND_SLEEP_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":197,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":198,"author":{"gitId":"skylee03"},"content":" public static final String HELP_SAVE \u003d CommandName.COMMAND_SAVE;","lastModifiedDate":"2023-10-22"},{"lineNumber":199,"author":{"gitId":"skylee03"},"content":" public static final String HELP_BYE \u003d CommandName.COMMAND_BYE;","lastModifiedDate":"2023-10-21"},{"lineNumber":200,"author":{"gitId":"skylee03"},"content":" public static final String HELP_HELP \u003d CommandName.COMMAND_HELP","lastModifiedDate":"2023-10-21"},{"lineNumber":201,"author":{"gitId":"skylee03"},"content":" + \" [COMMAND]\";","lastModifiedDate":"2023-10-21"},{"lineNumber":202,"author":{"gitId":"skylee03"},"content":" public static final String HELP_FIND \u003d CommandName.COMMAND_FIND","lastModifiedDate":"2023-10-23"},{"lineNumber":203,"author":{"gitId":"skylee03"},"content":" + \" DATE\";","lastModifiedDate":"2023-10-23"},{"lineNumber":204,"author":{"gitId":"skylee03"},"content":" public static final String HELP_DETAILS \u003d","lastModifiedDate":"2023-10-21"},{"lineNumber":205,"author":{"gitId":"skylee03"},"content":" \"Please check our user guide (https://ay2324s1-cs2113-t17-1.github.io/tp/) for details.\";","lastModifiedDate":"2023-10-21"},{"lineNumber":206,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":63,"DaDevChia":22,"AlWo223":35,"yicheng-toh":26,"nihalzp":60}},{"path":"src/main/java/athleticli/ui/NutrientVerifier.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":" * Verify the nutrient from a list of approved nutrients to be log in diet and diet goals","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"public class NutrientVerifier {","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":" public static final Set\u003cString\u003e VERIFIED_NUTRIENTS \u003d Set.of(\"fats\", \"carb\", \"protein\", \"calories\");","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" * Verifies if a nutrient is approved.","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" * @param nutrient","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" * @return boolean value if it is found in the approved list.","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" public static boolean verify(String nutrient) {","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" return VERIFIED_NUTRIENTS.contains(nutrient);","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"yicheng-toh":20}},{"path":"src/main/java/athleticli/ui/Parameter.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"public class Parameter {","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":" public static final String DURATION_SEPARATOR \u003d \"duration/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":" public static final String DISTANCE_SEPARATOR \u003d \"distance/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":" public static final String DATETIME_SEPARATOR \u003d \"datetime/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":" public static final String ELEVATION_SEPARATOR \u003d \"elevation/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":" public static final String SWIMMING_STYLE_SEPARATOR \u003d \"style/\";","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":" public static final String DETAIL_FLAG \u003d \"-d\";","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" public static final String CALORIES_SEPARATOR \u003d \"calories/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" public static final String PROTEIN_SEPARATOR \u003d \"protein/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" public static final String CARB_SEPARATOR \u003d \"carb/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" public static final String FAT_SEPARATOR \u003d \"fat/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" public static final String START_TIME_SEPARATOR \u003d \"start/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" public static final String END_TIME_SEPARATOR \u003d \"end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" public static final String SPORT_SEPARATOR \u003d \"sport/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" public static final String TYPE_SEPARATOR \u003d \"type/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public static final String PERIOD_SEPARATOR \u003d \"period/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public static final String TARGET_SEPARATOR \u003d \"target/\";","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"DaDevChia":3,"AlWo223":15,"nihalzp":5}},{"path":"src/main/java/athleticli/ui/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.ByeCommand;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.Command;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.FindCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.HelpCommand;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.SaveCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.AddDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.DeleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.DeleteDietGoalCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.EditDietCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.EditDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.diet.FindDietCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.ListDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.ListDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.SetDietGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.AddSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.DeleteSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.EditSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.sleep.FindSleepCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.ListSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Cycle;","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Swim;","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.AddActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.DeleteActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.EditActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.FindActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.ListActivityCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":"import athleticli.commands.activity.SetActivityGoalCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" * Defines the basic methods for command parser.","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":"public class Parser {","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" private static final DateTimeFormatter sleepTimeFormatter \u003d","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm\");","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" * Splits the raw user input into two parts, and then returns them. The first part is the command type,","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" * while the second part is the command arguments. The second part can be empty.","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * @param rawUserInput The raw user input.","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" * @return A string array whose first element is the command type and the second element is the command","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" * arguments.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" public static String[] splitCommandWordAndArgs(String rawUserInput) {","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" assert rawUserInput !\u003d null : \"`rawUserInput` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" final String[] split \u003d rawUserInput.trim().split(\"\\\\s+\", 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" return split.length \u003d\u003d 2 ? split : new String[]{split[0], \"\"};","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" * Parses the raw user input and returns the corresponding command object.","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" * @param rawUserInput The raw user input.","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" * @return An object representing the command.","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" public static Command parseCommand(String rawUserInput) throws AthletiException {","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" assert rawUserInput !\u003d null : \"`rawUserInput` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" final String[] commandTypeAndParams \u003d splitCommandWordAndArgs(rawUserInput);","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":" final String commandType \u003d commandTypeAndParams[0];","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":" final String commandArgs \u003d commandTypeAndParams[1];","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" switch (commandType) {","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_BYE:","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" return new ByeCommand();","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_HELP:","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" return new HelpCommand(commandArgs);","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_SAVE:","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"skylee03"},"content":" return new SaveCommand();","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"skylee03"},"content":" return new FindCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"skylee03"},"content":" /* Sleep Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_ADD:","lastModifiedDate":"2023-10-12"},{"lineNumber":96,"author":{"gitId":"DaDevChia"},"content":" return parseSleepAdd(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":97,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_LIST:","lastModifiedDate":"2023-10-12"},{"lineNumber":98,"author":{"gitId":"DaDevChia"},"content":" return new ListSleepCommand();","lastModifiedDate":"2023-10-12"},{"lineNumber":99,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_EDIT:","lastModifiedDate":"2023-10-12"},{"lineNumber":100,"author":{"gitId":"DaDevChia"},"content":" return parseSleepEdit(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"DaDevChia"},"content":" case CommandName.COMMAND_SLEEP_DELETE:","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"DaDevChia"},"content":" return parseSleepDelete(commandArgs);","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_SLEEP_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"skylee03"},"content":" return new FindSleepCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"skylee03"},"content":" /* Activity Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY:","lastModifiedDate":"2023-10-13"},{"lineNumber":107,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseActivity(commandArgs));","lastModifiedDate":"2023-10-13"},{"lineNumber":108,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_CYCLE:","lastModifiedDate":"2023-10-13"},{"lineNumber":109,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseRunCycle(commandArgs, false));","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_RUN:","lastModifiedDate":"2023-10-13"},{"lineNumber":111,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseRunCycle(commandArgs, true));","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_SWIM:","lastModifiedDate":"2023-10-13"},{"lineNumber":113,"author":{"gitId":"AlWo223"},"content":" return new AddActivityCommand(parseSwim(commandArgs));","lastModifiedDate":"2023-10-13"},{"lineNumber":114,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_DELETE:","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"AlWo223"},"content":" return new DeleteActivityCommand(parseActivityIndex(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_LIST:","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"AlWo223"},"content":" return new ListActivityCommand(parseActivityListDetail(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" return new EditActivityCommand(parseActivityEdit(commandArgs),","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_RUN_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseRunEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_CYCLE_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseCycleEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_SWIM_EDIT:","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"AlWo223"},"content":" return new EditActivityCommand(parseSwimEdit(commandArgs), parseActivityEditIndex(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_ACTIVITY_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"skylee03"},"content":" return new FindActivityCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"AlWo223"},"content":" case CommandName.COMMAND_ACTIVITY_GOAL_SET:","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"AlWo223"},"content":" return new SetActivityGoalCommand(parseActivityGoal(commandArgs));","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"skylee03"},"content":" /* Diet Management */","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_SET:","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"yicheng-toh"},"content":" return new SetDietGoalCommand(parseDietGoalSetEdit(commandArgs));","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_EDIT:","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"yicheng-toh"},"content":" return new EditDietGoalCommand(parseDietGoalSetEdit(commandArgs));","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_LIST:","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"yicheng-toh"},"content":" return new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"yicheng-toh"},"content":" case CommandName.COMMAND_DIET_GOAL_DELETE:","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"yicheng-toh"},"content":" return new DeleteDietGoalCommand(parseDietGoalDelete(commandArgs));","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_ADD:","lastModifiedDate":"2023-10-15"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" return new AddDietCommand(parseDiet(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_EDIT:","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" return new EditDietCommand(parseDietIndex(commandArgs), parseDietEdit(commandArgs));","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_DELETE:","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":" return new DeleteDietCommand(parseDietIndex(commandArgs));","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":" case CommandName.COMMAND_DIET_LIST:","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":" return new ListDietCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"skylee03"},"content":" case CommandName.COMMAND_DIET_FIND:","lastModifiedDate":"2023-10-23"},{"lineNumber":149,"author":{"gitId":"skylee03"},"content":" return new FindDietCommand(parseDate(commandArgs));","lastModifiedDate":"2023-10-23"},{"lineNumber":150,"author":{"gitId":"skylee03"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":151,"author":{"gitId":"skylee03"},"content":" throw new AthletiException(Message.MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":153,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":154,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":155,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":156,"author":{"gitId":"AlWo223"},"content":" * Parses the index of an activity.","lastModifiedDate":"2023-10-15"},{"lineNumber":157,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the index.","lastModifiedDate":"2023-10-15"},{"lineNumber":159,"author":{"gitId":"AlWo223"},"content":" * @return index The parsed Integer index.","lastModifiedDate":"2023-10-15"},{"lineNumber":160,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-15"},{"lineNumber":161,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":162,"author":{"gitId":"AlWo223"},"content":" public static int parseActivityIndex(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"AlWo223"},"content":" final String commandArgsTrimmed \u003d commandArgs.trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":164,"author":{"gitId":"AlWo223"},"content":" int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":165,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":166,"author":{"gitId":"AlWo223"},"content":" index \u003d Integer.parseInt(commandArgsTrimmed);","lastModifiedDate":"2023-10-15"},{"lineNumber":167,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":168,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_INDEX_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":169,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":170,"author":{"gitId":"AlWo223"},"content":" return index;","lastModifiedDate":"2023-10-15"},{"lineNumber":171,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":172,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":173,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":174,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated activity for the edit command.","lastModifiedDate":"2023-10-18"},{"lineNumber":175,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated activity.","lastModifiedDate":"2023-10-18"},{"lineNumber":177,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed Activity object.","lastModifiedDate":"2023-10-18"},{"lineNumber":178,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":179,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":180,"author":{"gitId":"AlWo223"},"content":" public static Activity parseActivityEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":182,"author":{"gitId":"AlWo223"},"content":" return parseActivity(arguments.split(\" \", 2)[1]);","lastModifiedDate":"2023-10-17"},{"lineNumber":183,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":184,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":185,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":186,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":187,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":188,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":189,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated run for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated run.","lastModifiedDate":"2023-10-18"},{"lineNumber":192,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed run object.","lastModifiedDate":"2023-10-18"},{"lineNumber":193,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":194,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":195,"author":{"gitId":"AlWo223"},"content":" public static Activity parseRunEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":196,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":197,"author":{"gitId":"AlWo223"},"content":" return parseRunCycle(arguments.split(\" \", 2)[1], true);","lastModifiedDate":"2023-10-17"},{"lineNumber":198,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":199,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":200,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":201,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":202,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":203,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"AlWo223"},"content":" * Parses the provided updated cycle for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":206,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated cycle.","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed cycle object.","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"AlWo223"},"content":" public static Activity parseCycleEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":211,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":212,"author":{"gitId":"AlWo223"},"content":" return parseRunCycle(arguments.split(\" \", 2)[1], false);","lastModifiedDate":"2023-10-17"},{"lineNumber":213,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":214,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":215,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":216,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":217,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":218,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"AlWo223"},"content":" * Parses the provided update swim for the edit command","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":221,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the updated swim.","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"AlWo223"},"content":" * @return activity The parsed swim object.","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"AlWo223"},"content":" public static Activity parseSwimEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":226,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":227,"author":{"gitId":"AlWo223"},"content":" return parseSwim(arguments.split(\" \", 2)[1]);","lastModifiedDate":"2023-10-17"},{"lineNumber":228,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":229,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":230,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":231,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":232,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":233,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"AlWo223"},"content":" * Parses the index of an activity update for the edit command.","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":236,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the index.","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"AlWo223"},"content":" * @return index The parsed Integer index.","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"AlWo223"},"content":" public static int parseActivityEditIndex(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":241,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":242,"author":{"gitId":"AlWo223"},"content":" return parseActivityIndex(arguments.split(\" \", 2)[0]);","lastModifiedDate":"2023-10-17"},{"lineNumber":243,"author":{"gitId":"AlWo223"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":244,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITY_EDIT_INVALID);","lastModifiedDate":"2023-10-17"},{"lineNumber":245,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":246,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":247,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":248,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":249,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for viewing the activity list and returns whether the user wants the detailed","lastModifiedDate":"2023-10-25"},{"lineNumber":250,"author":{"gitId":"nihalzp"},"content":" * view","lastModifiedDate":"2023-10-25"},{"lineNumber":251,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":252,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-17"},{"lineNumber":253,"author":{"gitId":"AlWo223"},"content":" * @return boolean Whether the user wants the detailed view.","lastModifiedDate":"2023-10-17"},{"lineNumber":254,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":255,"author":{"gitId":"AlWo223"},"content":" public static boolean parseActivityListDetail(String commandArgs) {","lastModifiedDate":"2023-10-23"},{"lineNumber":256,"author":{"gitId":"AlWo223"},"content":" return commandArgs.toLowerCase().contains(Parameter.DETAIL_FLAG);","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":258,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":259,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":260,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for an activity and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":261,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":262,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":263,"author":{"gitId":"AlWo223"},"content":" * @return An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":264,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":265,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":266,"author":{"gitId":"AlWo223"},"content":" public static Activity parseActivity(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":267,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":268,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":269,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":270,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":271,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":272,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":273,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":274,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":275,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":276,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":277,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":278,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":279,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":280,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":281,"author":{"gitId":"AlWo223"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":282,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":283,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":284,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":285,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":286,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":287,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":288,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":289,"author":{"gitId":"AlWo223"},"content":" return new Activity(caption, durationParsed, distanceParsed, datetimeParsed);","lastModifiedDate":"2023-10-13"},{"lineNumber":290,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":291,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":292,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":293,"author":{"gitId":"AlWo223"},"content":" * Parses the raw activity duration input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":294,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"AlWo223"},"content":" * @param duration The raw user input containing the duration.","lastModifiedDate":"2023-10-22"},{"lineNumber":296,"author":{"gitId":"AlWo223"},"content":" * @return durationParsed The parsed LocalTime duration.","lastModifiedDate":"2023-10-25"},{"lineNumber":297,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":298,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":299,"author":{"gitId":"AlWo223"},"content":" public static LocalTime parseDuration(String duration) throws AthletiException {","lastModifiedDate":"2023-10-24"},{"lineNumber":300,"author":{"gitId":"AlWo223"},"content":" LocalTime durationParsed;","lastModifiedDate":"2023-10-24"},{"lineNumber":301,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":302,"author":{"gitId":"AlWo223"},"content":" durationParsed \u003d LocalTime.parse(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":303,"author":{"gitId":"AlWo223"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":304,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":305,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":306,"author":{"gitId":"AlWo223"},"content":" return durationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":307,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":308,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":309,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":310,"author":{"gitId":"AlWo223"},"content":" * Parses the raw date time input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":311,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"AlWo223"},"content":" * @param datetime The raw user input containing the date time.","lastModifiedDate":"2023-10-22"},{"lineNumber":313,"author":{"gitId":"AlWo223"},"content":" * @return datetimeParsed The parsed LocalDateTime object.","lastModifiedDate":"2023-10-22"},{"lineNumber":314,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-22"},{"lineNumber":315,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":316,"author":{"gitId":"AlWo223"},"content":" public static LocalDateTime parseDateTime(String datetime) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":317,"author":{"gitId":"AlWo223"},"content":" LocalDateTime datetimeParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":318,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":319,"author":{"gitId":"AlWo223"},"content":" datetimeParsed \u003d LocalDateTime.parse(datetime.replace(\" \", \"T\"));","lastModifiedDate":"2023-10-13"},{"lineNumber":320,"author":{"gitId":"AlWo223"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":321,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":322,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":323,"author":{"gitId":"AlWo223"},"content":" return datetimeParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":324,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":325,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":326,"author":{"gitId":"skylee03"},"content":" public static LocalDate parseDate(String date) throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":327,"author":{"gitId":"skylee03"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":328,"author":{"gitId":"skylee03"},"content":" return LocalDate.parse(date);","lastModifiedDate":"2023-10-23"},{"lineNumber":329,"author":{"gitId":"skylee03"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":330,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DATE_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":331,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":332,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":333,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":334,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":335,"author":{"gitId":"AlWo223"},"content":" * Parses the raw activity distance input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":336,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":337,"author":{"gitId":"AlWo223"},"content":" * @param distance The raw user input containing the distance.","lastModifiedDate":"2023-10-22"},{"lineNumber":338,"author":{"gitId":"AlWo223"},"content":" * @return distanceParsed The parsed Integer distance.","lastModifiedDate":"2023-10-22"},{"lineNumber":339,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":340,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":341,"author":{"gitId":"AlWo223"},"content":" public static int parseDistance(String distance) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":342,"author":{"gitId":"AlWo223"},"content":" int distanceParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":343,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":344,"author":{"gitId":"AlWo223"},"content":" distanceParsed \u003d Integer.parseInt(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":345,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":346,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":347,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":348,"author":{"gitId":"AlWo223"},"content":" if (distanceParsed \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":349,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_NEGATIVE);","lastModifiedDate":"2023-10-23"},{"lineNumber":350,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":351,"author":{"gitId":"AlWo223"},"content":" return distanceParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":352,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":353,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":354,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":355,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating an activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":356,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":357,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":358,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":359,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":360,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":361,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":362,"author":{"gitId":"nihalzp"},"content":" public static void checkMissingActivityArguments(int durationIndex, int distanceIndex,","lastModifiedDate":"2023-10-15"},{"lineNumber":363,"author":{"gitId":"nihalzp"},"content":" int datetimeIndex) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":364,"author":{"gitId":"AlWo223"},"content":" if (durationIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":365,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":366,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":367,"author":{"gitId":"AlWo223"},"content":" if (distanceIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":368,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":369,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":370,"author":{"gitId":"AlWo223"},"content":" if (datetimeIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-12"},{"lineNumber":371,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_MISSING);","lastModifiedDate":"2023-10-12"},{"lineNumber":372,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":373,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":374,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":375,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":376,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a run or cycle and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":377,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":378,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":379,"author":{"gitId":"AlWo223"},"content":" * @return An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":380,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-18"},{"lineNumber":381,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":382,"author":{"gitId":"AlWo223"},"content":" public static Activity parseRunCycle(String arguments, boolean isRun) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":383,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":384,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":385,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":386,"author":{"gitId":"AlWo223"},"content":" final int elevationIndex \u003d arguments.indexOf(Parameter.ELEVATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":387,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":388,"author":{"gitId":"AlWo223"},"content":" checkMissingRunCycleArguments(durationIndex, distanceIndex, datetimeIndex, elevationIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":389,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":390,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":391,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":392,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":393,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":394,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":395,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":396,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":397,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":398,"author":{"gitId":"nihalzp"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length(), elevationIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":399,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":400,"author":{"gitId":"AlWo223"},"content":" final String elevation \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":401,"author":{"gitId":"AlWo223"},"content":" arguments.substring(elevationIndex + Parameter.ELEVATION_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":402,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":403,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime, elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":404,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":405,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":406,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":407,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":408,"author":{"gitId":"AlWo223"},"content":" final int elevationParsed \u003d parseElevation(elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":409,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":410,"author":{"gitId":"AlWo223"},"content":" if (isRun) {","lastModifiedDate":"2023-10-17"},{"lineNumber":411,"author":{"gitId":"AlWo223"},"content":" return new Run(caption, durationParsed, distanceParsed, datetimeParsed, elevationParsed);","lastModifiedDate":"2023-10-13"},{"lineNumber":412,"author":{"gitId":"AlWo223"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":413,"author":{"gitId":"AlWo223"},"content":" return new Cycle(caption, durationParsed, distanceParsed, datetimeParsed, elevationParsed);","lastModifiedDate":"2023-10-17"},{"lineNumber":414,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":415,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":416,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":417,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":418,"author":{"gitId":"AlWo223"},"content":" * Parses the raw elevation input provided by the user.","lastModifiedDate":"2023-10-22"},{"lineNumber":419,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":420,"author":{"gitId":"AlWo223"},"content":" * @param elevation The raw user input containing the elevation.","lastModifiedDate":"2023-10-22"},{"lineNumber":421,"author":{"gitId":"AlWo223"},"content":" * @return elevationParsed The parsed Integer elevation.","lastModifiedDate":"2023-10-22"},{"lineNumber":422,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not an integer.","lastModifiedDate":"2023-10-22"},{"lineNumber":423,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":424,"author":{"gitId":"AlWo223"},"content":" public static int parseElevation(String elevation) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":425,"author":{"gitId":"AlWo223"},"content":" int elevationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":426,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":427,"author":{"gitId":"AlWo223"},"content":" elevationParsed \u003d Integer.parseInt(elevation);","lastModifiedDate":"2023-10-13"},{"lineNumber":428,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":429,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":430,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":431,"author":{"gitId":"AlWo223"},"content":" return elevationParsed;","lastModifiedDate":"2023-10-13"},{"lineNumber":432,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":433,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":434,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":435,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating a run or cycle.","lastModifiedDate":"2023-10-22"},{"lineNumber":436,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":437,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":438,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":439,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":440,"author":{"gitId":"AlWo223"},"content":" * @param elevationIndex The position of the elevation separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":441,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":442,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":443,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingRunCycleArguments(int durationIndex, int distanceIndex, int datetimeIndex,","lastModifiedDate":"2023-10-13"},{"lineNumber":444,"author":{"gitId":"AlWo223"},"content":" int elevationIndex) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":445,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":446,"author":{"gitId":"AlWo223"},"content":" if (elevationIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":447,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":448,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":449,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":450,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":451,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":452,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating a swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":453,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":454,"author":{"gitId":"AlWo223"},"content":" * @param durationIndex The position of the duration separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":455,"author":{"gitId":"AlWo223"},"content":" * @param distanceIndex The position of the distance separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":456,"author":{"gitId":"AlWo223"},"content":" * @param datetimeIndex The position of the datetime separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":457,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyleIndex The position of the swimming style separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":458,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-22"},{"lineNumber":459,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":460,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingSwimArguments(int durationIndex, int distanceIndex, int datetimeIndex,","lastModifiedDate":"2023-10-13"},{"lineNumber":461,"author":{"gitId":"AlWo223"},"content":" int swimmingStyleIndex) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":462,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityArguments(durationIndex, distanceIndex, datetimeIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":463,"author":{"gitId":"AlWo223"},"content":" if (swimmingStyleIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":464,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":465,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":466,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":467,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":468,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":469,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating an activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":470,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":471,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":472,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":473,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":474,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":475,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":476,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":477,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":478,"author":{"gitId":"nihalzp"},"content":" String datetime) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":479,"author":{"gitId":"AlWo223"},"content":" if (caption.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":480,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_CAPTION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":481,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":482,"author":{"gitId":"AlWo223"},"content":" if (duration.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":483,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DURATION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":484,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":485,"author":{"gitId":"AlWo223"},"content":" if (distance.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":486,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DISTANCE_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":487,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":488,"author":{"gitId":"AlWo223"},"content":" if (datetime.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":489,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_DATETIME_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":490,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":491,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":492,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":493,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":494,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating a cycle or run.","lastModifiedDate":"2023-10-22"},{"lineNumber":495,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":496,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":497,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":498,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":499,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":500,"author":{"gitId":"AlWo223"},"content":" * @param elevation The elevation of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":501,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":502,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":503,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":504,"author":{"gitId":"nihalzp"},"content":" String datetime,","lastModifiedDate":"2023-10-15"},{"lineNumber":505,"author":{"gitId":"AlWo223"},"content":" String elevation) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":506,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":507,"author":{"gitId":"AlWo223"},"content":" if (elevation.isEmpty()) {","lastModifiedDate":"2023-10-13"},{"lineNumber":508,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ELEVATION_EMPTY);","lastModifiedDate":"2023-10-13"},{"lineNumber":509,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":510,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":511,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":512,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":513,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input includes any empty arguments for creating a swim.","lastModifiedDate":"2023-10-22"},{"lineNumber":514,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":515,"author":{"gitId":"AlWo223"},"content":" * @param caption The caption of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":516,"author":{"gitId":"AlWo223"},"content":" * @param duration The duration of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":517,"author":{"gitId":"AlWo223"},"content":" * @param distance The distance of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":518,"author":{"gitId":"AlWo223"},"content":" * @param datetime The datetime of the activity.","lastModifiedDate":"2023-10-22"},{"lineNumber":519,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyleIndex The position of the swimming style separator.","lastModifiedDate":"2023-10-22"},{"lineNumber":520,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are empty.","lastModifiedDate":"2023-10-22"},{"lineNumber":521,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":522,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyActivityArguments(String caption, String duration, String distance,","lastModifiedDate":"2023-10-15"},{"lineNumber":523,"author":{"gitId":"nihalzp"},"content":" String datetime,","lastModifiedDate":"2023-10-25"},{"lineNumber":524,"author":{"gitId":"nihalzp"},"content":" int swimmingStyleIndex) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":525,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":526,"author":{"gitId":"AlWo223"},"content":" if (swimmingStyleIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-13"},{"lineNumber":527,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_MISSING);","lastModifiedDate":"2023-10-13"},{"lineNumber":528,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":529,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":530,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":531,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":532,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a swim and returns the corresponding activity object.","lastModifiedDate":"2023-10-13"},{"lineNumber":533,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":534,"author":{"gitId":"AlWo223"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-13"},{"lineNumber":535,"author":{"gitId":"AlWo223"},"content":" * @return activity An object representing the activity.","lastModifiedDate":"2023-10-13"},{"lineNumber":536,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":537,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":538,"author":{"gitId":"AlWo223"},"content":" public static Activity parseSwim(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":539,"author":{"gitId":"AlWo223"},"content":" final int durationIndex \u003d arguments.indexOf(Parameter.DURATION_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":540,"author":{"gitId":"AlWo223"},"content":" final int distanceIndex \u003d arguments.indexOf(Parameter.DISTANCE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":541,"author":{"gitId":"AlWo223"},"content":" final int datetimeIndex \u003d arguments.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-23"},{"lineNumber":542,"author":{"gitId":"AlWo223"},"content":" final int swimmingStyleIndex \u003d arguments.indexOf(Parameter.SWIMMING_STYLE_SEPARATOR);","lastModifiedDate":"2023-10-18"},{"lineNumber":543,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":544,"author":{"gitId":"AlWo223"},"content":" checkMissingSwimArguments(durationIndex, distanceIndex, datetimeIndex, swimmingStyleIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":545,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":546,"author":{"gitId":"AlWo223"},"content":" final String caption \u003d arguments.substring(0, durationIndex).trim();","lastModifiedDate":"2023-10-13"},{"lineNumber":547,"author":{"gitId":"AlWo223"},"content":" final String duration \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":548,"author":{"gitId":"nihalzp"},"content":" arguments.substring(durationIndex + Parameter.DURATION_SEPARATOR.length(), distanceIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":549,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":550,"author":{"gitId":"AlWo223"},"content":" final String distance \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":551,"author":{"gitId":"nihalzp"},"content":" arguments.substring(distanceIndex + Parameter.DISTANCE_SEPARATOR.length(), datetimeIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":552,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":553,"author":{"gitId":"AlWo223"},"content":" final String datetime \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":554,"author":{"gitId":"nihalzp"},"content":" arguments.substring(datetimeIndex + Parameter.DATETIME_SEPARATOR.length(), swimmingStyleIndex)","lastModifiedDate":"2023-10-25"},{"lineNumber":555,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":556,"author":{"gitId":"AlWo223"},"content":" final String swimmingStyle \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":557,"author":{"gitId":"AlWo223"},"content":" arguments.substring(swimmingStyleIndex + Parameter.SWIMMING_STYLE_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":558,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":559,"author":{"gitId":"AlWo223"},"content":" checkEmptyActivityArguments(caption, duration, distance, datetime, swimmingStyleIndex);","lastModifiedDate":"2023-10-13"},{"lineNumber":560,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":561,"author":{"gitId":"AlWo223"},"content":" final LocalTime durationParsed \u003d parseDuration(duration);","lastModifiedDate":"2023-10-24"},{"lineNumber":562,"author":{"gitId":"AlWo223"},"content":" final int distanceParsed \u003d parseDistance(distance);","lastModifiedDate":"2023-10-13"},{"lineNumber":563,"author":{"gitId":"AlWo223"},"content":" final LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-13"},{"lineNumber":564,"author":{"gitId":"AlWo223"},"content":" final Swim.SwimmingStyle swimmingStyleParsed \u003d parseSwimmingStyle(swimmingStyle);","lastModifiedDate":"2023-10-13"},{"lineNumber":565,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":566,"author":{"gitId":"AlWo223"},"content":" return new Swim(caption, durationParsed, distanceParsed, datetimeParsed, swimmingStyleParsed);","lastModifiedDate":"2023-10-18"},{"lineNumber":567,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":568,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":569,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":570,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for a swimming style and returns the corresponding swimming style object.","lastModifiedDate":"2023-10-22"},{"lineNumber":571,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":572,"author":{"gitId":"AlWo223"},"content":" * @param swimmingStyle The raw user input containing the swimming style.","lastModifiedDate":"2023-10-22"},{"lineNumber":573,"author":{"gitId":"AlWo223"},"content":" * @return swimmingStyle An object representing the swimming style.","lastModifiedDate":"2023-10-22"},{"lineNumber":574,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-22"},{"lineNumber":575,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":576,"author":{"gitId":"AlWo223"},"content":" public static Swim.SwimmingStyle parseSwimmingStyle(String swimmingStyle) throws AthletiException {","lastModifiedDate":"2023-10-13"},{"lineNumber":577,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":578,"author":{"gitId":"AlWo223"},"content":" return Swim.SwimmingStyle.valueOf(swimmingStyle.toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":579,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":580,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SWIMMINGSTYLE_INVALID);","lastModifiedDate":"2023-10-13"},{"lineNumber":581,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":582,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":583,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":584,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":585,"author":{"gitId":"AlWo223"},"content":" * Parses the raw user input for adding an activity goal and returns the corresponding activity goal object.","lastModifiedDate":"2023-10-27"},{"lineNumber":586,"author":{"gitId":"AlWo223"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-27"},{"lineNumber":587,"author":{"gitId":"AlWo223"},"content":" * @return activityGoal An object representing the activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":588,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":589,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":590,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal parseActivityGoal(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":591,"author":{"gitId":"AlWo223"},"content":" final int sportIndex \u003d commandArgs.indexOf(Parameter.SPORT_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":592,"author":{"gitId":"AlWo223"},"content":" final int typeIndex \u003d commandArgs.indexOf(Parameter.TYPE_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":593,"author":{"gitId":"AlWo223"},"content":" final int periodIndex \u003d commandArgs.indexOf(Parameter.PERIOD_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":594,"author":{"gitId":"AlWo223"},"content":" final int targetIndex \u003d commandArgs.indexOf(Parameter.TARGET_SEPARATOR);","lastModifiedDate":"2023-10-27"},{"lineNumber":595,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":596,"author":{"gitId":"AlWo223"},"content":" checkMissingActivityGoalArguments(sportIndex, typeIndex, periodIndex, targetIndex);","lastModifiedDate":"2023-10-27"},{"lineNumber":597,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":598,"author":{"gitId":"AlWo223"},"content":" final String sport \u003d commandArgs.substring(sportIndex + Parameter.SPORT_SEPARATOR.length(), typeIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":599,"author":{"gitId":"AlWo223"},"content":" final String type \u003d","lastModifiedDate":"2023-10-27"},{"lineNumber":600,"author":{"gitId":"AlWo223"},"content":" commandArgs.substring(typeIndex + Parameter.TYPE_SEPARATOR.length(), periodIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":601,"author":{"gitId":"AlWo223"},"content":" final String period \u003d","lastModifiedDate":"2023-10-27"},{"lineNumber":602,"author":{"gitId":"AlWo223"},"content":" commandArgs.substring(periodIndex + Parameter.PERIOD_SEPARATOR.length(), targetIndex).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":603,"author":{"gitId":"AlWo223"},"content":" final String target \u003d commandArgs.substring(targetIndex + Parameter.TARGET_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":604,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":605,"author":{"gitId":"AlWo223"},"content":" final ActivityGoal.Sport sportParsed \u003d parseSport(sport);","lastModifiedDate":"2023-10-27"},{"lineNumber":606,"author":{"gitId":"AlWo223"},"content":" final ActivityGoal.GoalType typeParsed \u003d parseGoalType(type);","lastModifiedDate":"2023-10-27"},{"lineNumber":607,"author":{"gitId":"AlWo223"},"content":" final Goal.Timespan periodParsed \u003d parsePeriod(period);","lastModifiedDate":"2023-10-27"},{"lineNumber":608,"author":{"gitId":"AlWo223"},"content":" final int targetParsed \u003d parseTarget(target);","lastModifiedDate":"2023-10-27"},{"lineNumber":609,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":610,"author":{"gitId":"AlWo223"},"content":" return new ActivityGoal(periodParsed, typeParsed, sportParsed, targetParsed);","lastModifiedDate":"2023-10-27"},{"lineNumber":611,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":612,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":613,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":614,"author":{"gitId":"AlWo223"},"content":" * Parses the sport input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":615,"author":{"gitId":"AlWo223"},"content":" * @param sport The raw user input containing the sport.","lastModifiedDate":"2023-10-27"},{"lineNumber":616,"author":{"gitId":"AlWo223"},"content":" * @return sportParsed The parsed Sport object.","lastModifiedDate":"2023-10-27"},{"lineNumber":617,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":618,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":619,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal.Sport parseSport(String sport) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":620,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":621,"author":{"gitId":"AlWo223"},"content":" return ActivityGoal.Sport.valueOf(sport.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":622,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":623,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_SPORT_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":624,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":625,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":626,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":627,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":628,"author":{"gitId":"AlWo223"},"content":" * Parses the goal type input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":629,"author":{"gitId":"AlWo223"},"content":" * @param type The raw user input containing the goal type.","lastModifiedDate":"2023-10-27"},{"lineNumber":630,"author":{"gitId":"AlWo223"},"content":" * @return goalParsed The parsed GoalType object.","lastModifiedDate":"2023-10-27"},{"lineNumber":631,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":632,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":633,"author":{"gitId":"AlWo223"},"content":" public static ActivityGoal.GoalType parseGoalType(String type) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":634,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":635,"author":{"gitId":"AlWo223"},"content":" return ActivityGoal.GoalType.valueOf(type.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":636,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":637,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TYPE_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":638,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":639,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":640,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":641,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":642,"author":{"gitId":"AlWo223"},"content":" * Parses the period input provided by the user","lastModifiedDate":"2023-10-27"},{"lineNumber":643,"author":{"gitId":"AlWo223"},"content":" * @param period The raw user input containing the period.","lastModifiedDate":"2023-10-27"},{"lineNumber":644,"author":{"gitId":"AlWo223"},"content":" * @return periodParsed The parsed Period object.","lastModifiedDate":"2023-10-27"},{"lineNumber":645,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":646,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":647,"author":{"gitId":"AlWo223"},"content":" public static Goal.Timespan parsePeriod(String period) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":648,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":649,"author":{"gitId":"AlWo223"},"content":" return Goal.Timespan.valueOf(period.toUpperCase());","lastModifiedDate":"2023-10-27"},{"lineNumber":650,"author":{"gitId":"AlWo223"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":651,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_PERIOD_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":652,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":653,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":654,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":655,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":656,"author":{"gitId":"AlWo223"},"content":" * Parses the target input provided by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":657,"author":{"gitId":"AlWo223"},"content":" * @param target The raw user input containing the target value.","lastModifiedDate":"2023-10-27"},{"lineNumber":658,"author":{"gitId":"AlWo223"},"content":" * @return targetParsed The parsed Integer target value.","lastModifiedDate":"2023-10-27"},{"lineNumber":659,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If the input is not a positive number.","lastModifiedDate":"2023-10-27"},{"lineNumber":660,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":661,"author":{"gitId":"AlWo223"},"content":" public static int parseTarget(String target) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":662,"author":{"gitId":"AlWo223"},"content":" int targetParsed;","lastModifiedDate":"2023-10-27"},{"lineNumber":663,"author":{"gitId":"AlWo223"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":664,"author":{"gitId":"AlWo223"},"content":" targetParsed \u003d Integer.parseInt(target);","lastModifiedDate":"2023-10-27"},{"lineNumber":665,"author":{"gitId":"AlWo223"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":666,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TARGET_INVALID);","lastModifiedDate":"2023-10-27"},{"lineNumber":667,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":668,"author":{"gitId":"AlWo223"},"content":" if (targetParsed \u003c 0) {","lastModifiedDate":"2023-10-27"},{"lineNumber":669,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_TARGET_NEGATIVE);","lastModifiedDate":"2023-10-27"},{"lineNumber":670,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":671,"author":{"gitId":"AlWo223"},"content":" return targetParsed;","lastModifiedDate":"2023-10-27"},{"lineNumber":672,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":673,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":674,"author":{"gitId":"AlWo223"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":675,"author":{"gitId":"AlWo223"},"content":" * Checks if the raw user input is missing any arguments for creating an activity goal.","lastModifiedDate":"2023-10-27"},{"lineNumber":676,"author":{"gitId":"AlWo223"},"content":" * @param sportIndex The position of the sport separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":677,"author":{"gitId":"AlWo223"},"content":" * @param targetIndex The position of the target separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":678,"author":{"gitId":"AlWo223"},"content":" * @param periodIndex The position of the period separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":679,"author":{"gitId":"AlWo223"},"content":" * @param valueIndex The position of the value separator.","lastModifiedDate":"2023-10-27"},{"lineNumber":680,"author":{"gitId":"AlWo223"},"content":" * @throws AthletiException If any of the arguments are missing.","lastModifiedDate":"2023-10-27"},{"lineNumber":681,"author":{"gitId":"AlWo223"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":682,"author":{"gitId":"AlWo223"},"content":" public static void checkMissingActivityGoalArguments(int sportIndex, int targetIndex, int periodIndex,","lastModifiedDate":"2023-10-27"},{"lineNumber":683,"author":{"gitId":"AlWo223"},"content":" int valueIndex) throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":684,"author":{"gitId":"AlWo223"},"content":" if (sportIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":685,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_SPORT_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":686,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":687,"author":{"gitId":"AlWo223"},"content":" if (targetIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":688,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_TARGET_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":689,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":690,"author":{"gitId":"AlWo223"},"content":" if (periodIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":691,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_PERIOD_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":692,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":693,"author":{"gitId":"AlWo223"},"content":" if (valueIndex \u003d\u003d -1) {","lastModifiedDate":"2023-10-27"},{"lineNumber":694,"author":{"gitId":"AlWo223"},"content":" throw new AthletiException(Message.MESSAGE_ACTIVITYGOAL_TARGET_MISSING);","lastModifiedDate":"2023-10-27"},{"lineNumber":695,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":696,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":697,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":698,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":699,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for an add sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":700,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":701,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":702,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the slee0 add command.","lastModifiedDate":"2023-10-16"},{"lineNumber":703,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":704,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":705,"author":{"gitId":"DaDevChia"},"content":" public static AddSleepCommand parseSleepAdd(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":706,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":707,"author":{"gitId":"DaDevChia"},"content":" int startMarkerPos \u003d commandArgs.indexOf(Parameter.START_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":708,"author":{"gitId":"DaDevChia"},"content":" int endMarkerPos \u003d commandArgs.indexOf(Parameter.END_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":709,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":710,"author":{"gitId":"DaDevChia"},"content":" if (startMarkerPos \u003d\u003d -1 || endMarkerPos \u003d\u003d -1 || startMarkerPos \u003e endMarkerPos) {","lastModifiedDate":"2023-10-17"},{"lineNumber":711,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":712,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":713,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":714,"author":{"gitId":"DaDevChia"},"content":" String startTimeStr \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":715,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(startMarkerPos + Parameter.START_TIME_SEPARATOR.length(), endMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":716,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":717,"author":{"gitId":"nihalzp"},"content":" String endTimeStr \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":718,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(endMarkerPos + Parameter.END_TIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":719,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":720,"author":{"gitId":"DaDevChia"},"content":" if (startTimeStr.isEmpty() || endTimeStr.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":721,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":722,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":723,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":724,"author":{"gitId":"DaDevChia"},"content":" // Convert the strings to LocalDateTime","lastModifiedDate":"2023-10-17"},{"lineNumber":725,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime startTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":726,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime endTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":727,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":728,"author":{"gitId":"DaDevChia"},"content":" startTime \u003d LocalDateTime.parse(startTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":729,"author":{"gitId":"DaDevChia"},"content":" endTime \u003d LocalDateTime.parse(endTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":730,"author":{"gitId":"DaDevChia"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":731,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":732,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":733,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":734,"author":{"gitId":"DaDevChia"},"content":" //Check if the start time is before the end time","lastModifiedDate":"2023-10-17"},{"lineNumber":735,"author":{"gitId":"DaDevChia"},"content":" if (startTime.isAfter(endTime)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":736,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START);","lastModifiedDate":"2023-10-17"},{"lineNumber":737,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":738,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":739,"author":{"gitId":"DaDevChia"},"content":" return new AddSleepCommand(startTime, endTime);","lastModifiedDate":"2023-10-12"},{"lineNumber":740,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":741,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":742,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":743,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for a delete sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":744,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":745,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":746,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the sleep delete command.","lastModifiedDate":"2023-10-16"},{"lineNumber":747,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":748,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":749,"author":{"gitId":"DaDevChia"},"content":" public static DeleteSleepCommand parseSleepDelete(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":750,"author":{"gitId":"DaDevChia"},"content":" int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":751,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":752,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":753,"author":{"gitId":"DaDevChia"},"content":" index \u003d Integer.parseInt(commandArgs.trim());","lastModifiedDate":"2023-10-12"},{"lineNumber":754,"author":{"gitId":"DaDevChia"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":755,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_DELETE_NO_INDEX);","lastModifiedDate":"2023-10-17"},{"lineNumber":756,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":757,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":758,"author":{"gitId":"DaDevChia"},"content":" return new DeleteSleepCommand(index);","lastModifiedDate":"2023-10-12"},{"lineNumber":759,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":760,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":761,"author":{"gitId":"DaDevChia"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":762,"author":{"gitId":"DaDevChia"},"content":" * Parses the raw user input for an edit sleep command and returns the corresponding command object.","lastModifiedDate":"2023-10-16"},{"lineNumber":763,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":764,"author":{"gitId":"DaDevChia"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-16"},{"lineNumber":765,"author":{"gitId":"DaDevChia"},"content":" * @return An object representing the sleep edit command.","lastModifiedDate":"2023-10-16"},{"lineNumber":766,"author":{"gitId":"DaDevChia"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-16"},{"lineNumber":767,"author":{"gitId":"DaDevChia"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":768,"author":{"gitId":"DaDevChia"},"content":" public static EditSleepCommand parseSleepEdit(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-12"},{"lineNumber":769,"author":{"gitId":"DaDevChia"},"content":" int startMarkerPos \u003d commandArgs.indexOf(Parameter.START_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":770,"author":{"gitId":"DaDevChia"},"content":" int endMarkerPos \u003d commandArgs.indexOf(Parameter.END_TIME_SEPARATOR);","lastModifiedDate":"2023-10-20"},{"lineNumber":771,"author":{"gitId":"DaDevChia"},"content":" int index;","lastModifiedDate":"2023-10-12"},{"lineNumber":772,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":773,"author":{"gitId":"DaDevChia"},"content":" if (startMarkerPos \u003d\u003d -1 || endMarkerPos \u003d\u003d -1 || startMarkerPos \u003e endMarkerPos) {","lastModifiedDate":"2023-10-17"},{"lineNumber":774,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":775,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":776,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":777,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":778,"author":{"gitId":"DaDevChia"},"content":" index \u003d Integer.parseInt(commandArgs.substring(0, startMarkerPos).trim());","lastModifiedDate":"2023-10-12"},{"lineNumber":779,"author":{"gitId":"DaDevChia"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":780,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_EDIT_NO_INDEX);","lastModifiedDate":"2023-10-17"},{"lineNumber":781,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":782,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":783,"author":{"gitId":"DaDevChia"},"content":" String startTimeStr \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":784,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(startMarkerPos + Parameter.START_TIME_SEPARATOR.length(), endMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":785,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":786,"author":{"gitId":"nihalzp"},"content":" String endTimeStr \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":787,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(endMarkerPos + Parameter.END_TIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":788,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":789,"author":{"gitId":"DaDevChia"},"content":" if (startTimeStr.isEmpty() || endTimeStr.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":790,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_NO_START_END_DATETIME);","lastModifiedDate":"2023-10-17"},{"lineNumber":791,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":792,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":793,"author":{"gitId":"DaDevChia"},"content":" // Convert the strings to LocalDateTime","lastModifiedDate":"2023-10-17"},{"lineNumber":794,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime startTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":795,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime endTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":796,"author":{"gitId":"DaDevChia"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":797,"author":{"gitId":"DaDevChia"},"content":" startTime \u003d LocalDateTime.parse(startTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":798,"author":{"gitId":"DaDevChia"},"content":" endTime \u003d LocalDateTime.parse(endTimeStr, sleepTimeFormatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":799,"author":{"gitId":"DaDevChia"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":800,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_INVALID_DATE_TIME_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":801,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":802,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":803,"author":{"gitId":"DaDevChia"},"content":" //Check if the start time is before the end time","lastModifiedDate":"2023-10-17"},{"lineNumber":804,"author":{"gitId":"DaDevChia"},"content":" if (startTime.isAfter(endTime)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":805,"author":{"gitId":"DaDevChia"},"content":" throw new AthletiException(Message.ERRORMESSAGE_PARSER_SLEEP_END_BEFORE_START);","lastModifiedDate":"2023-10-17"},{"lineNumber":806,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":807,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":808,"author":{"gitId":"DaDevChia"},"content":" return new EditSleepCommand(index, startTime, endTime);","lastModifiedDate":"2023-10-12"},{"lineNumber":809,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":810,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":811,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":812,"author":{"gitId":"yicheng-toh"},"content":" * @param commandArgs User provided data to create goals for the nutrients defined.","lastModifiedDate":"2023-10-15"},{"lineNumber":813,"author":{"gitId":"yicheng-toh"},"content":" * @return a list of diet goals for further checking in the Set Diet Goal Command.","lastModifiedDate":"2023-10-15"},{"lineNumber":814,"author":{"gitId":"yicheng-toh"},"content":" * @throws AthletiException Invalid input by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":815,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":816,"author":{"gitId":"yicheng-toh"},"content":" public static ArrayList\u003cDietGoal\u003e parseDietGoalSetEdit(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-16"},{"lineNumber":817,"author":{"gitId":"yicheng-toh"},"content":" if (commandArgs.trim().isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":818,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INSUFFICIENT_INPUT);","lastModifiedDate":"2023-10-22"},{"lineNumber":819,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":820,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":821,"author":{"gitId":"yicheng-toh"},"content":" String[] nutrientAndTargetValues;","lastModifiedDate":"2023-10-15"},{"lineNumber":822,"author":{"gitId":"yicheng-toh"},"content":" if (commandArgs.contains(\" \")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":823,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValues \u003d commandArgs.split(\"\\\\s+\");","lastModifiedDate":"2023-10-15"},{"lineNumber":824,"author":{"gitId":"yicheng-toh"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":825,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValues \u003d new String[]{commandArgs};","lastModifiedDate":"2023-10-15"},{"lineNumber":826,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":827,"author":{"gitId":"yicheng-toh"},"content":" String[] nutrientAndTargetValue;","lastModifiedDate":"2023-10-15"},{"lineNumber":828,"author":{"gitId":"yicheng-toh"},"content":" String nutrient;","lastModifiedDate":"2023-10-15"},{"lineNumber":829,"author":{"gitId":"yicheng-toh"},"content":" int targetValue;","lastModifiedDate":"2023-10-15"},{"lineNumber":830,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":831,"author":{"gitId":"yicheng-toh"},"content":" ArrayList\u003cDietGoal\u003e dietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":832,"author":{"gitId":"yicheng-toh"},"content":" Set\u003cString\u003e recordedNutrients \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":833,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":834,"author":{"gitId":"yicheng-toh"},"content":" for (int i \u003d 0; i \u003c nutrientAndTargetValues.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":835,"author":{"gitId":"yicheng-toh"},"content":" nutrientAndTargetValue \u003d nutrientAndTargetValues[i].split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":836,"author":{"gitId":"yicheng-toh"},"content":" nutrient \u003d nutrientAndTargetValue[0];","lastModifiedDate":"2023-10-15"},{"lineNumber":837,"author":{"gitId":"yicheng-toh"},"content":" targetValue \u003d Integer.parseInt(nutrientAndTargetValue[1]);","lastModifiedDate":"2023-10-15"},{"lineNumber":838,"author":{"gitId":"yicheng-toh"},"content":" if (targetValue \u003d\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":839,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT);","lastModifiedDate":"2023-10-15"},{"lineNumber":840,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":841,"author":{"gitId":"yicheng-toh"},"content":" if (!NutrientVerifier.verify(nutrient)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":842,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INVALID_NUTRIENT);","lastModifiedDate":"2023-10-15"},{"lineNumber":843,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":844,"author":{"gitId":"yicheng-toh"},"content":" if (recordedNutrients.contains(nutrient)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":845,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSSAGE_DIETGOAL_REPEATED_NUTRIENT);","lastModifiedDate":"2023-10-22"},{"lineNumber":846,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":847,"author":{"gitId":"yicheng-toh"},"content":" DietGoal dietGoal \u003d new DietGoal(nutrient, targetValue);","lastModifiedDate":"2023-10-15"},{"lineNumber":848,"author":{"gitId":"yicheng-toh"},"content":" dietGoals.add(dietGoal);","lastModifiedDate":"2023-10-15"},{"lineNumber":849,"author":{"gitId":"yicheng-toh"},"content":" recordedNutrients.add(nutrient);","lastModifiedDate":"2023-10-22"},{"lineNumber":850,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":851,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":852,"author":{"gitId":"yicheng-toh"},"content":" return dietGoals;","lastModifiedDate":"2023-10-15"},{"lineNumber":853,"author":{"gitId":"yicheng-toh"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":854,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_TARGET_VALUE_NOT_POSITIVE_INT);","lastModifiedDate":"2023-10-15"},{"lineNumber":855,"author":{"gitId":"yicheng-toh"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":856,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INSUFFICIENT_INPUT);","lastModifiedDate":"2023-10-24"},{"lineNumber":857,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":858,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":859,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":860,"author":{"gitId":"yicheng-toh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":861,"author":{"gitId":"yicheng-toh"},"content":" * @param deleteIndexString Index of the goal to be deleted in String format","lastModifiedDate":"2023-10-17"},{"lineNumber":862,"author":{"gitId":"yicheng-toh"},"content":" * @return Index of the goal in integer format in users\u0027 perspective.","lastModifiedDate":"2023-10-17"},{"lineNumber":863,"author":{"gitId":"yicheng-toh"},"content":" * @throws AthletiException Catch invalid characters and numbers.","lastModifiedDate":"2023-10-17"},{"lineNumber":864,"author":{"gitId":"yicheng-toh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":865,"author":{"gitId":"yicheng-toh"},"content":" public static int parseDietGoalDelete(String deleteIndexString) throws AthletiException {","lastModifiedDate":"2023-10-17"},{"lineNumber":866,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":867,"author":{"gitId":"yicheng-toh"},"content":" int deleteIndex \u003d Integer.parseInt(deleteIndexString.trim());","lastModifiedDate":"2023-10-17"},{"lineNumber":868,"author":{"gitId":"yicheng-toh"},"content":" if (deleteIndex \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":869,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":870,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":871,"author":{"gitId":"yicheng-toh"},"content":" return deleteIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":872,"author":{"gitId":"yicheng-toh"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":873,"author":{"gitId":"yicheng-toh"},"content":" throw new AthletiException(Message.MESSAGE_DIETGOAL_INCORRECT_INTEGER_FORMAT);","lastModifiedDate":"2023-10-17"},{"lineNumber":874,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":875,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":876,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":877,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":878,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for a diet and returns the corresponding diet object.","lastModifiedDate":"2023-10-15"},{"lineNumber":879,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":880,"author":{"gitId":"nihalzp"},"content":" * @param commandArgs The raw user input containing the arguments.","lastModifiedDate":"2023-10-15"},{"lineNumber":881,"author":{"gitId":"nihalzp"},"content":" * @return An object representing the diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":882,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":883,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":884,"author":{"gitId":"nihalzp"},"content":" public static Diet parseDiet(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":885,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d commandArgs.indexOf(Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":886,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d commandArgs.indexOf(Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":887,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d commandArgs.indexOf(Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":888,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d commandArgs.indexOf(Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":889,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d commandArgs.indexOf(Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-25"},{"lineNumber":890,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":891,"author":{"gitId":"nihalzp"},"content":" checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos, fatMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":892,"author":{"gitId":"nihalzp"},"content":" datetimeMarkerPos);","lastModifiedDate":"2023-10-25"},{"lineNumber":893,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":894,"author":{"gitId":"nihalzp"},"content":" String calories \u003d commandArgs.substring(caloriesMarkerPos + Parameter.CALORIES_SEPARATOR.length(),","lastModifiedDate":"2023-10-25"},{"lineNumber":895,"author":{"gitId":"nihalzp"},"content":" proteinMarkerPos).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":896,"author":{"gitId":"nihalzp"},"content":" String protein \u003d","lastModifiedDate":"2023-10-15"},{"lineNumber":897,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(proteinMarkerPos + Parameter.PROTEIN_SEPARATOR.length(), carbMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":898,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":899,"author":{"gitId":"nihalzp"},"content":" String carb \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":900,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(carbMarkerPos + Parameter.CARB_SEPARATOR.length(), fatMarkerPos).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":901,"author":{"gitId":"nihalzp"},"content":" String fat \u003d commandArgs.substring(fatMarkerPos + Parameter.FAT_SEPARATOR.length(), datetimeMarkerPos)","lastModifiedDate":"2023-10-25"},{"lineNumber":902,"author":{"gitId":"nihalzp"},"content":" .trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":903,"author":{"gitId":"nihalzp"},"content":" String datetime \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":904,"author":{"gitId":"nihalzp"},"content":" commandArgs.substring(datetimeMarkerPos + Parameter.DATETIME_SEPARATOR.length()).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":905,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":906,"author":{"gitId":"nihalzp"},"content":" checkEmptyDietArguments(calories, protein, carb, fat, datetime);","lastModifiedDate":"2023-10-25"},{"lineNumber":907,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":908,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed \u003d parseCalories(calories);","lastModifiedDate":"2023-10-15"},{"lineNumber":909,"author":{"gitId":"nihalzp"},"content":" int proteinParsed \u003d parseProtein(protein);","lastModifiedDate":"2023-10-15"},{"lineNumber":910,"author":{"gitId":"nihalzp"},"content":" int carbParsed \u003d parseCarb(carb);","lastModifiedDate":"2023-10-15"},{"lineNumber":911,"author":{"gitId":"nihalzp"},"content":" int fatParsed \u003d parseFat(fat);","lastModifiedDate":"2023-10-15"},{"lineNumber":912,"author":{"gitId":"nihalzp"},"content":" LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-25"},{"lineNumber":913,"author":{"gitId":"nihalzp"},"content":" return new Diet(caloriesParsed, proteinParsed, carbParsed, fatParsed, datetimeParsed);","lastModifiedDate":"2023-10-25"},{"lineNumber":914,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":915,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":916,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":917,"author":{"gitId":"nihalzp"},"content":" * Checks if the user input for a diet contains all the required arguments.","lastModifiedDate":"2023-10-15"},{"lineNumber":918,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":919,"author":{"gitId":"nihalzp"},"content":" * @param caloriesMarkerPos The position of the calories marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":920,"author":{"gitId":"nihalzp"},"content":" * @param proteinMarkerPos The position of the protein marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":921,"author":{"gitId":"nihalzp"},"content":" * @param carbMarkerPos The position of the carb marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":922,"author":{"gitId":"nihalzp"},"content":" * @param fatMarkerPos The position of the fat marker.","lastModifiedDate":"2023-10-15"},{"lineNumber":923,"author":{"gitId":"nihalzp"},"content":" * @param datetimeMarkerPos The position of the datetime marker.","lastModifiedDate":"2023-10-25"},{"lineNumber":924,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":925,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":926,"author":{"gitId":"nihalzp"},"content":" public static void checkMissingDietArguments(int caloriesMarkerPos, int proteinMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":927,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos, int fatMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":928,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":929,"author":{"gitId":"nihalzp"},"content":" if (caloriesMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":930,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":931,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":932,"author":{"gitId":"nihalzp"},"content":" if (proteinMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":933,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":934,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":935,"author":{"gitId":"nihalzp"},"content":" if (carbMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":936,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":937,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":938,"author":{"gitId":"nihalzp"},"content":" if (fatMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":939,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_MISSING);","lastModifiedDate":"2023-10-15"},{"lineNumber":940,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":941,"author":{"gitId":"nihalzp"},"content":" if (datetimeMarkerPos \u003d\u003d -1) {","lastModifiedDate":"2023-10-25"},{"lineNumber":942,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_DATETIME_MISSING);","lastModifiedDate":"2023-10-25"},{"lineNumber":943,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":944,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":945,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":946,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":947,"author":{"gitId":"nihalzp"},"content":" * Checks if the user input for a diet is empty.","lastModifiedDate":"2023-10-15"},{"lineNumber":948,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":949,"author":{"gitId":"nihalzp"},"content":" * @param calories The calories input.","lastModifiedDate":"2023-10-15"},{"lineNumber":950,"author":{"gitId":"nihalzp"},"content":" * @param protein The protein input.","lastModifiedDate":"2023-10-15"},{"lineNumber":951,"author":{"gitId":"nihalzp"},"content":" * @param carb The carb input.","lastModifiedDate":"2023-10-15"},{"lineNumber":952,"author":{"gitId":"nihalzp"},"content":" * @param fat The fat input.","lastModifiedDate":"2023-10-15"},{"lineNumber":953,"author":{"gitId":"nihalzp"},"content":" * @param datetime The datetime input.","lastModifiedDate":"2023-10-25"},{"lineNumber":954,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":955,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":956,"author":{"gitId":"nihalzp"},"content":" public static void checkEmptyDietArguments(String calories, String protein, String carb, String fat,","lastModifiedDate":"2023-10-25"},{"lineNumber":957,"author":{"gitId":"nihalzp"},"content":" String datetime) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":958,"author":{"gitId":"nihalzp"},"content":" if (calories.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":959,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":960,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":961,"author":{"gitId":"nihalzp"},"content":" if (protein.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":962,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":963,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":964,"author":{"gitId":"nihalzp"},"content":" if (carb.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":965,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":966,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":967,"author":{"gitId":"nihalzp"},"content":" if (fat.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":968,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_EMPTY);","lastModifiedDate":"2023-10-15"},{"lineNumber":969,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":970,"author":{"gitId":"nihalzp"},"content":" if (datetime.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":971,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_DATETIME_EMPTY);","lastModifiedDate":"2023-10-25"},{"lineNumber":972,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":973,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":974,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":975,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":976,"author":{"gitId":"nihalzp"},"content":" * Parses the calories input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":977,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":978,"author":{"gitId":"nihalzp"},"content":" * @param calories The calories input.","lastModifiedDate":"2023-10-15"},{"lineNumber":979,"author":{"gitId":"nihalzp"},"content":" * @return The parsed calories.","lastModifiedDate":"2023-10-15"},{"lineNumber":980,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":981,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":982,"author":{"gitId":"nihalzp"},"content":" public static int parseCalories(String calories) throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":983,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":984,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":985,"author":{"gitId":"nihalzp"},"content":" caloriesParsed \u003d Integer.parseInt(calories);","lastModifiedDate":"2023-10-15"},{"lineNumber":986,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":987,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":988,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":989,"author":{"gitId":"nihalzp"},"content":" if (caloriesParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":990,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CALORIES_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":991,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":992,"author":{"gitId":"nihalzp"},"content":" return caloriesParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":993,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":994,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":995,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":996,"author":{"gitId":"nihalzp"},"content":" * Parses the protein input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":997,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":998,"author":{"gitId":"nihalzp"},"content":" * @param protein The protein input.","lastModifiedDate":"2023-10-15"},{"lineNumber":999,"author":{"gitId":"nihalzp"},"content":" * @return The parsed protein.","lastModifiedDate":"2023-10-15"},{"lineNumber":1000,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1001,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1002,"author":{"gitId":"nihalzp"},"content":" public static int parseProtein(String protein) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1003,"author":{"gitId":"nihalzp"},"content":" int proteinParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1004,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1005,"author":{"gitId":"nihalzp"},"content":" proteinParsed \u003d Integer.parseInt(protein);","lastModifiedDate":"2023-10-15"},{"lineNumber":1006,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1007,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1008,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1009,"author":{"gitId":"nihalzp"},"content":" if (proteinParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1010,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_PROTEIN_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1011,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1012,"author":{"gitId":"nihalzp"},"content":" return proteinParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1013,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1014,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1015,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1016,"author":{"gitId":"nihalzp"},"content":" * Parses the carb input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1017,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1018,"author":{"gitId":"nihalzp"},"content":" * @param carb The carb input.","lastModifiedDate":"2023-10-15"},{"lineNumber":1019,"author":{"gitId":"nihalzp"},"content":" * @return The parsed carb.","lastModifiedDate":"2023-10-15"},{"lineNumber":1020,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1021,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1022,"author":{"gitId":"nihalzp"},"content":" public static int parseCarb(String carb) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1023,"author":{"gitId":"nihalzp"},"content":" int carbParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1024,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1025,"author":{"gitId":"nihalzp"},"content":" carbParsed \u003d Integer.parseInt(carb);","lastModifiedDate":"2023-10-15"},{"lineNumber":1026,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1027,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1028,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1029,"author":{"gitId":"nihalzp"},"content":" if (carbParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1030,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_CARB_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1031,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1032,"author":{"gitId":"nihalzp"},"content":" return carbParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1033,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1034,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1035,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1036,"author":{"gitId":"nihalzp"},"content":" * Parses the fat input for a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1037,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1038,"author":{"gitId":"nihalzp"},"content":" * @param fat The fat input.","lastModifiedDate":"2023-10-15"},{"lineNumber":1039,"author":{"gitId":"nihalzp"},"content":" * @return The parsed fat.","lastModifiedDate":"2023-10-15"},{"lineNumber":1040,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException","lastModifiedDate":"2023-10-15"},{"lineNumber":1041,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1042,"author":{"gitId":"nihalzp"},"content":" public static int parseFat(String fat) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1043,"author":{"gitId":"nihalzp"},"content":" int fatParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1044,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1045,"author":{"gitId":"nihalzp"},"content":" fatParsed \u003d Integer.parseInt(fat);","lastModifiedDate":"2023-10-15"},{"lineNumber":1046,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1047,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1048,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1049,"author":{"gitId":"nihalzp"},"content":" if (fatParsed \u003c 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1050,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_FAT_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1051,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1052,"author":{"gitId":"nihalzp"},"content":" return fatParsed;","lastModifiedDate":"2023-10-15"},{"lineNumber":1053,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1054,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":1055,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":1056,"author":{"gitId":"nihalzp"},"content":" * Parses the index of a diet.","lastModifiedDate":"2023-10-15"},{"lineNumber":1057,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":1058,"author":{"gitId":"nihalzp"},"content":" * @param commandArgs The raw user input containing the index.","lastModifiedDate":"2023-10-15"},{"lineNumber":1059,"author":{"gitId":"nihalzp"},"content":" * @return The parsed index.","lastModifiedDate":"2023-10-15"},{"lineNumber":1060,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":1061,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":1062,"author":{"gitId":"nihalzp"},"content":" public static int parseDietIndex(String commandArgs) throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":1063,"author":{"gitId":"nihalzp"},"content":" if (commandArgs \u003d\u003d null || commandArgs.trim().isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1064,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-26"},{"lineNumber":1065,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1066,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1067,"author":{"gitId":"nihalzp"},"content":" String[] words \u003d commandArgs.trim().split(\"\\\\s+\", 2); // Split into parts","lastModifiedDate":"2023-10-26"},{"lineNumber":1068,"author":{"gitId":"nihalzp"},"content":" int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":1069,"author":{"gitId":"nihalzp"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":1070,"author":{"gitId":"nihalzp"},"content":" index \u003d Integer.parseInt(words[0]);","lastModifiedDate":"2023-10-26"},{"lineNumber":1071,"author":{"gitId":"nihalzp"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":1072,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-15"},{"lineNumber":1073,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1074,"author":{"gitId":"nihalzp"},"content":" if (index \u003c 1) {","lastModifiedDate":"2023-10-25"},{"lineNumber":1075,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_INDEX_TYPE_INVALID);","lastModifiedDate":"2023-10-25"},{"lineNumber":1076,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":1077,"author":{"gitId":"nihalzp"},"content":" return index;","lastModifiedDate":"2023-10-15"},{"lineNumber":1078,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":1079,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1080,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":1081,"author":{"gitId":"nihalzp"},"content":" * Parses the value for a specific marker in a given argument string.","lastModifiedDate":"2023-10-26"},{"lineNumber":1082,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":1083,"author":{"gitId":"nihalzp"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":1084,"author":{"gitId":"nihalzp"},"content":" * @param marker The marker whose value is to be retrieved.","lastModifiedDate":"2023-10-26"},{"lineNumber":1085,"author":{"gitId":"nihalzp"},"content":" * @return The value associated with the given marker, or an empty string if the marker is not found.","lastModifiedDate":"2023-10-26"},{"lineNumber":1086,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":1087,"author":{"gitId":"nihalzp"},"content":" public static String getValueForMarker(String arguments, String marker) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1088,"author":{"gitId":"nihalzp"},"content":" String patternString \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1089,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1090,"author":{"gitId":"nihalzp"},"content":" if (marker.equals(Parameter.DATETIME_SEPARATOR)) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1091,"author":{"gitId":"nihalzp"},"content":" // Special handling for datetime to capture the date and time","lastModifiedDate":"2023-10-26"},{"lineNumber":1092,"author":{"gitId":"nihalzp"},"content":" patternString \u003d marker + \"(\\\\d{4}-\\\\d{2}-\\\\d{2} \\\\d{2}:\\\\d{2})\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1093,"author":{"gitId":"nihalzp"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":1094,"author":{"gitId":"nihalzp"},"content":" // For other markers, capture a sequence of non-whitespace characters","lastModifiedDate":"2023-10-26"},{"lineNumber":1095,"author":{"gitId":"nihalzp"},"content":" patternString \u003d marker + \"(\\\\S+)\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1096,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1097,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1098,"author":{"gitId":"nihalzp"},"content":" Pattern pattern \u003d Pattern.compile(patternString);","lastModifiedDate":"2023-10-26"},{"lineNumber":1099,"author":{"gitId":"nihalzp"},"content":" Matcher matcher \u003d pattern.matcher(arguments);","lastModifiedDate":"2023-10-26"},{"lineNumber":1100,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1101,"author":{"gitId":"nihalzp"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1102,"author":{"gitId":"nihalzp"},"content":" return matcher.group(1);","lastModifiedDate":"2023-10-26"},{"lineNumber":1103,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1104,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1105,"author":{"gitId":"nihalzp"},"content":" // Return empty string if no match is found","lastModifiedDate":"2023-10-26"},{"lineNumber":1106,"author":{"gitId":"nihalzp"},"content":" return \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":1107,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1108,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":1109,"author":{"gitId":"nihalzp"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":1110,"author":{"gitId":"nihalzp"},"content":" * Parses the raw user input for a sleep and returns the corresponding sleep object.","lastModifiedDate":"2023-10-26"},{"lineNumber":1111,"author":{"gitId":"nihalzp"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":1112,"author":{"gitId":"nihalzp"},"content":" * @param arguments The raw user input containing the arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":1113,"author":{"gitId":"nihalzp"},"content":" * @return An object representing the sleep.","lastModifiedDate":"2023-10-26"},{"lineNumber":1114,"author":{"gitId":"nihalzp"},"content":" * @throws AthletiException If the input format is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":1115,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":1116,"author":{"gitId":"nihalzp"},"content":" public static HashMap\u003cString, String\u003e parseDietEdit(String arguments) throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":1117,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":1118,"author":{"gitId":"nihalzp"},"content":" String calories \u003d getValueForMarker(arguments, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1119,"author":{"gitId":"nihalzp"},"content":" String protein \u003d getValueForMarker(arguments, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1120,"author":{"gitId":"nihalzp"},"content":" String carb \u003d getValueForMarker(arguments, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1121,"author":{"gitId":"nihalzp"},"content":" String fat \u003d getValueForMarker(arguments, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1122,"author":{"gitId":"nihalzp"},"content":" String datetime \u003d getValueForMarker(arguments, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":1123,"author":{"gitId":"nihalzp"},"content":" if (!calories.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1124,"author":{"gitId":"nihalzp"},"content":" int caloriesParsed \u003d Integer.parseInt(calories);","lastModifiedDate":"2023-10-26"},{"lineNumber":1125,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, Integer.toString(caloriesParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1126,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1127,"author":{"gitId":"nihalzp"},"content":" if (!protein.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1128,"author":{"gitId":"nihalzp"},"content":" int proteinParsed \u003d Integer.parseInt(protein);","lastModifiedDate":"2023-10-26"},{"lineNumber":1129,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, Integer.toString(proteinParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1130,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1131,"author":{"gitId":"nihalzp"},"content":" if (!carb.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1132,"author":{"gitId":"nihalzp"},"content":" int carbParsed \u003d Integer.parseInt(carb);","lastModifiedDate":"2023-10-26"},{"lineNumber":1133,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, Integer.toString(carbParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1134,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1135,"author":{"gitId":"nihalzp"},"content":" if (!fat.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1136,"author":{"gitId":"nihalzp"},"content":" int fatParsed \u003d Integer.parseInt(fat);","lastModifiedDate":"2023-10-26"},{"lineNumber":1137,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, Integer.toString(fatParsed));","lastModifiedDate":"2023-10-26"},{"lineNumber":1138,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1139,"author":{"gitId":"nihalzp"},"content":" if (!datetime.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1140,"author":{"gitId":"nihalzp"},"content":" LocalDateTime datetimeParsed \u003d parseDateTime(datetime);","lastModifiedDate":"2023-10-26"},{"lineNumber":1141,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, datetimeParsed.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":1142,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1143,"author":{"gitId":"nihalzp"},"content":" if (dietMap.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":1144,"author":{"gitId":"nihalzp"},"content":" throw new AthletiException(Message.MESSAGE_DIET_NO_CHANGE_REQUESTED);","lastModifiedDate":"2023-10-26"},{"lineNumber":1145,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1146,"author":{"gitId":"nihalzp"},"content":" return dietMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":1147,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":1148,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":69,"DaDevChia":113,"AlWo223":523,"yicheng-toh":84,"nihalzp":359}},{"path":"src/main/java/athleticli/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import java.io.InputStream;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"skylee03"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"skylee03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"skylee03"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"skylee03"},"content":" * Defines the behavior of the CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"skylee03"},"content":"public class Ui {","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"skylee03"},"content":" private static Ui uiInstance;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"skylee03"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"skylee03"},"content":" private final PrintStream out;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"skylee03"},"content":" * Constructs a \u003ccode\u003eUi\u003c/code\u003e object, whose input \u003ccode\u003ein\u003c/code\u003e","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"skylee03"},"content":" * and output \u003ccode\u003eout\u003c/code\u003e is the standard input and the standard","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"skylee03"},"content":" * output, respectively.","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":" private Ui() {","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"skylee03"},"content":" this(System.in, System.out);","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"skylee03"},"content":" * Constructs a \u003ccode\u003eUi\u003c/code\u003e object, whose input is an \u003ccode\u003eInputStream\u003c/code\u003e","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"skylee03"},"content":" * object \u003ccode\u003ein\u003c/code\u003e and output is an \u003ccode\u003ePrintStream\u003c/code\u003e object \u003ccode\u003eout\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"skylee03"},"content":" * @param in The \u003ccode\u003eInputStream\u003c/code\u003e accepting the user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"skylee03"},"content":" * @param out The \u003ccode\u003ePrintStream\u003c/code\u003e displaying the program\u0027s output.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"skylee03"},"content":" private Ui(InputStream in, PrintStream out) {","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"skylee03"},"content":" assert in !\u003d null : \"Input stream `in` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"skylee03"},"content":" assert out !\u003d null : \"Print stream `out` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"skylee03"},"content":" this.in \u003d new Scanner(in);","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"skylee03"},"content":" this.out \u003d out;","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"skylee03"},"content":" * Returns the singleton instance of `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"skylee03"},"content":" * @return The singleton instance of `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"skylee03"},"content":" public static Ui getInstance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"skylee03"},"content":" if (uiInstance \u003d\u003d null) {","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"skylee03"},"content":" uiInstance \u003d new Ui();","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"skylee03"},"content":" return uiInstance;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":51,"author":{"gitId":"skylee03"},"content":" * Returns the user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":" * @return The user\u0027s input.","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" out.print(Message.PROMPT);","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" return in.nextLine();","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" * Shows the \u003ccode\u003emessages\u003c/code\u003e in a beautiful format.","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" * @param messages The messages to be shown.","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" public void showMessages(String... messages) {","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":" assert messages !\u003d null : \"Messages should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" out.print(Message.LINE);","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" for (String message : messages) {","lastModifiedDate":"2023-10-08"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" out.println(Message.PREFIX_MESSAGE + message);","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" out.println(Message.LINE);","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" * Shows message for exception \u003ccode\u003ee\u003c/code\u003e.","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" * @param e The exception whose message will be shown.","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"skylee03"},"content":" public void showException(Exception e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"skylee03"},"content":" assert e !\u003d null : \"Exception `e` should not be null\";","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"skylee03"},"content":" showMessages(Message.PREFIX_EXCEPTION + e.getMessage());","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"skylee03"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"skylee03"},"content":" * Shows the welcome message.","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"skylee03"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"skylee03"},"content":" public void showWelcome() {","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"skylee03"},"content":" showMessages(Message.MESSAGE_HELLO);","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":90}},{"path":"src/test/java/athleticli/commands/activity/AddActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"class AddActivityCommandTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private AddActivityCommand addActivityCommand;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" void execute_addsActivity_returnsConfirmationMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this activity:\", run.toString(), \"You have tracked a total of 2 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" void execute_addsFirstActivity_returnsFirstActivityMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this activity:\", run.toString(), \"Now you have tracked your \" +","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" \"first activity. This is just the beginning!\"};","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d addActivityCommand.execute(data);","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":54}},{"path":"src/test/java/athleticli/commands/activity/DeleteActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"class DeleteActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private DeleteActivityCommand deleteActivityCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" void execute_validIndex_activityDeleted() throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Gotcha, I\u0027ve deleted this activity:\", run.toString(), \"You have tracked a total of 0 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" deleteActivityCommand \u003d new DeleteActivityCommand(1);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d deleteActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" deleteActivityCommand \u003d new DeleteActivityCommand(0);","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e deleteActivityCommand.execute(data));","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":50}},{"path":"src/test/java/athleticli/commands/activity/EditActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"class EditActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private AddActivityCommand addActivityCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" addActivityCommand \u003d new AddActivityCommand(activity);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, 60);","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" void execute_validIndex_activityEdited() throws AthletiException {","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" EditActivityCommand editActivityCommand \u003d new EditActivityCommand(run, 1);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" editActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this activity:\", run.toString(), \"You have tracked a total of 1 \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" \"activities. Keep pushing!\"};","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d editActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" assertEquals(run, data.getActivities().get(0));","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" EditActivityCommand editActivityCommand \u003d new EditActivityCommand(run, 2);","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e editActivityCommand.execute(data));","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":52}},{"path":"src/test/java/athleticli/commands/activity/ListActivityCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityList;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"class ListActivityCommandTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(activity);","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" // execute twice for 2 activities","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" void execute_detailedFalse_printsShortList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(false);","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", \"1.\" + new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE), \"2.\" + new Activity(CAPTION, DURATION, DISTANCE, DATE)};","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" void execute_detailedTrue_printsDetailedList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(true);","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d listActivityCommand.printDetailedList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.execute(data);","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" void printList_validInput() {","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(false);","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.printList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", \"1.\" + new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE), \"2.\" + new Activity(CAPTION, DURATION, DISTANCE, DATE)};","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" void printDetailedList() {","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" ActivityList activities \u003d data.getActivities();","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" ListActivityCommand listActivityCommand \u003d new ListActivityCommand(true);","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d listActivityCommand.printDetailedList(activities, activities.size());","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"These are the activities you have tracked so far:\", new Activity(CAPTION, DURATION,","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" DISTANCE, DATE).toDetailedString(),","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" new Activity(CAPTION, DURATION, DISTANCE, DATE).toDetailedString()};","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"AlWo223":77}},{"path":"src/test/java/athleticli/commands/activity/SetActivityGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.commands.activity;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"class SetActivityGoalCommandTest {","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private SetActivityGoalCommand setActivityGoalCommand;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityGoal activityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.GoalType goalType \u003d ActivityGoal.GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.Sport sport \u003d ActivityGoal.Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" Timespan period \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" LocalDate date \u003d LocalDate.now();","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, 10000);","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" setActivityGoalCommand \u003d new SetActivityGoalCommand(activityGoal);","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" String caption \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" int distance \u003d 3000;","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" Run run \u003d new Run(caption, duration, distance, LocalDateTime.now(), 0);","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" AddActivityCommand addActivityCommand \u003d new AddActivityCommand(run);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" addActivityCommand.execute(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" void execute() {","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String[] actual \u003d setActivityGoalCommand.execute(data);","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String[] expected \u003d {\"Alright, I\u0027ve added this activity goal:\", activityGoal.toString(data)};","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"AlWo223":50}},{"path":"src/test/java/athleticli/commands/diet/AddDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" * Tests the add diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"public class AddDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private AddDietCommand addDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" addDietCommand \u003d new AddDietCommand(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Well done! I\u0027ve added this diet:\", diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked your \" + \"first diet. This is just the beginning!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d addDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":42}},{"path":"src/test/java/athleticli/commands/diet/DeleteDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" * Tests the delete diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":"public class DeleteDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private DeleteDietCommand deleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" deleteDietCommand \u003d new DeleteDietCommand(1);","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" void execute() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Noted. I\u0027ve removed this diet:\", diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of 0 diets. Keep grinding!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d deleteDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" void execute_invalidIndex_expectException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" deleteDietCommand \u003d new DeleteDietCommand(2);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietCommand.execute(data));","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":50}},{"path":"src/test/java/athleticli/commands/diet/DeleteDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"class DeleteDietGoalCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" void execute_deleteOneItemFromFilledDietGoalList_expectCorrectMessage() {","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" System.out.println(data.getDietGoals());","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d new String[]{\"The following goal has been deleted:\\n\", \"fats intake progress: \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\",};","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" void execute_deleteOneItemFromEmptyDietGoalList_expectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(100);","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" void execute_integerExceedListSize_expectAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" DeleteDietGoalCommand deleteDietGoalCommand \u003d new DeleteDietGoalCommand(100);","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" fail();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e deleteDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yicheng-toh":63}},{"path":"src/test/java/athleticli/commands/diet/EditDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import athleticli.ui.Parameter;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"/*","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" * Contains the tests for EditDietCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":"public class EditDietCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 10;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 20;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 30;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" private static final int INDEX \u003d 1;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEdited() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCaloriesGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(CALORIES, 20, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoProteinGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, PROTEIN, 30, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCarbGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, CARB, 40, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoFatGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, FAT, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoCaloriesProteinCarbFatGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, LocalDateTime.of(2021, 10, 10, 23, 21));","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"nihalzp"},"content":" void execute_validIndex_dietEditedNoDateTimeGiven() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"nihalzp"},"content":" Diet newDiet \u003d new Diet(200, 20, 30, 40, DATE_TIME);","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(INDEX, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"nihalzp"},"content":" editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Ok, I\u0027ve updated this diet:\", newDiet.toString()};","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d editDietCommand.execute(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"nihalzp"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"nihalzp"},"content":" void execute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e dietMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CALORIES_SEPARATOR, \"200\");","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.PROTEIN_SEPARATOR, \"20\");","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.CARB_SEPARATOR, \"30\");","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.FAT_SEPARATOR, \"40\");","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"nihalzp"},"content":" dietMap.put(Parameter.DATETIME_SEPARATOR, \"2021-10-10 23:21\");","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"nihalzp"},"content":" EditDietCommand editDietCommand \u003d new EditDietCommand(2, dietMap);","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e editDietCommand.execute(data));","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"nihalzp":150}},{"path":"src/test/java/athleticli/commands/diet/EditDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"class EditDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e emptyInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledChangedInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalCarb;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal newDietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" dietGoalCarb \u003d new DietGoal(\"carb\", 10000);","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" newDietGoalFats \u003d new DietGoal(\"fats\", 10);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" emptyInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalCarb);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" filledChangedInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" filledChangedInputDietGoals.add(newDietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(emptyInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\", \"Now you have 0 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d editDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneNewInputDietGoal_expectError() {","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e editDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" void execute_changeOneExistingInputDietGoal_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" EditDietGoalCommand editDietGoalCommand \u003d new EditDietGoalCommand(filledChangedInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10)\\n\\n\" + \"\\t2. carb intake progress: (0/10000)\\n\", \"Now you have 2 diet goal(s).\"};","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, editDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":73}},{"path":"src/test/java/athleticli/commands/diet/ListDietCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.data.diet.Diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"/**","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" * Tests the list diet commands provided by the user.","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":"public class ListDietCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" private ListDietCommand listDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" private Data data;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" listDietCommand \u003d new ListDietCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" data.getDiets().add(diet);","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" String[] expected \u003d {\"Here are the diets in your list:\", \"1. \" + diet.toString(),","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" \"Now you have tracked a total of 1 diets. Keep grinding!\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" String[] actual \u003d listDietCommand.execute(data);","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c actual.length; i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected[i], actual[i]);","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"nihalzp":42}},{"path":"src/test/java/athleticli/commands/diet/ListDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"class ListDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_returnNoDietGoalMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"There are no goals at the moment. Add a diet goal to start.\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" ListDietGoalCommand listDietGoalCommand \u003d new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, listDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" void execute_filledInputList_returnDietGoalPresentMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\", \"Now you have 1 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" ListDietGoalCommand listDietGoalCommand \u003d new ListDietGoalCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, listDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" assert (false);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":49}},{"path":"src/test/java/athleticli/commands/diet/SetDietGoalCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.commands.diet;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.data.diet.DietGoal;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"class SetDietGoalCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e emptyInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" private ArrayList\u003cDietGoal\u003e filledInputDietGoals;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalFats;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" private DietGoal dietGoalCarb;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" private Data data;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" emptyInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" dietGoalFats \u003d new DietGoal(\"fats\", 10000);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" dietGoalCarb \u003d new DietGoal(\"carb\", 10000);","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalFats);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" filledInputDietGoals.add(dietGoalCarb);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":" void execute_emptyInputList_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(emptyInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\", \"Now you have 0 diet goal(s).\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneNewInputDietGoal_expectCorrectMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" String[] expectedString \u003d {\"These are your goal(s):\\n\", \"\\t1. fats intake progress: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" \"(0/10000)\\n\\n\" + \"\\t2. carb intake progress: (0/10000)\\n\", \"Now you have 2 diet goal(s).\"};","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" String[] actualString \u003d setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" assertArrayEquals(expectedString, actualString);","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" void execute_oneExistingInputDietGoal_expectAthletiException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" SetDietGoalCommand setDietGoalCommand \u003d new SetDietGoalCommand(filledInputDietGoals);","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" setDietGoalCommand.execute(data);","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" } catch (AthletiException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" fail(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e setDietGoalCommand.execute(data));","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yicheng-toh":70}},{"path":"src/test/java/athleticli/commands/sleep/AddSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"public class AddSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList());","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidInput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from \u003d LocalDateTime.of(2023, 10, 17, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to \u003d LocalDateTime.of(2023, 10, 18, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command \u003d new AddSleepCommand(from, to);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve added this sleep record:\",","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" \"sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" \"Now you have 1 sleep records in the list.\"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteCountingSleepRecords() {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from1 \u003d LocalDateTime.of(2023, 10, 17, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to1 \u003d LocalDateTime.of(2023, 10, 18, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command1 \u003d new AddSleepCommand(from1, to1);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" command1.execute(data); // Add first sleep record","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime from2 \u003d LocalDateTime.of(2023, 10, 18, 22, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime to2 \u003d LocalDateTime.of(2023, 10, 19, 6, 0);","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" AddSleepCommand command2 \u003d new AddSleepCommand(from2, to2);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve added this sleep record:\",","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" \"sleep record from 18-10-2023 22:00 to 19-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" \"Now you have 2 sleep records in the list.\"","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command2.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":57}},{"path":"src/test/java/athleticli/commands/sleep/DeleteSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class DeleteSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand command \u003d new DeleteSleepCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve deleted this sleep record at index 1: sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithInvalidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandNegative \u003d new DeleteSleepCommand(-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandNegative.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandZero \u003d new DeleteSleepCommand(0);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandZero.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand commandBeyond \u003d new DeleteSleepCommand(3); // Only 2 records in the list.","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandBeyond.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithEmptyList() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList()); // Empty list","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" DeleteSleepCommand command \u003d new DeleteSleepCommand(1);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e command.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":63}},{"path":"src/test/java/athleticli/commands/sleep/EditSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":"public class EditSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithValidIndex() throws AthletiException {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand command \u003d new EditSleepCommand(1, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" \"Got it. I\u0027ve changed this sleep record at index 1:\",","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" \"original: sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" \"to new: sleep record from 17-10-2023 23:00 to 18-10-2023 07:00\",","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" ","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, command.execute(data));","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithInvalidIndex() {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandNegative \u003d new EditSleepCommand(-1, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandNegative.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandZero \u003d new EditSleepCommand(0, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandZero.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"DaDevChia"},"content":" EditSleepCommand commandBeyond \u003d new EditSleepCommand(3, LocalDateTime.of(2023, 10, 17, 23, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 7, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e commandBeyond.execute(data));","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"DaDevChia":64}},{"path":"src/test/java/athleticli/commands/sleep/ListSleepCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.commands.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.Sleep;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.data.sleep.SleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"public class ListSleepCommandTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" private Data data;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" SleepList sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(sleepList);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithRecords() {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" ListSleepCommand command \u003d new ListSleepCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" \"Here are the sleep records in your list:\\n\",","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" \"1. sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\",","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" \"2. sleep record from 18-10-2023 22:00 to 19-10-2023 06:00\"","lastModifiedDate":"2023-10-20"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" }; ","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" String[] actual \u003d command.execute(data);","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"DaDevChia"},"content":" public void testExecuteWithEmptyList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"DaDevChia"},"content":" data.setSleeps(new SleepList()); ","lastModifiedDate":"2023-10-20"},{"lineNumber":48,"author":{"gitId":"DaDevChia"},"content":" ListSleepCommand command \u003d new ListSleepCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"DaDevChia"},"content":" String[] expected \u003d {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"DaDevChia"},"content":" \"You have no sleep records in your list.\"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"DaDevChia"},"content":" };","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"DaDevChia"},"content":" String[] actual \u003d command.execute(data);","lastModifiedDate":"2023-10-20"},{"lineNumber":53,"author":{"gitId":"DaDevChia"},"content":" assertArrayEquals(expected, actual);","lastModifiedDate":"2023-10-20"},{"lineNumber":54,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":56}},{"path":"src/test/java/athleticli/data/activity/ActivityGoalTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Data;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.activity.ActivityGoal.GoalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"import static athleticli.data.activity.ActivityGoal.Sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"class ActivityGoalTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityList activityList;","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private ActivityGoal activityGoal;","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private Data data;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" private Timespan period \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" private final LocalDate date \u003d LocalDate.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" private final String caption \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" private final int distance \u003d 3000;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" data \u003d new Data();","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" void isAchieved_activityDistanceGoal_true() {","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 8000;","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.GENERAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" LocalDateTime date \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(caption, duration, distance, date);","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d true;","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" void isAchieved_runGoalWithNoTrackedRun_false() {","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 8000;","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" LocalDateTime date \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" Activity activity \u003d new Activity(caption, duration, distance, date);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" activityList.add(activity);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d false;","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" void isAchieved_goalAchievedOutsidePeriod_false() {","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int targetValue \u003d 120;","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DURATION;","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.GENERAL;","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, targetValue);","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateWithinPeriod \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateOutsidePeriod \u003d LocalDateTime.now().minusDays(15);","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" Activity activityWithinPeriod \u003d new Activity(caption, duration, distance, dateWithinPeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" Activity activityOutsidePeriod \u003d new Activity(caption, duration, distance, dateOutsidePeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" ActivityList activityList \u003d data.getActivities();","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityWithinPeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityOutsidePeriod);","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" boolean expected \u003d false;","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":" boolean actual \u003d activityGoal.isAchieved(data);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"AlWo223"},"content":" void getActivityClass() {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"AlWo223"},"content":" GoalType goalType \u003d GoalType.DURATION;","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"AlWo223"},"content":" Sport sport \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"AlWo223"},"content":" activityGoal \u003d new ActivityGoal(period, goalType, sport, 0);","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e expected \u003d Run.class;","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"AlWo223"},"content":" Class\u003c?\u003e actual \u003d activityGoal.getActivityClass();","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"AlWo223":106}},{"path":"src/test/java/athleticli/data/activity/ActivityListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"class ActivityListTest {","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private ActivityList activityList;","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Activity activityFirst;","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" private Activity activitySecond;","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" void setUp() {","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" activityList \u003d new ActivityList();","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateSecond \u003d LocalDateTime.now();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" LocalDateTime dateFirst \u003d LocalDateTime.now().minusDays(1);","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" activityFirst \u003d new Activity(CAPTION, DURATION, DISTANCE, dateFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" activitySecond \u003d new Activity(CAPTION, DURATION, DISTANCE, dateSecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" activityList.add(activityFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" activityList.add(activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" void find() {","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.find(LocalDate.now()).get(0), activitySecond);","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.find(LocalDate.now().minusDays(1)).get(0), activityFirst);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" void sort() {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" activityList.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.get(0), activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" assertEquals(activityList.get(1), activityFirst);","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" void filterByTimespan() {","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" activityList.sort();","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" ArrayList\u003cActivity\u003e filteredList \u003d activityList.filterByTimespan(Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(0), activitySecond);","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(1), activityFirst);","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" filteredList \u003d activityList.filterByTimespan(Timespan.DAILY);","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.get(0), activitySecond);","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" assertEquals(filteredList.size(), 1);","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" void getTotalDistance_activity_totalDistance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 2 * DISTANCE;","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDistance(Activity.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" void getTotalDistance_run_zero() {","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDistance(Run.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" void getTotalDuration_activity_totalTime() {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 2 * DURATION.toSecondOfDay();","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDuration(Activity.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" void getTotalDuration_run_zero() {","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" int actual \u003d activityList.getTotalDuration(Run.class, Timespan.WEEKLY);","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"AlWo223":86}},{"path":"src/test/java/athleticli/data/activity/ActivityTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class ActivityTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Sunday \u003d Runday\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23, 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private Activity activity;","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" activity \u003d new Activity(CAPTION, DURATION, DISTANCE, DATE);","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, activity.getCaption());","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, activity.getMovingTime());","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, activity.getDistance());","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, activity.getStartDateTime());","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Activity] Sunday \u003d Runday | Distance: 18.12 km | Time: 1h 24m | \" +","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, activity.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Activity - Sunday \u003d Runday - October 10, 2023 at 11:21 PM]\\n\" +","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" \"\\tDistance: 18.12 km Time: 1h 24m\\n\" +","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" \"\\tCalories: 0 kcal ...\";","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" public void generateDistanceStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateDistanceStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Distance: 18.12 km\";","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public void generateMovingTimeStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateMovingTimeStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 01:24:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" public void generateStartDateTimeStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateStartDateTimeStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"AlWo223"},"content":" public void formatTwoColumns() {","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.formatTwoColumns(\"Distance: 18.12 km\", \"Time: 1h 24m\", 30);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Distance: 18.12 km Time: 1h 24m\";","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"AlWo223"},"content":" void generateShortMovingTimeStringOutput_hoursNotZero() {","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 1h 24m\";","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"AlWo223"},"content":" void generateShortMovingTimeStringOutput_hoursZero() {","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"AlWo223"},"content":" activity \u003d new Activity(CAPTION, LocalTime.of(0, 24, 20), DISTANCE, DATE);","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"Time: 24m 20s\";","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"AlWo223"},"content":" String actual \u003d activity.generateShortMovingTimeStringOutput();","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":92}},{"path":"src/test/java/athleticli/data/activity/CycleTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class CycleTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Cycling in the afternoon\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(2, 13);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 40460;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 101;","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 7, 14, 0);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Cycle cycle;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" cycle \u003d new Cycle(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, cycle.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, cycle.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, cycle.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, cycle.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(ELEVATION, cycle.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public void calculateAverageSpeed() {","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" double expected \u003d 18.25;","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double actual \u003d cycle.calculateAverageSpeed();","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual, 0.005);","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Cycle] Cycling in the afternoon | Distance: 40.46 km | Speed: 18.25 km/h | Time: 2h 13m\" +","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" \" | \"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" + \"October 7, 2023 at 2:00 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, cycle.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Cycle - Cycling in the afternoon - October 7, 2023 at 2:00 PM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 40.46 km Elevation Gain: 101 m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" + \"\\tTime: 2h 13m Avg Speed: 18.25 km/h\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" + \"\\tCalories: 0 kcal Max Speed: tbd\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" String actual \u003d cycle.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" public void generateSpeedStringOutput() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" String actual \u003d cycle.generateSpeedStringOutput();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"18.25 km/h\";","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":68}},{"path":"src/test/java/athleticli/data/activity/RunTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class RunTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Night Run\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(1, 24);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 18120;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 10, 10, 23,","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" 21);","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private static final int ELEVATION \u003d 60;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":" private Run run;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" run \u003d new Run(CAPTION, DURATION, DISTANCE, DATE, ELEVATION);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, run.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, run.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, run.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, run.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" assertEquals(ELEVATION, run.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" public void calculateAveragePace() {","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" double averagePace \u003d run.calculateAveragePace();","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":" assertEquals(4.64, averagePace, 0.005);","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" public void convertAveragePaceToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"4:38\";","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" String actual \u003d run.convertAveragePaceToString();","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Run] Night Run | Distance: 18.12 km | Pace: 4:38 /km | Time: 1h 24m | \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" \"October 10, 2023 at 11:21 PM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, run.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Run - Night Run - October 10, 2023 at 11:21 PM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 18.12 km Avg Pace: 4:41 /km\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" + \"\\tMoving Time: Time: 1h 25m Elevation Gain: 60 m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":" + \"\\tCalories: 0 kcal Steps: 0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":" String actual \u003d run.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":66}},{"path":"src/test/java/athleticli/data/activity/SwimTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"AlWo223"},"content":"package athleticli.data.activity;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Disabled;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"AlWo223"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"public class SwimTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":" private static final String CAPTION \u003d \"Afternoon Swim\";","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":" private static final LocalTime DURATION \u003d LocalTime.of(0, 35);","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":" private static final int DISTANCE \u003d 1000;","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":" private static final LocalDateTime DATE \u003d LocalDateTime.of(2023, 8, 29, 9, 45);","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":" private static final Swim.SwimmingStyle STYLE \u003d Swim.SwimmingStyle.BUTTERFLY;","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":" private Swim swim;","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":" public void setUp() {","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"AlWo223"},"content":" swim \u003d new Swim(CAPTION, DURATION, DISTANCE, DATE, STYLE);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":" public void testConstructorAndGetters() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":" assertEquals(CAPTION, swim.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":" assertEquals(DURATION, swim.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"AlWo223"},"content":" assertEquals(DISTANCE, swim.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":" assertEquals(DATE, swim.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"AlWo223"},"content":" assertEquals(STYLE, swim.getStyle());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"AlWo223"},"content":" public void calculateAverageLapTime() {","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"AlWo223"},"content":" assertEquals(105, swim.calculateAverageLapTime());","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"AlWo223"},"content":" public void calculateLaps() {","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"AlWo223"},"content":" assertEquals(20, swim.calculateLaps());","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":45,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"AlWo223"},"content":" public void testToString() {","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Swim] Afternoon Swim | Distance: 1.00 km | Avg Lap Time: 105s | Time: 35m 0s | \" +","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"AlWo223"},"content":" \"August 29, 2023 at 9:45 AM\";","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, swim.toString());","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"AlWo223"},"content":" @Disabled // Github gradle check fails on this test","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"AlWo223"},"content":" public void testToDetailedString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"AlWo223"},"content":" String expected \u003d \"[Swim - Afternoon Swim - August 29, 2023 at 9:45 AM]\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"AlWo223"},"content":" + \"\\tDistance: 1.00 km Time: 0h 35m\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"AlWo223"},"content":" + \"\\tLaps: 20 Style: BUTTERFLY\\n\"","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"AlWo223"},"content":" + \"\\tAvg Lap Time: 105 s Calories: 0 kcal\";","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"AlWo223"},"content":" String actual \u003d swim.toDetailedString();","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"AlWo223"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"AlWo223":64}},{"path":"src/test/java/athleticli/data/diet/DietGoalListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"class DietGoalListTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" private DietGoal proteinGoal;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" private DietGoalList dietGoals;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" dietGoals \u003d new DietGoalList();","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" proteinGoal \u003d new DietGoal(\"protein\", PROTEIN);","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" void add_addOneGoal_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" assertEquals(1, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void remove_removeExistingGoal_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" dietGoals.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void remove_removeFromZeroGoals_expectIndexOutOfRangeError() {","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" dietGoals.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" });","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" void get_addOneGoal_expectGetSameGoal() {","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertEquals(proteinGoal, dietGoals.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" void size_initializeArgs_expectZero() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" void size_addTenGoals_expectTen() {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" for (int i \u003d 0; i \u003c 10; i++) {","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, dietGoals.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" void testToString_oneExistingGoal_expectCorrectFormat() {","lastModifiedDate":"2023-10-11"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" dietGoals.add(proteinGoal);","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"\\t1. protein intake progress: (0/10000)\\n\", dietGoals.toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"yicheng-toh":35,"nihalzp":29}},{"path":"src/test/java/athleticli/data/diet/DietGoalTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"class DietGoalTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" void getNutrients_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"protein\", proteinGoal.getNutrients());","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":" void setNutrients_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setNutrients(\"Advanced Protein\");","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"Advanced Protein\", proteinGoal.getNutrients());","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"yicheng-toh"},"content":" void getTargetValue_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":27,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(10000, proteinGoal.getTargetValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"yicheng-toh"},"content":" void setTargetValue_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setTargetValue(10);","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(10, proteinGoal.getTargetValue());","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"yicheng-toh"},"content":" void getCurrentValue_initializeCommonArgs_expectZero() {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(0, proteinGoal.getCurrentValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":43,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"yicheng-toh"},"content":" void setCurrentValue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":46,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(20);","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(20, proteinGoal.getCurrentValue());","lastModifiedDate":"2023-10-10"},{"lineNumber":48,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":49,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":50,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueGreaterThanTargetValue_expectTrue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(20000);","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":55,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":57,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":58,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueEqualToTargetValue_expectTrue() {","lastModifiedDate":"2023-10-10"},{"lineNumber":59,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":60,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":61,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":62,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":63,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":64,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":65,"author":{"gitId":"yicheng-toh"},"content":" void getIsGoalAchieved_currentValueLesserThanTargetValue_expectFalse() {","lastModifiedDate":"2023-10-10"},{"lineNumber":66,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"yicheng-toh"},"content":" proteinGoal.setCurrentValue(100);","lastModifiedDate":"2023-10-10"},{"lineNumber":68,"author":{"gitId":"yicheng-toh"},"content":" assertFalse(proteinGoal.getIsGoalAchieved());","lastModifiedDate":"2023-10-10"},{"lineNumber":69,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":70,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":71,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":72,"author":{"gitId":"yicheng-toh"},"content":" void testToString_initializeCommonArgs_expectCorrectFormat() {","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"yicheng-toh"},"content":" DietGoal proteinGoal \u003d new DietGoal(\"protein\", 10000);","lastModifiedDate":"2023-10-10"},{"lineNumber":74,"author":{"gitId":"yicheng-toh"},"content":" assertEquals(\"protein intake progress: (0/10000)\\n\", proteinGoal.toString());","lastModifiedDate":"2023-10-10"},{"lineNumber":75,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":76,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"yicheng-toh":75,"nihalzp":1}},{"path":"src/test/java/athleticli/data/diet/DietListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":"public class DietListTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20000;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30000;","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40000;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" private DietList dietList;","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":" dietList \u003d new DietList();","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" void add_addOneDiet_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" assertEquals(1, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":" void remove_removeExistingDiet_expectSizeOne() {","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" dietList.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" void remove_removeFromZeroDiets_expectIndexOutOfRangeError() {","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" dietList.remove(0);","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":" });","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" void get_addOneDiet_expectGetSameDiet() {","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" assertEquals(diet, dietList.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":" void size_initializeArgs_expectZero() {","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" assertEquals(0, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":" void size_addTenDiets_expectTen() {","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" for (int i \u003d 0; i \u003c 10; i++) {","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, dietList.size());","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" void testToString_oneExistingDiet_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" Diet diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet);","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet, dietList.toString());","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" void testToString_twoExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" Diet diet1 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":" Diet diet2 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet1);","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet2);","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet1 + \"\\n2. \" + diet2, dietList.toString());","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":" void testToString_zeroExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":87,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", dietList.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"nihalzp"},"content":" void testToString_threeExistingDiets_expectCorrectFormat() {","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"nihalzp"},"content":" Diet diet1 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"nihalzp"},"content":" Diet diet2 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"nihalzp"},"content":" Diet diet3 \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet1);","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet2);","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"nihalzp"},"content":" dietList.add(diet3);","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1. \" + diet1 + \"\\n2. \" + diet2 + \"\\n3. \" + diet3,","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"nihalzp"},"content":" dietList.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"nihalzp":101}},{"path":"src/test/java/athleticli/data/diet/DietTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"nihalzp"},"content":"package athleticli.data.diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"nihalzp"},"content":"public class DietTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"nihalzp"},"content":" private static final int CALORIES \u003d 10000;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"nihalzp"},"content":" private static final int PROTEIN \u003d 20000;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":" private static final int CARB \u003d 30000;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"nihalzp"},"content":" private static final int FAT \u003d 40000;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"nihalzp"},"content":" private static final LocalDateTime DATE_TIME \u003d LocalDateTime.of(2020, 10, 10, 10, 10);","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"nihalzp"},"content":" private Diet diet;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"nihalzp"},"content":" @BeforeEach","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"nihalzp"},"content":" void setUp() {","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"nihalzp"},"content":" diet \u003d new Diet(CALORIES, PROTEIN, CARB, FAT, DATE_TIME);","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":" void getCalories_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":" assertEquals(CALORIES, diet.getCalories());","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":" void setCalories_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"nihalzp"},"content":" diet.setCalories(10);","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":" assertEquals(10, diet.getCalories());","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":" void getProtein_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":" assertEquals(PROTEIN, diet.getProtein());","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"nihalzp"},"content":" void setProtein_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"nihalzp"},"content":" diet.setProtein(20);","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":" assertEquals(20, diet.getProtein());","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"nihalzp"},"content":" void getCarb_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":" assertEquals(CARB, diet.getCarb());","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"nihalzp"},"content":" void setCarb_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"nihalzp"},"content":" diet.setCarb(30);","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"nihalzp"},"content":" assertEquals(30, diet.getCarb());","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"nihalzp"},"content":" void getFat_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"nihalzp"},"content":" assertEquals(FAT, diet.getFat());","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"nihalzp"},"content":" void setFat_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":64,"author":{"gitId":"nihalzp"},"content":" diet.setFat(40);","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"nihalzp"},"content":" assertEquals(40, diet.getFat());","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":67,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"nihalzp"},"content":" void getDateTime_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"nihalzp"},"content":" assertEquals(DATE_TIME, diet.getDateTime());","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"nihalzp"},"content":" void setDateTime_setCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"nihalzp"},"content":" LocalDateTime newDateTime \u003d LocalDateTime.of(2020, 10, 10, 10, 11);","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"nihalzp"},"content":" diet.setDateTime(newDateTime);","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"nihalzp"},"content":" assertEquals(newDateTime, diet.getDateTime());","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"nihalzp"},"content":" void toString_initializeCommonArgs_expectArgs() {","lastModifiedDate":"2023-10-14"},{"lineNumber":82,"author":{"gitId":"nihalzp"},"content":" String expected \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"nihalzp"},"content":" \"Calories: 10000 Protein: 20000 Carb: 30000 Fat: 40000 Date: October 10, 2020 at 10:10 AM\";","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, diet.toString());","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"nihalzp"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"nihalzp":86}},{"path":"src/test/java/athleticli/data/sleep/SleepListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class SleepListTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private SleepList sleepList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep1;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":" private Sleep sleep2;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" sleepList \u003d new SleepList();","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" sleep1 \u003d new Sleep(LocalDateTime.of(2023, 10, 17, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 18, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" sleep2 \u003d new Sleep(LocalDateTime.of(2023, 10, 18, 22, 0), ","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" LocalDateTime.of(2023, 10, 19, 6, 0));","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" public void testToStringWithEmptyList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":" assertEquals(\"[]\", sleepList.toString());","lastModifiedDate":"2023-10-20"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DaDevChia"},"content":" public void testAddSleep() {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"DaDevChia"},"content":" assertEquals(1, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"DaDevChia"},"content":" assertEquals(sleep1, sleepList.get(0));","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"DaDevChia"},"content":" public void testRemoveSleep() {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"DaDevChia"},"content":" sleepList.add(sleep2);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"DaDevChia"},"content":" sleepList.remove(sleep1);","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"DaDevChia"},"content":" assertEquals(1, sleepList.size());","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"DaDevChia"},"content":" assertEquals(sleep2, sleepList.get(0));","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":45}},{"path":"src/test/java/athleticli/data/sleep/SleepTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DaDevChia"},"content":"package athleticli.data.sleep;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DaDevChia"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DaDevChia"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DaDevChia"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DaDevChia"},"content":"public class SleepTest {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime from;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DaDevChia"},"content":" private LocalDateTime to;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DaDevChia"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DaDevChia"},"content":" public void setup() {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DaDevChia"},"content":" from \u003d LocalDateTime.of(2023, 10, 17, 22, 0); // 17-10-2023 22:00","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DaDevChia"},"content":" to \u003d LocalDateTime.of(2023, 10, 18, 6, 0); // 18-10-2023 06:00","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DaDevChia"},"content":" public void testToString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DaDevChia"},"content":" Sleep sleep \u003d new Sleep(from, to);","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DaDevChia"},"content":" String expected \u003d \"sleep record from 17-10-2023 22:00 to 18-10-2023 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DaDevChia"},"content":" assertEquals(expected, sleep.toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DaDevChia"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"DaDevChia":28}},{"path":"src/test/java/athleticli/ui/NutrientVerifierTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yicheng-toh"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"yicheng-toh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"yicheng-toh"},"content":"class NutrientVerifierTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"yicheng-toh"},"content":" void verify_inputApprovedNutrients_expectTrue() {","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"yicheng-toh"},"content":" assertTrue(NutrientVerifier.verify(\"fats\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"yicheng-toh"},"content":" void verify_inputUnapprovedNutrients_expectFalse() {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"yicheng-toh"},"content":" assertFalse(NutrientVerifier.verify(\"Vitamin A\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"yicheng-toh"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"yicheng-toh":18}},{"path":"src/test/java/athleticli/ui/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"skylee03"},"content":"package athleticli.ui;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"skylee03"},"content":"import athleticli.commands.ByeCommand;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.AddDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.DeleteDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.DeleteDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.EditDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.diet.ListDietCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.ListDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"yicheng-toh"},"content":"import athleticli.commands.diet.SetDietGoalCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.AddSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.DeleteSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"nihalzp"},"content":"import athleticli.commands.sleep.EditSleepCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"DaDevChia"},"content":"import athleticli.commands.sleep.ListSleepCommand;","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal;","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Activity;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Run;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.Swim;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal.GoalType;","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.activity.ActivityGoal.Sport;","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"AlWo223"},"content":"import athleticli.data.Goal.Timespan;","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"skylee03"},"content":"import athleticli.exceptions.AthletiException;","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"nihalzp"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"nihalzp"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalDateTime;","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"AlWo223"},"content":"import java.time.LocalTime;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"AlWo223"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"nihalzp"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.checkEmptyDietArguments;","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.checkMissingDietArguments;","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.getValueForMarker;","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCalories;","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCarb;","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDiet;","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDietEdit;","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"yicheng-toh"},"content":"import static athleticli.ui.Parser.parseDietGoalDelete;","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"yicheng-toh"},"content":"import static athleticli.ui.Parser.parseDietGoalSetEdit;","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseDietIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseFat;","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.parseProtein;","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"nihalzp"},"content":"import static athleticli.ui.Parser.splitCommandWordAndArgs;","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertInstanceOf;","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"nihalzp"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"AlWo223"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"skylee03"},"content":"class ParserTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"skylee03"},"content":" void splitCommandWordAndArgs_noArgs_expectTwoParts() {","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"skylee03"},"content":" final String commandWithNoArgs \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"skylee03"},"content":" assertEquals(splitCommandWordAndArgs(commandWithNoArgs).length, 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"skylee03"},"content":" void splitCommandWordAndArgs_multipleArgs_expectTwoParts() {","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"skylee03"},"content":" final String commandWithMultipleArgs \u003d \"set-diet-goal calories/1 carb/3\";","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"skylee03"},"content":" assertEquals(splitCommandWordAndArgs(commandWithMultipleArgs).length, 2);","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"skylee03"},"content":" void parseCommand_unknownCommand_expectAthletiException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"skylee03"},"content":" final String unknownCommand \u003d \"hello\";","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"skylee03"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(unknownCommand));","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"skylee03"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"skylee03"},"content":" @Test","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"skylee03"},"content":" void parseCommand_byeCommand_expectByeCommand() throws AthletiException {","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"skylee03"},"content":" final String byeCommand \u003d \"bye\";","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"skylee03"},"content":" assertInstanceOf(ByeCommand.class, parseCommand(byeCommand));","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"skylee03"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_expectAddSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":81,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(AddSleepCommand.class, parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingStartExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":92,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingEndExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":93,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":94,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":95,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":96,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":97,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":98,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_missingBothExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":99,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/ end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":100,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":101,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":102,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":103,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":104,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_addSleepCommand_invalidDatetimeExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":105,"author":{"gitId":"DaDevChia"},"content":" final String addSleepCommandString \u003d \"add-sleep start/07-10-2021 06:00 end/07-10-2021 05:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":106,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":107,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":108,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":109,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_expectEditSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(EditSleepCommand.class, parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":113,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingStartExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-17"},{"lineNumber":118,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":122,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingEndExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":123,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":124,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":125,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":126,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":127,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":128,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_missingBothExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":129,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/ end/\";","lastModifiedDate":"2023-10-20"},{"lineNumber":130,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":131,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":132,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":133,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":134,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_invalidDatetimeExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":135,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep 1 start/07-10-2021 07:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":136,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":137,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":138,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":139,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-20"},{"lineNumber":140,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_editSleepCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-20"},{"lineNumber":141,"author":{"gitId":"DaDevChia"},"content":" final String editSleepCommandString \u003d \"edit-sleep abc start/06-10-2021 10:00 end/07-10-2021 06:00\";","lastModifiedDate":"2023-10-20"},{"lineNumber":142,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(editSleepCommandString));","lastModifiedDate":"2023-10-20"},{"lineNumber":143,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":144,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":145,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":146,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_deleteSleepCommand_expectDeleteSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":147,"author":{"gitId":"DaDevChia"},"content":" final String deleteSleepCommandString \u003d \"delete-sleep 1\";","lastModifiedDate":"2023-10-14"},{"lineNumber":148,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(DeleteSleepCommand.class, parseCommand(deleteSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":149,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":150,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":151,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":152,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_deleteSleepCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"DaDevChia"},"content":" final String deleteSleepCommandString \u003d \"delete-sleep abc\";","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"DaDevChia"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteSleepCommandString));","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"DaDevChia"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"DaDevChia"},"content":" @Test","lastModifiedDate":"2023-10-14"},{"lineNumber":158,"author":{"gitId":"DaDevChia"},"content":" void parseCommand_listSleepCommand_expectListSleepCommand() throws AthletiException {","lastModifiedDate":"2023-10-14"},{"lineNumber":159,"author":{"gitId":"DaDevChia"},"content":" final String listSleepCommandString \u003d \"list-sleep\";","lastModifiedDate":"2023-10-14"},{"lineNumber":160,"author":{"gitId":"DaDevChia"},"content":" assertInstanceOf(ListSleepCommand.class, parseCommand(listSleepCommandString));","lastModifiedDate":"2023-10-14"},{"lineNumber":161,"author":{"gitId":"DaDevChia"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":162,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":163,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_setDietGoalCommand_expectSetDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"yicheng-toh"},"content":" final String setDietGoalCommandString \u003d \"set-diet-goal calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(SetDietGoalCommand.class, parseCommand(setDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":167,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":168,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_editDietCommand_expectEditDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"yicheng-toh"},"content":" final String editDietGoalCommandString \u003d \"edit-diet-goal calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(EditDietGoalCommand.class, parseCommand(editDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":175,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":176,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_listDietGoalCommand_expectListDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"yicheng-toh"},"content":" final String listDietCommandString \u003d \"list-diet-goal\";","lastModifiedDate":"2023-10-23"},{"lineNumber":178,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(ListDietGoalCommand.class, parseCommand(listDietCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":180,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":182,"author":{"gitId":"yicheng-toh"},"content":" void parseCommand_deleteDietGoalCommand_expectDeleteDietGoalCommand() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":183,"author":{"gitId":"yicheng-toh"},"content":" final String deleteDietGoalCommandString \u003d \"delete-diet-goal 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":184,"author":{"gitId":"yicheng-toh"},"content":" assertInstanceOf(DeleteDietGoalCommand.class, parseCommand(deleteDietGoalCommandString));","lastModifiedDate":"2023-10-23"},{"lineNumber":185,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":186,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":187,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":188,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_expectAddDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(AddDietCommand.class, parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_expectDeleteDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet 1\";","lastModifiedDate":"2023-10-15"},{"lineNumber":197,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(DeleteDietCommand.class, parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":198,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":199,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":200,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":201,"author":{"gitId":"nihalzp"},"content":" void parseCommand_listDietCommand_expectListDietCommand() throws AthletiException {","lastModifiedDate":"2023-10-15"},{"lineNumber":202,"author":{"gitId":"nihalzp"},"content":" final String listDietCommandString \u003d \"list-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":203,"author":{"gitId":"nihalzp"},"content":" assertInstanceOf(ListDietCommand.class, parseCommand(listDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":204,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":205,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":206,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":207,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":208,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":209,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":210,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":211,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":212,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":213,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":214,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":215,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":216,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":217,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":218,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":219,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":220,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":221,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":222,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":223,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":224,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":225,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":226,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":227,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":228,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":229,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":230,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":231,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_missingDateTimeExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":232,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 fat/4\";","lastModifiedDate":"2023-10-25"},{"lineNumber":233,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":234,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":235,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":236,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":237,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":238,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":239,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/ protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":240,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":241,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":242,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":243,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":244,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":245,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":246,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/ carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":247,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":248,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":249,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":250,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":251,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":252,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":253,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/ fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":254,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":255,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":256,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":257,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":258,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":259,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":260,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/ datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":261,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":262,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":263,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":264,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":265,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_emptyDateTimeExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":266,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/\";","lastModifiedDate":"2023-10-25"},{"lineNumber":267,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":268,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":269,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":270,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":271,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":272,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":273,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/abc protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":274,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":275,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":276,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":277,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":278,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidProteinExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":279,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":280,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/abc carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":281,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":282,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":283,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":284,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":285,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidCarbExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":286,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":287,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/abc fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":288,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":289,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":290,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":291,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":292,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidFatExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":293,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":294,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/abc datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":296,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":297,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":298,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":299,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_invalidDateTimeFormatExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":300,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString1 \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-25"},{"lineNumber":301,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString2 \u003d \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":302,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString3 \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":303,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/4 datetime/16-10-2023 10:00:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":304,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString1));","lastModifiedDate":"2023-10-25"},{"lineNumber":305,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString2));","lastModifiedDate":"2023-10-25"},{"lineNumber":306,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString3));","lastModifiedDate":"2023-10-25"},{"lineNumber":307,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":308,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":309,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":310,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeCaloriesExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":311,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/-1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":313,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":314,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":315,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":316,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":317,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeProteinExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":318,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":319,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/-2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":320,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":321,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":322,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":323,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":324,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeCarbExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":325,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":326,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/-3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":327,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-25"},{"lineNumber":328,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":329,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":330,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":331,"author":{"gitId":"nihalzp"},"content":" void parseCommand_addDietCommand_negativeFatExpectAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":332,"author":{"gitId":"nihalzp"},"content":" final String addDietCommandString \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":333,"author":{"gitId":"nihalzp"},"content":" \"add-diet calories/1 protein/2 carb/3 fat/-4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":334,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(addDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":335,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":336,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":337,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":338,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_invalidIndexExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":339,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet abc\";","lastModifiedDate":"2023-10-15"},{"lineNumber":340,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":341,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":342,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":343,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":344,"author":{"gitId":"nihalzp"},"content":" void parseCommand_deleteDietCommand_emptyIndexExpectAthletiException() {","lastModifiedDate":"2023-10-15"},{"lineNumber":345,"author":{"gitId":"nihalzp"},"content":" final String deleteDietCommandString \u003d \"delete-diet\";","lastModifiedDate":"2023-10-15"},{"lineNumber":346,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCommand(deleteDietCommandString));","lastModifiedDate":"2023-10-15"},{"lineNumber":347,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":348,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":349,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":350,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_validIndex_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":351,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":352,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseDietIndex(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":353,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":354,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":355,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":356,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":357,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":358,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":359,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietIndex(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":360,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":361,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":362,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":363,"author":{"gitId":"nihalzp"},"content":" void parseDietIndex_nonPositiveIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":364,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"0\";","lastModifiedDate":"2023-10-25"},{"lineNumber":365,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietIndex(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":366,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":367,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":368,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":369,"author":{"gitId":"nihalzp"},"content":" void parseDiet_emptyInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":370,"author":{"gitId":"nihalzp"},"content":" String emptyInput \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":371,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDiet(emptyInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":372,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":373,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":374,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":375,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingCalories_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":376,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":377,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":378,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":379,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":380,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":381,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":382,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":383,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":384,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":385,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":386,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":387,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingProtein_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":388,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":389,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":390,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":391,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":392,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":393,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":394,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":395,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":396,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":397,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":398,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":399,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingCarb_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":400,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":401,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":402,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":403,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":404,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":405,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":406,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":407,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":408,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":409,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":410,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":411,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingFat_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":412,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":413,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":414,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":415,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":416,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":417,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":418,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":419,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":420,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":421,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":422,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":423,"author":{"gitId":"nihalzp"},"content":" void checkMissingDietArguments_missingDatetime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":424,"author":{"gitId":"nihalzp"},"content":" int caloriesMarkerPos \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":425,"author":{"gitId":"nihalzp"},"content":" int proteinMarkerPos \u003d 2;","lastModifiedDate":"2023-10-25"},{"lineNumber":426,"author":{"gitId":"nihalzp"},"content":" int carbMarkerPos \u003d 3;","lastModifiedDate":"2023-10-25"},{"lineNumber":427,"author":{"gitId":"nihalzp"},"content":" int fatMarkerPos \u003d 4;","lastModifiedDate":"2023-10-25"},{"lineNumber":428,"author":{"gitId":"nihalzp"},"content":" int datetimeMarkerPos \u003d -1;","lastModifiedDate":"2023-10-25"},{"lineNumber":429,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":430,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkMissingDietArguments(caloriesMarkerPos, proteinMarkerPos, carbMarkerPos,","lastModifiedDate":"2023-10-25"},{"lineNumber":431,"author":{"gitId":"nihalzp"},"content":" fatMarkerPos, datetimeMarkerPos));","lastModifiedDate":"2023-10-25"},{"lineNumber":432,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":433,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":434,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":435,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":436,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyCalories_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":437,"author":{"gitId":"nihalzp"},"content":" String emptyCalories \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":438,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":439,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":440,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":441,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":442,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":443,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(emptyCalories, nonEmptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":444,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":445,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":446,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":447,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":448,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyProtein_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":449,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":450,"author":{"gitId":"nihalzp"},"content":" String emptyProtein \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":451,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":452,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":453,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":454,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":455,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, emptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":456,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":457,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":458,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":459,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":460,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyCarb_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":461,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":462,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":463,"author":{"gitId":"nihalzp"},"content":" String emptyCarb \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":464,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":465,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":466,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":467,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, emptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":468,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":469,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":470,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":471,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":472,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyFat_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":473,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":474,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":475,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":476,"author":{"gitId":"nihalzp"},"content":" String emptyFat \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":477,"author":{"gitId":"nihalzp"},"content":" String nonEmptyDatetime \u003d \"2021-10-06 10:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":478,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":479,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, nonEmptyCarb, emptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":480,"author":{"gitId":"nihalzp"},"content":" nonEmptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":481,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":482,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":483,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":484,"author":{"gitId":"nihalzp"},"content":" void checkEmptyDietArguments_emptyDatetime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":485,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCalories \u003d \"1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":486,"author":{"gitId":"nihalzp"},"content":" String nonEmptyProtein \u003d \"2\";","lastModifiedDate":"2023-10-25"},{"lineNumber":487,"author":{"gitId":"nihalzp"},"content":" String nonEmptyCarb \u003d \"3\";","lastModifiedDate":"2023-10-25"},{"lineNumber":488,"author":{"gitId":"nihalzp"},"content":" String nonEmptyFat \u003d \"4\";","lastModifiedDate":"2023-10-25"},{"lineNumber":489,"author":{"gitId":"nihalzp"},"content":" String emptyDatetime \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":490,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class,","lastModifiedDate":"2023-10-25"},{"lineNumber":491,"author":{"gitId":"nihalzp"},"content":" () -\u003e checkEmptyDietArguments(nonEmptyCalories, nonEmptyProtein, nonEmptyCarb, nonEmptyFat,","lastModifiedDate":"2023-10-25"},{"lineNumber":492,"author":{"gitId":"nihalzp"},"content":" emptyDatetime));","lastModifiedDate":"2023-10-25"},{"lineNumber":493,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":494,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":495,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":496,"author":{"gitId":"nihalzp"},"content":" void parseCalories_validCalories_returnCalories() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":497,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":498,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseCalories(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":499,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":500,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":501,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":502,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":503,"author":{"gitId":"nihalzp"},"content":" void parseCalories_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":504,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":505,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCalories(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":506,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":507,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":508,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":509,"author":{"gitId":"nihalzp"},"content":" void parseCalories_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":510,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":511,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCalories(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":512,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":513,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":514,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":515,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":516,"author":{"gitId":"nihalzp"},"content":" void parseProtein_validProtein_returnProtein() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":517,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":518,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseProtein(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":519,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":520,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":521,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":522,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":523,"author":{"gitId":"nihalzp"},"content":" void parseProtein_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":524,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":525,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseProtein(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":526,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":527,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":528,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":529,"author":{"gitId":"nihalzp"},"content":" void parseProtein_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":530,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":531,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseProtein(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":532,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":533,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":534,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":535,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":536,"author":{"gitId":"nihalzp"},"content":" void parseCarb_validCarb_returnCarb() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":537,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":538,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseCarb(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":539,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":540,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":541,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":542,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":543,"author":{"gitId":"nihalzp"},"content":" void parseCarb_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":544,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":545,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCarb(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":546,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":547,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":548,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":549,"author":{"gitId":"nihalzp"},"content":" void parseCarb_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":550,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":551,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseCarb(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":552,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":553,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":554,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":555,"author":{"gitId":"nihalzp"},"content":" void parseFat_validFat_returnFat() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":556,"author":{"gitId":"nihalzp"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-25"},{"lineNumber":557,"author":{"gitId":"nihalzp"},"content":" int actual \u003d parseFat(\"5\");","lastModifiedDate":"2023-10-25"},{"lineNumber":558,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-25"},{"lineNumber":559,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":560,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":561,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":562,"author":{"gitId":"nihalzp"},"content":" void parseFat_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":563,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-25"},{"lineNumber":564,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseFat(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":565,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":566,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":567,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":568,"author":{"gitId":"nihalzp"},"content":" void parseFat_negativeIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":569,"author":{"gitId":"nihalzp"},"content":" String nonIntegerInput \u003d \"-1\";","lastModifiedDate":"2023-10-25"},{"lineNumber":570,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseFat(nonIntegerInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":571,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":572,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":573,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":574,"author":{"gitId":"nihalzp"},"content":" void getValueForMarker_validInput_returnValue() {","lastModifiedDate":"2023-10-26"},{"lineNumber":575,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":576,"author":{"gitId":"nihalzp"},"content":" String caloriesActual \u003d getValueForMarker(validInput, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":577,"author":{"gitId":"nihalzp"},"content":" String proteinActual \u003d getValueForMarker(validInput, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":578,"author":{"gitId":"nihalzp"},"content":" String carbActual \u003d getValueForMarker(validInput, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":579,"author":{"gitId":"nihalzp"},"content":" String fatActual \u003d getValueForMarker(validInput, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":580,"author":{"gitId":"nihalzp"},"content":" String datetimeActual \u003d getValueForMarker(validInput, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":581,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"1\", caloriesActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":582,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"2\", proteinActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":583,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"3\", carbActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":584,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"4\", fatActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":585,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"2023-10-06 10:00\", datetimeActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":586,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":587,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":588,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":589,"author":{"gitId":"nihalzp"},"content":" void getValueForMarker_invalidInput_returnEmptyString() {","lastModifiedDate":"2023-10-26"},{"lineNumber":590,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2 calorie/1 proteins/2 carbs/3 fats/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-26"},{"lineNumber":591,"author":{"gitId":"nihalzp"},"content":" String caloriesActual \u003d getValueForMarker(invalidInput, Parameter.CALORIES_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":592,"author":{"gitId":"nihalzp"},"content":" String proteinActual \u003d getValueForMarker(invalidInput, Parameter.PROTEIN_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":593,"author":{"gitId":"nihalzp"},"content":" String carbActual \u003d getValueForMarker(invalidInput, Parameter.CARB_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":594,"author":{"gitId":"nihalzp"},"content":" String fatActual \u003d getValueForMarker(invalidInput, Parameter.FAT_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":595,"author":{"gitId":"nihalzp"},"content":" String datetimeActual \u003d getValueForMarker(invalidInput, Parameter.DATETIME_SEPARATOR);","lastModifiedDate":"2023-10-26"},{"lineNumber":596,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", caloriesActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":597,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", proteinActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":598,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", carbActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":599,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", fatActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":600,"author":{"gitId":"nihalzp"},"content":" assertEquals(\"\", datetimeActual);","lastModifiedDate":"2023-10-26"},{"lineNumber":601,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":602,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":603,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":604,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_validInput_returnDietEdit() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":605,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3 fat/4 datetime/2023-10-06 10:00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":606,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e actual \u003d parseDietEdit(validInput);","lastModifiedDate":"2023-10-26"},{"lineNumber":607,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e expected \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":608,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CALORIES_SEPARATOR, \"1\");","lastModifiedDate":"2023-10-26"},{"lineNumber":609,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.PROTEIN_SEPARATOR, \"2\");","lastModifiedDate":"2023-10-26"},{"lineNumber":610,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CARB_SEPARATOR, \"3\");","lastModifiedDate":"2023-10-26"},{"lineNumber":611,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.FAT_SEPARATOR, \"4\");","lastModifiedDate":"2023-10-26"},{"lineNumber":612,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.DATETIME_SEPARATOR, \"2023-10-06T10:00\");","lastModifiedDate":"2023-10-26"},{"lineNumber":613,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":614,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":615,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":616,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":617,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_someMarkersPresent_returnDietEdit() throws AthletiException {","lastModifiedDate":"2023-10-26"},{"lineNumber":618,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2 calories/1 protein/2 carb/3\";","lastModifiedDate":"2023-10-26"},{"lineNumber":619,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e actual \u003d parseDietEdit(validInput);","lastModifiedDate":"2023-10-26"},{"lineNumber":620,"author":{"gitId":"nihalzp"},"content":" HashMap\u003cString, String\u003e expected \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":621,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CALORIES_SEPARATOR, \"1\");","lastModifiedDate":"2023-10-26"},{"lineNumber":622,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.PROTEIN_SEPARATOR, \"2\");","lastModifiedDate":"2023-10-26"},{"lineNumber":623,"author":{"gitId":"nihalzp"},"content":" expected.put(Parameter.CARB_SEPARATOR, \"3\");","lastModifiedDate":"2023-10-26"},{"lineNumber":624,"author":{"gitId":"nihalzp"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-26"},{"lineNumber":625,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":626,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":627,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":628,"author":{"gitId":"nihalzp"},"content":" void parseDietEdit_zeroValidInput_throwAthletiException() {","lastModifiedDate":"2023-10-26"},{"lineNumber":629,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2 calorie/1 proteins/2 carbs/3 fats/4 datetime/2023-10-06\";","lastModifiedDate":"2023-10-26"},{"lineNumber":630,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietEdit(invalidInput));","lastModifiedDate":"2023-10-26"},{"lineNumber":631,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":632,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":633,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":634,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_noInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":635,"author":{"gitId":"yicheng-toh"},"content":" String oneValidOneInvalidGoalString \u003d \" \";","lastModifiedDate":"2023-10-23"},{"lineNumber":636,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(oneValidOneInvalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":637,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":638,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":639,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":640,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_oneValidOneInvalidGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":641,"author":{"gitId":"yicheng-toh"},"content":" String oneValidOneInvalidGoalString \u003d \"calories/60 protein/protine\";","lastModifiedDate":"2023-10-15"},{"lineNumber":642,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(oneValidOneInvalidGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":643,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":644,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":645,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":646,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_zeroTargetValue_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":647,"author":{"gitId":"yicheng-toh"},"content":" String zeroTargetValueGoalString \u003d \"calories/0\";","lastModifiedDate":"2023-10-15"},{"lineNumber":648,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(zeroTargetValueGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":649,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":650,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":651,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":652,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_oneInvalidGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":653,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calories/caloreis protein/protein\";","lastModifiedDate":"2023-10-15"},{"lineNumber":654,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-16"},{"lineNumber":655,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":656,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":657,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":658,"author":{"gitId":"AlWo223"},"content":" void parseActivityIndex_validIndex_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":659,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-23"},{"lineNumber":660,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseActivityIndex(\"5\");","lastModifiedDate":"2023-10-23"},{"lineNumber":661,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":662,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":663,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":664,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":665,"author":{"gitId":"AlWo223"},"content":" void parseActivityIndex_invalidIndex_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":666,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseActivityIndex(\"abc\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":667,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":668,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":669,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":670,"author":{"gitId":"AlWo223"},"content":" void parseActivityEdit_validInput_returnActivityEdit() {","lastModifiedDate":"2023-10-25"},{"lineNumber":671,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"1 Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":672,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseActivityEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":673,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":674,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":675,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":676,"author":{"gitId":"AlWo223"},"content":" void parseActivityEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":677,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":678,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseActivityEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":679,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":680,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":681,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":682,"author":{"gitId":"AlWo223"},"content":" void parseRunEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":683,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":684,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseRunEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":685,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":686,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":687,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":688,"author":{"gitId":"AlWo223"},"content":" void parseRunEdit_validInput_returnRunEdit() {","lastModifiedDate":"2023-10-23"},{"lineNumber":689,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":690,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 elevation/1000\";","lastModifiedDate":"2023-10-25"},{"lineNumber":691,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseRunEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":692,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":693,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":694,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":695,"author":{"gitId":"AlWo223"},"content":" void parseCycleEdit_validInput_returnRunEdit() {","lastModifiedDate":"2023-10-23"},{"lineNumber":696,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":697,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 elevation/1000\";","lastModifiedDate":"2023-10-25"},{"lineNumber":698,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseCycleEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":699,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":700,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":701,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":702,"author":{"gitId":"AlWo223"},"content":" void parseCycleEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":703,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":704,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseCycleEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":705,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":706,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":707,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":708,"author":{"gitId":"AlWo223"},"content":" void parseSwimEdit_validInput_noExceptionThrown() {","lastModifiedDate":"2023-10-25"},{"lineNumber":709,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":710,"author":{"gitId":"nihalzp"},"content":" \"2 Evening Ride duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 style/freestyle\";","lastModifiedDate":"2023-10-25"},{"lineNumber":711,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.parseSwimEdit(validInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":712,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":713,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":714,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":715,"author":{"gitId":"AlWo223"},"content":" void parseSwimEdit_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":716,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"1 Morning Run duration/60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":717,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseRunEdit(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":718,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":719,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":720,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":721,"author":{"gitId":"AlWo223"},"content":" void parseActivityEditIndex_validInput_returnIndex() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":722,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 5;","lastModifiedDate":"2023-10-23"},{"lineNumber":723,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseActivityEditIndex(\"5\");","lastModifiedDate":"2023-10-23"},{"lineNumber":724,"author":{"gitId":"AlWo223"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-23"},{"lineNumber":725,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":726,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":727,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":728,"author":{"gitId":"AlWo223"},"content":" void parseActivityListDetail_flagPresent_returnTrue() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":729,"author":{"gitId":"AlWo223"},"content":" String input \u003d \"list-activity -d\";","lastModifiedDate":"2023-10-23"},{"lineNumber":730,"author":{"gitId":"AlWo223"},"content":" assertTrue(Parser.parseActivityListDetail(input));","lastModifiedDate":"2023-10-23"},{"lineNumber":731,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":732,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":733,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":734,"author":{"gitId":"AlWo223"},"content":" void parseActivityListDetail_flagAbsent_returnFalse() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":735,"author":{"gitId":"AlWo223"},"content":" String input \u003d \"list-activity\";","lastModifiedDate":"2023-10-23"},{"lineNumber":736,"author":{"gitId":"AlWo223"},"content":" assertFalse(Parser.parseActivityListDetail(input));","lastModifiedDate":"2023-10-23"},{"lineNumber":737,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":738,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":739,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":740,"author":{"gitId":"AlWo223"},"content":" void parseActivity_validInput_activityParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":741,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":742,"author":{"gitId":"AlWo223"},"content":" Activity actual \u003d Parser.parseActivity(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":743,"author":{"gitId":"AlWo223"},"content":" LocalTime duration \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":744,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":745,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":746,"author":{"gitId":"AlWo223"},"content":" Activity expected \u003d new Activity(\"Morning Run\", duration, 10000, time);","lastModifiedDate":"2023-10-25"},{"lineNumber":747,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":748,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":749,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":750,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":751,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":752,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":753,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":754,"author":{"gitId":"AlWo223"},"content":" void parseActivityGoal_validInput_activityGoalParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":755,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"sport/running type/distance period/weekly target/10000\";","lastModifiedDate":"2023-10-27"},{"lineNumber":756,"author":{"gitId":"AlWo223"},"content":" ActivityGoal actual \u003d Parser.parseActivityGoal(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":757,"author":{"gitId":"AlWo223"},"content":" ActivityGoal expected \u003d new ActivityGoal(Goal.Timespan.WEEKLY, ActivityGoal.GoalType.DISTANCE,","lastModifiedDate":"2023-10-27"},{"lineNumber":758,"author":{"gitId":"AlWo223"},"content":" ActivityGoal.Sport.RUNNING, 10000);","lastModifiedDate":"2023-10-27"},{"lineNumber":759,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getTimespan(), expected.getTimespan());","lastModifiedDate":"2023-10-27"},{"lineNumber":760,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getGoalType(), expected.getGoalType());","lastModifiedDate":"2023-10-27"},{"lineNumber":761,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getSport(), expected.getSport());","lastModifiedDate":"2023-10-27"},{"lineNumber":762,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getTargetValue(), expected.getTargetValue());","lastModifiedDate":"2023-10-27"},{"lineNumber":763,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":764,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":765,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":766,"author":{"gitId":"AlWo223"},"content":" void parseSport_validInput_sportParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":767,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"running\";","lastModifiedDate":"2023-10-27"},{"lineNumber":768,"author":{"gitId":"AlWo223"},"content":" Sport actual \u003d Parser.parseSport(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":769,"author":{"gitId":"AlWo223"},"content":" Sport expected \u003d Sport.RUNNING;","lastModifiedDate":"2023-10-27"},{"lineNumber":770,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":771,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":772,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":773,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":774,"author":{"gitId":"AlWo223"},"content":" void parseSport_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":775,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":776,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseSport(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":777,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":778,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":779,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":780,"author":{"gitId":"AlWo223"},"content":" void parseGoalType_validInput_goalTypeParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":781,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"distance\";","lastModifiedDate":"2023-10-27"},{"lineNumber":782,"author":{"gitId":"AlWo223"},"content":" GoalType actual \u003d Parser.parseGoalType(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":783,"author":{"gitId":"AlWo223"},"content":" GoalType expected \u003d GoalType.DISTANCE;","lastModifiedDate":"2023-10-27"},{"lineNumber":784,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":785,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":786,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":787,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":788,"author":{"gitId":"AlWo223"},"content":" void parsePeriod_validInput_periodParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":789,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"weekly\";","lastModifiedDate":"2023-10-27"},{"lineNumber":790,"author":{"gitId":"AlWo223"},"content":" Timespan actual \u003d Parser.parsePeriod(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":791,"author":{"gitId":"AlWo223"},"content":" Timespan expected \u003d Timespan.WEEKLY;","lastModifiedDate":"2023-10-27"},{"lineNumber":792,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":793,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":794,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":795,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":796,"author":{"gitId":"AlWo223"},"content":" void parsePeriod_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":797,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":798,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parsePeriod(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":799,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":800,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":801,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":802,"author":{"gitId":"AlWo223"},"content":" void parseTarget_validInput_targetParsed() throws AthletiException {","lastModifiedDate":"2023-10-27"},{"lineNumber":803,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"10000\";","lastModifiedDate":"2023-10-27"},{"lineNumber":804,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseTarget(validInput);","lastModifiedDate":"2023-10-27"},{"lineNumber":805,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 10000;","lastModifiedDate":"2023-10-27"},{"lineNumber":806,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-27"},{"lineNumber":807,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":808,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":809,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":810,"author":{"gitId":"AlWo223"},"content":" void parseTarget_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":811,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-27"},{"lineNumber":812,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseTarget(invalidInput));","lastModifiedDate":"2023-10-27"},{"lineNumber":813,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":814,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":815,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":816,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityGoalArguments_missingSport_throwAthletiException() {","lastModifiedDate":"2023-10-27"},{"lineNumber":817,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingActivityGoalArguments(-1, 1, 1, 1));","lastModifiedDate":"2023-10-27"},{"lineNumber":818,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":819,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":820,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":821,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityGoalArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":822,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingActivityGoalArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-27"},{"lineNumber":823,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":824,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":825,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":826,"author":{"gitId":"AlWo223"},"content":" void parseDuration_validInput_durationParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":827,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"01:00:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":828,"author":{"gitId":"AlWo223"},"content":" LocalTime actual \u003d Parser.parseDuration(validInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":829,"author":{"gitId":"AlWo223"},"content":" LocalTime expected \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":830,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":831,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":832,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":833,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":834,"author":{"gitId":"AlWo223"},"content":" void parseDuration_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":835,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":836,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDuration(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":837,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":838,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":839,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":840,"author":{"gitId":"AlWo223"},"content":" void parseDateTime_validInput_dateTimeParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":841,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"2021-09-01 06:00\";","lastModifiedDate":"2023-10-23"},{"lineNumber":842,"author":{"gitId":"AlWo223"},"content":" LocalDateTime actual \u003d Parser.parseDateTime(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":843,"author":{"gitId":"nihalzp"},"content":" LocalDateTime expected \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":844,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":845,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":846,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":847,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":848,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":849,"author":{"gitId":"AlWo223"},"content":" void parseDateTime_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":850,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":851,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDateTime(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":852,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":853,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":854,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":855,"author":{"gitId":"nihalzp"},"content":" void parseDate_validInput_dateParsed() throws AthletiException {","lastModifiedDate":"2023-10-25"},{"lineNumber":856,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d \"2021-09-01\";","lastModifiedDate":"2023-10-25"},{"lineNumber":857,"author":{"gitId":"nihalzp"},"content":" LocalDate actual \u003d parseDate(validInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":858,"author":{"gitId":"nihalzp"},"content":" LocalDate expected \u003d LocalDate.parse(\"2021-09-01\");","lastModifiedDate":"2023-10-25"},{"lineNumber":859,"author":{"gitId":"nihalzp"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-25"},{"lineNumber":860,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":861,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":862,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":863,"author":{"gitId":"nihalzp"},"content":" void parseDate_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":864,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-25"},{"lineNumber":865,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDate(invalidInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":866,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":867,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":868,"author":{"gitId":"nihalzp"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":869,"author":{"gitId":"nihalzp"},"content":" void parseDate_invalidInputWithTime_throwAthletiException() {","lastModifiedDate":"2023-10-25"},{"lineNumber":870,"author":{"gitId":"nihalzp"},"content":" String invalidInput \u003d \"2021-09-01 06:00\";","lastModifiedDate":"2023-10-25"},{"lineNumber":871,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e parseDate(invalidInput));","lastModifiedDate":"2023-10-25"},{"lineNumber":872,"author":{"gitId":"nihalzp"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":873,"author":{"gitId":"nihalzp"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":874,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":875,"author":{"gitId":"AlWo223"},"content":" void parseDistance_validInput_distanceParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":876,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"10000\";","lastModifiedDate":"2023-10-23"},{"lineNumber":877,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseDistance(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":878,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 10000;","lastModifiedDate":"2023-10-23"},{"lineNumber":879,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":880,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":881,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":882,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":883,"author":{"gitId":"AlWo223"},"content":" void parseDistance_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":884,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":885,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseDistance(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":886,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":887,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":888,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":889,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityArguments_missingDuration_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":890,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingActivityArguments(-1, 1, 1));","lastModifiedDate":"2023-10-25"},{"lineNumber":891,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":892,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":893,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":894,"author":{"gitId":"AlWo223"},"content":" void checkMissingActivityArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":895,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingActivityArguments(1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":896,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":897,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":898,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":899,"author":{"gitId":"AlWo223"},"content":" void parseRunCycle_validInput_activityParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":900,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":901,"author":{"gitId":"nihalzp"},"content":" \"Morning Run duration/01:00:00 distance/10000 datetime/2021-09-01 06:00 elevation/60\";","lastModifiedDate":"2023-10-25"},{"lineNumber":902,"author":{"gitId":"AlWo223"},"content":" Run actual \u003d (Run) Parser.parseRunCycle(validInput, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":903,"author":{"gitId":"AlWo223"},"content":" LocalTime movingTime \u003d LocalTime.parse(\"01:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":904,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":905,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 06:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":906,"author":{"gitId":"AlWo223"},"content":" Run expected \u003d new Run(\"Morning Run\", movingTime, 10000, time, 60);","lastModifiedDate":"2023-10-25"},{"lineNumber":907,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":908,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":909,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":910,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":911,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getElevationGain(), expected.getElevationGain());","lastModifiedDate":"2023-10-23"},{"lineNumber":912,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":913,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":914,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":915,"author":{"gitId":"AlWo223"},"content":" void parseElevation_validInput_elevationParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":916,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"60\";","lastModifiedDate":"2023-10-23"},{"lineNumber":917,"author":{"gitId":"AlWo223"},"content":" int actual \u003d Parser.parseElevation(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":918,"author":{"gitId":"AlWo223"},"content":" int expected \u003d 60;","lastModifiedDate":"2023-10-23"},{"lineNumber":919,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":920,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":921,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":922,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":923,"author":{"gitId":"AlWo223"},"content":" void parseElevation_invalidInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":924,"author":{"gitId":"AlWo223"},"content":" String invalidInput \u003d \"abc\";","lastModifiedDate":"2023-10-23"},{"lineNumber":925,"author":{"gitId":"AlWo223"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.parseElevation(invalidInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":926,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":927,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":928,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":929,"author":{"gitId":"AlWo223"},"content":" void checkMissingRunCycleArguments_missingElevation_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":930,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingRunCycleArguments(1, 1, 1, -1));","lastModifiedDate":"2023-10-25"},{"lineNumber":931,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":932,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":933,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":934,"author":{"gitId":"AlWo223"},"content":" void checkMissingRunCycleArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":935,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingRunCycleArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":936,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":937,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":938,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":939,"author":{"gitId":"AlWo223"},"content":" void checkMissingSwimArguments_missingStyle_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":940,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkMissingSwimArguments(1, 1, 1, -1));","lastModifiedDate":"2023-10-25"},{"lineNumber":941,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":942,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":943,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":944,"author":{"gitId":"AlWo223"},"content":" void checkMissingSwimArguments_noMissingArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":945,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkMissingSwimArguments(1, 1, 1, 1));","lastModifiedDate":"2023-10-23"},{"lineNumber":946,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":947,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":948,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":949,"author":{"gitId":"AlWo223"},"content":" void checkEmptyActivityArguments_emptyCaption_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":950,"author":{"gitId":"nihalzp"},"content":" assertThrows(AthletiException.class, () -\u003e Parser.checkEmptyActivityArguments(\"\", \" \", \" \", \" \"));","lastModifiedDate":"2023-10-25"},{"lineNumber":951,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":952,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":953,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":954,"author":{"gitId":"AlWo223"},"content":" void checkEmptyActivityArguments_noEmptyArguments_noExceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":955,"author":{"gitId":"AlWo223"},"content":" assertDoesNotThrow(() -\u003e Parser.checkEmptyActivityArguments(\"1\", \"1\", \"1\", \"1\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":956,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":957,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":958,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":959,"author":{"gitId":"AlWo223"},"content":" void parseSwim_validInput_swimParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":960,"author":{"gitId":"nihalzp"},"content":" String validInput \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":961,"author":{"gitId":"nihalzp"},"content":" \"Evening Swim duration/02:00:00 distance/20000 datetime/2021-09-01 18:00 style/freestyle\";","lastModifiedDate":"2023-10-25"},{"lineNumber":962,"author":{"gitId":"AlWo223"},"content":" Swim actual \u003d (Swim) Parser.parseSwim(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":963,"author":{"gitId":"AlWo223"},"content":" LocalTime movingTime \u003d LocalTime.parse(\"02:00:00\", DateTimeFormatter.ofPattern(\"HH:mm:ss\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":964,"author":{"gitId":"nihalzp"},"content":" LocalDateTime time \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":965,"author":{"gitId":"nihalzp"},"content":" LocalDateTime.parse(\"2021-09-01 18:00\", DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":966,"author":{"gitId":"AlWo223"},"content":" Swim expected \u003d new Swim(\"Evening Swim\", movingTime, 20000, time, Swim.SwimmingStyle.FREESTYLE);","lastModifiedDate":"2023-10-25"},{"lineNumber":967,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getCaption(), expected.getCaption());","lastModifiedDate":"2023-10-23"},{"lineNumber":968,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getMovingTime(), expected.getMovingTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":969,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getDistance(), expected.getDistance());","lastModifiedDate":"2023-10-23"},{"lineNumber":970,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStartDateTime(), expected.getStartDateTime());","lastModifiedDate":"2023-10-23"},{"lineNumber":971,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual.getStyle(), expected.getStyle());","lastModifiedDate":"2023-10-23"},{"lineNumber":972,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":973,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":974,"author":{"gitId":"AlWo223"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":975,"author":{"gitId":"AlWo223"},"content":" void parseSwimmingStyle_validInput_styleParsed() throws AthletiException {","lastModifiedDate":"2023-10-23"},{"lineNumber":976,"author":{"gitId":"AlWo223"},"content":" String validInput \u003d \"freestyle\";","lastModifiedDate":"2023-10-23"},{"lineNumber":977,"author":{"gitId":"AlWo223"},"content":" Swim.SwimmingStyle actual \u003d Parser.parseSwimmingStyle(validInput);","lastModifiedDate":"2023-10-23"},{"lineNumber":978,"author":{"gitId":"AlWo223"},"content":" Swim.SwimmingStyle expected \u003d Swim.SwimmingStyle.FREESTYLE;","lastModifiedDate":"2023-10-23"},{"lineNumber":979,"author":{"gitId":"AlWo223"},"content":" assertEquals(actual, expected);","lastModifiedDate":"2023-10-23"},{"lineNumber":980,"author":{"gitId":"AlWo223"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":981,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":982,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":983,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_repeatedDietGoal_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":984,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calories/1 calories/1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":985,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":986,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":987,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":988,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":989,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalSetEdit_invalidNutrient_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":990,"author":{"gitId":"yicheng-toh"},"content":" String invalidGoalString \u003d \"calorie/1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":991,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalSetEdit(invalidGoalString));","lastModifiedDate":"2023-10-23"},{"lineNumber":992,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":993,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":994,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":995,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalDelete_nonIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":996,"author":{"gitId":"yicheng-toh"},"content":" String nonIntegerInput \u003d \"nonInteger\";","lastModifiedDate":"2023-10-23"},{"lineNumber":997,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalDelete(nonIntegerInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":998,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":999,"author":{"gitId":"yicheng-toh"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":1000,"author":{"gitId":"yicheng-toh"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":1001,"author":{"gitId":"yicheng-toh"},"content":" void parseDietGoalDelete_nonPositiveIntegerInput_throwAthletiException() {","lastModifiedDate":"2023-10-23"},{"lineNumber":1002,"author":{"gitId":"yicheng-toh"},"content":" String nonIntegerInput \u003d \"0\";","lastModifiedDate":"2023-10-23"},{"lineNumber":1003,"author":{"gitId":"yicheng-toh"},"content":" assertThrows(AthletiException.class, () -\u003e parseDietGoalDelete(nonIntegerInput));","lastModifiedDate":"2023-10-23"},{"lineNumber":1004,"author":{"gitId":"yicheng-toh"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":1005,"author":{"gitId":"skylee03"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"skylee03":30,"DaDevChia":87,"AlWo223":299,"yicheng-toh":77,"nihalzp":512}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"skylee03"},"content":"FC /W ACTUAL.TXT EXPECTED.TXT \u003eNUL \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"skylee03":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"AlWo223"},"content":"if [ -e \"data/athleticli.bin\" ]","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"AlWo223"},"content":"then","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"AlWo223"},"content":" rm data/athleticli.bin","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"AlWo223"},"content":"fi","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"AlWo223"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"skylee03"},"content":"diff -w EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":"if [ $? -eq 0 ]","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"skylee03":1,"AlWo223":5,"-":22}}] diff --git a/AY2324S1-CS2113-T17-1_tp_master/commits.json b/AY2324S1-CS2113-T17-1_tp_master/commits.json index 01438ae..0ab9aee 100644 --- a/AY2324S1-CS2113-T17-1_tp_master/commits.json +++ b/AY2324S1-CS2113-T17-1_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"skylee03":[{"date":"2023-10-05","commitResults":[{"hash":"0b24d95bb5dcdbe7f53c0dd57ecd3e991bca0fba","isMergeCommit":false,"messageTitle":"Update skylee03 in AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"8ad36b4ca9d2ccd786c5e20b5c8240bc2ca15211","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into skylee03-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"23829d9a0b09e12b0f8f162d5d87add4f6ab4a63","isMergeCommit":true,"messageTitle":"Merge pull request #4 from skylee03/skylee03-AboutUs","messageBody":"Update skylee03 in AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"c3134ce83d36393de4d6cb68d6340f07ebd6b9b0","isMergeCommit":false,"messageTitle":"Add CLI interaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":253,"deletions":21},"other":{"insertions":2,"deletions":2}}},{"hash":"135bb1b04338c2e0253592c8342d81b54c82595a","isMergeCommit":false,"messageTitle":"Update build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"0481e59c5747ab3d43fa6b51a3e7c7d864054ca5","isMergeCommit":false,"messageTitle":"Create packages/classes for commands and data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":164,"deletions":5}}},{"hash":"8cb6c0a847e3eb76064ffce3ace232ec69d49699","isMergeCommit":false,"messageTitle":"Add ParserTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":40,"deletions":12}}}]},{"date":"2023-10-16","commitResults":[{"hash":"710297a46c87d88cf6d8adfe83c5b78db64d15f9","isMergeCommit":false,"messageTitle":"Use `AthletiException` class to handle all exceptions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":17},"test-code":{"insertions":3,"deletions":3}}},{"hash":"8f252f892e5a11a13fc316eb9297662c969c5c31","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into refactor-exception","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"065480e820ccd9cb6be632e7b564ee36cc2f936c","isMergeCommit":true,"messageTitle":"Merge pull request #41 from skylee03/refactor-exception","messageBody":"Use `AthletiException` class to handle all exceptions","fileTypesAndContributionMap":{}},{"hash":"2eb3e967083322cc11ef6500506c6aa6744f9e08","isMergeCommit":false,"messageTitle":"Use `assert` in `ui` package","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"20d90df4a8c446e303b0c3c75d8ee267031a8eb3","isMergeCommit":false,"messageTitle":"Use `logging` in `AthletiCLI` class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":0}}},{"hash":"4e7f3667fbbb2847269403d46dcd42225835f259","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"1c7afe5447f87cdcb2bfb039cc520c089348ef34","isMergeCommit":false,"messageTitle":"Remove debug output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"2f854b5605a94a156c6aecaa1c9e777e449a15bc","isMergeCommit":true,"messageTitle":"Merge pull request #44 from skylee03/assert-ui","messageBody":"Use `assert` and `logging`","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"5214c3b07fb99d09964e9560f954508e5e6e8fc2","isMergeCommit":false,"messageTitle":"Add help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":132,"deletions":0}}},{"hash":"b84b80eacd7e3743198ed32c6ac92ee230a922fa","isMergeCommit":false,"messageTitle":"Update runtest to ignore trailing spaces","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"49ba6f0df297e185c7469ac5526aa011133e31e8","isMergeCommit":false,"messageTitle":"Update runtest.sh to make it compatible with MacOS","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"c81d5fb5e06414f18e5e3b2926d8f43d99d823cd","isMergeCommit":false,"messageTitle":"Set locale of DateTimeFormatter to English","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"0114bd9c4a5f135b16959e5b457ed7f0c53ed7a1","isMergeCommit":true,"messageTitle":"Merge pull request #78 from skylee03/set-locale","messageBody":"Set locale of DateTimeFormatter to English","fileTypesAndContributionMap":{}},{"hash":"8d15b73af3f636f95ca95466a39e3b9f55b38583","isMergeCommit":true,"messageTitle":"Merge pull request #77 from skylee03/help-command","messageBody":"Add `help` command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"848aa98b502c41aafc8c28bbf396547a31200de6","isMergeCommit":false,"messageTitle":"Add storage features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":19}}},{"hash":"79dced6990c7cd3edb33d705becfaa7030943dfc","isMergeCommit":false,"messageTitle":"Add help messages for save command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"51b1217df5232a93d66b1d0711c81fb9f51503ea","isMergeCommit":false,"messageTitle":"Update src/main/java/athleticli/commands/ByeCommand.java","messageBody":"Co-authored-by: Yi Cheng \u003c75836313+yicheng-toh@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"11e07f26742dad96e7ab2d5401e90d6c36250ef5","isMergeCommit":false,"messageTitle":"Modify the extension of `PATH_SAVE`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f1d356e443da63e06f4d38e5fab10696da75b49","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into storage","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"273f57174a24242f32de525503aedd6dc76aa477","isMergeCommit":false,"messageTitle":"Save data when the JVM begins its shutdown sequence","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":11}}},{"hash":"d4ff6c77512b078593d0721c1635c4704a35623d","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into storage","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7d8724f1da03d1767abcad57caf2757b1bc37fdc","isMergeCommit":true,"messageTitle":"Merge pull request #79 from skylee03/storage","messageBody":"Add storage features","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"131ee521013bbe8bb827aebfde7d94c68d23d694","isMergeCommit":false,"messageTitle":"Add `Findable` interface and classes for find commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":207,"deletions":3}}},{"hash":"4b20c0518ce38fa346b95cf231b3b8031245a002","isMergeCommit":false,"messageTitle":"Add find commands into the parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":1}}},{"hash":"b7b7a16f0f429edd78b65b4a9fded8f3a17228ad","isMergeCommit":false,"messageTitle":"Update help messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"674c55c740884d4a4b914ee20f3585ec655afc1e","isMergeCommit":false,"messageTitle":"Remove redundant `try-catch` in `FindCommand`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":11}}},{"hash":"1c038a815dc0e0ae01dfce8c80fe5e5723fdec9e","isMergeCommit":true,"messageTitle":"Merge pull request #88 from skylee03/findable","messageBody":"Add `Findable` interface and classes for find commands","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"4837bf70a4a4cc74ef4de8c775ceb8f657e5d0bf","isMergeCommit":false,"messageTitle":"Implement goal abstract class for goal functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"a40febfd328bf48cbd669cb2e7d0d06fdb607ab6","isMergeCommit":true,"messageTitle":"Merge pull request #95 from skylee03/abstract-goal","messageBody":"Implement goal abstract class for goal functionality","fileTypesAndContributionMap":{}},{"hash":"948f3b010187ccd97398a0bd2a4cd1159e152c0b","isMergeCommit":false,"messageTitle":"Add `Data data` as a parameter of `isAchieved`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"e1fa645e12c4edefe08f6c8aa7ffa177fc6cabcc","isMergeCommit":false,"messageTitle":"Apply singleton pattern on `AthletiCLI` and `Ui`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":5}}}]},{"date":"2023-10-26","commitResults":[{"hash":"14c3ab999da562617c2378169aa628b47a11aa8d","isMergeCommit":true,"messageTitle":"Merge pull request #100 from skylee03/goal-param","messageBody":"Add `Data data` as a parameter of `isAchieved`","fileTypesAndContributionMap":{}},{"hash":"4107d394795f0018e6dadd1ebb0d39d4ea02a242","isMergeCommit":false,"messageTitle":"Add text description about the design in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":32,"deletions":5}}},{"hash":"1dc84c23988b70fbefde0757fae45b026438f34d","isMergeCommit":false,"messageTitle":"Put the UG into the correct file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":354,"deletions":396}}},{"hash":"055aa0d099009f347dfe563783d8f7d62a0c09a6","isMergeCommit":false,"messageTitle":"Add a good-looking theme to the website","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":16}}},{"hash":"fadf287939f95bcc4deba9f332991297d32d589f","isMergeCommit":false,"messageTitle":"Unify avatar size","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ab3ce4298f4f927908cdc5ef4939813e74619275","isMergeCommit":true,"messageTitle":"Resolve conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b2a26ec920b4537abf7cc1928e7fd1352dac97fe","isMergeCommit":true,"messageTitle":"Merge pull request #105 from skylee03/dg-design","messageBody":"Expand DG and beautify website","fileTypesAndContributionMap":{}},{"hash":"40d16c10e6711c71653e17428e97ef8faa7600a7","isMergeCommit":false,"messageTitle":"Adjust `Goal` abstract class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":65}}},{"hash":"0cc98a77b2ca81f9cb7eec5361f231dd55f122b5","isMergeCommit":false,"messageTitle":"Use enum constructor","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":54}}}]},{"date":"2023-10-27","commitResults":[{"hash":"19f7f405488e0fb88b3f91306199689594d473be","isMergeCommit":true,"messageTitle":"Merge pull request #109 from skylee03/abstract-goal-update","messageBody":"Reimplement `Goal` abstract class","fileTypesAndContributionMap":{}}]}],"DaDevChia":[{"date":"2023-10-05","commitResults":[{"hash":"0b6a61ab5f9e012eab2a34c0a65593eb3ee747db","isMergeCommit":false,"messageTitle":"Added profile information","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0694bcffcee38aa324b0dedbaaf61fa8b89ad035","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into dylanChia-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9bed8b4b05c9f4ac170143e58c4c73d268e03d1b","isMergeCommit":true,"messageTitle":"Merge pull request #5 from DaDevChia/dylanChia-AboutUs","messageBody":"Added profile information","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"e31e4398411fe06ef751b8432a69c3d71b25c757","isMergeCommit":true,"messageTitle":"Merge pull request #8 from skylee03/cli-interaction","messageBody":"Add CLI interaction","fileTypesAndContributionMap":{}},{"hash":"914104a7efdfba71222a6f004d620cb49119934d","isMergeCommit":true,"messageTitle":"Merge pull request #1 from AY2324S1-CS2113-T17-1:master","messageBody":"Master","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"bc77b66ec8241e85f841294349f30e9b9465178b","isMergeCommit":false,"messageTitle":"Implemented Sleep add, edit, delete, list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":276,"deletions":8}}}]},{"date":"2023-10-14","commitResults":[{"hash":"46edcdbfd294c5013e0757a607889e71809482be","isMergeCommit":false,"messageTitle":"Added Junit test for sleep class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":0}}},{"hash":"30613649314867940690602daa35f9c1e8035a45","isMergeCommit":false,"messageTitle":"Added junit test for AddSleepCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":30,"deletions":0}}},{"hash":"f02ea1e04e1a11a4c440b6ebd92499d9f6aabafe","isMergeCommit":false,"messageTitle":"Added junit test for AddSleepCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":41,"deletions":0}}},{"hash":"e335628314a2b34fdc8e888b4123aa841b7a165f","isMergeCommit":true,"messageTitle":"Merge remote master branch into branch-sleep","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"93d65605f87a62f40c372370935fb104f66a5771","isMergeCommit":false,"messageTitle":"Renamed all meal to diet class reference","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"119b279f86e540ae3cb4b7135023cd123a440bcc","isMergeCommit":false,"messageTitle":"Added junit tests for sleep commands in parser","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":29,"deletions":0}}},{"hash":"3daa08c864f2163c73bf65f2c77cee1c53bb0005","isMergeCommit":false,"messageTitle":"Added check for invalid index when deleting sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"9f0b9866dbb061311413c28742ea40725839b51d","isMergeCommit":false,"messageTitle":"Added tests for delete add and list sleep commands","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2},"test-code":{"insertions":79,"deletions":0}}},{"hash":"3cebb7864672cde7cb8da5f1ec04602c333ce7e9","isMergeCommit":false,"messageTitle":"Moved sleep test to correct directory","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"ca31bd932ae8ad595f649bc2c62ad5228c73a782","isMergeCommit":false,"messageTitle":"Removed unecessary imports from tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":11}}},{"hash":"3a803c14ec3b76f2662b2394eae5f4bacb3246c6","isMergeCommit":false,"messageTitle":"Added junit test for sleep edit command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":34,"deletions":0}}},{"hash":"51303b230c62fca9a6a626211baa7cb9017fac29","isMergeCommit":false,"messageTitle":"Fixed Checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":32},"test-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-15","commitResults":[{"hash":"eb4541cc26c4cf8d17caaf64796abc08498cfce5","isMergeCommit":false,"messageTitle":"Fixed space formatting","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"44ecbf846f21e675e5ec5eec5be301d5acc06aa1","isMergeCommit":false,"messageTitle":"Apply formatting suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":15},"test-code":{"insertions":0,"deletions":10}}},{"hash":"a9024e7352c2f21ceb932ed7f88be0cf295225eb","isMergeCommit":true,"messageTitle":"Merge pull request #21 from DaDevChia/branch-sleep","messageBody":"Added sleep tracking functionality, along with list, add, edit, delete methods ","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"500b2e0c0475943eef1256c34867d7d50def75fa","isMergeCommit":false,"messageTitle":"Added javadocs for all sleep features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":84,"deletions":6}}}]},{"date":"2023-10-17","commitResults":[{"hash":"8f210386deab792857278cb869d6e7dbe81e501e","isMergeCommit":false,"messageTitle":"Implemented LocalDateTime for sleep, fixes #22","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":65,"deletions":27}}},{"hash":"0ee91741c46cd5d09fdf8882c0c6a594c57d7176","isMergeCommit":false,"messageTitle":"Implemented setter methods for data object","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":1}}},{"hash":"2e75378f6fa4f6234a6213b8b9e4e63112ab93a4","isMergeCommit":false,"messageTitle":"Reworked all Junit tests for sleep, fixes #23","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":246,"deletions":104}}},{"hash":"98439a6061cc53595d9b4bcf49dc20ece2e4fdd9","isMergeCommit":false,"messageTitle":"Added and updated Junit tests for sleep parser","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":2}}},{"hash":"e8a479ebefd85df7f1e5fddd50d57329a538bf2c","isMergeCommit":false,"messageTitle":"Implement Message class for Sleep #24","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":37},"test-code":{"insertions":3,"deletions":4}}},{"hash":"0966da05332d6d9884a12762f1acca3e8b1cc608","isMergeCommit":false,"messageTitle":"Updated userguide for sleep features #25","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":77,"deletions":0}}},{"hash":"e14aa195ac61c0d1a6904bbd5ce0e58e9eeea98d","isMergeCommit":false,"messageTitle":"Implemeted gradle checkstyle suggestions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15},"test-code":{"insertions":8,"deletions":4}}},{"hash":"d5233b0465955498343b428ca27862b770758e3e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"887ad3d18dea4c1a1eb52f3d136e5c5b77410ff2","isMergeCommit":false,"messageTitle":"Applied spacing suggestions from code review","messageBody":"Added spacing to javadocs as per coding standard\n\nCo-authored-by: nihalzp \u003c81457724+nihalzp@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"0490d9a8a964b89afbc27ff19ccd712fdb8fdfd8","isMergeCommit":false,"messageTitle":"Added exceptions handling for edit / delete sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":10},"test-code":{"insertions":14,"deletions":15}}},{"hash":"ff52e5bb4276c795953d232fda4948bb90a57b90","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-sleep-improvements\u0027 of https://github.com/DaDevChia/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"210ec4fe5da9d884e44c7ffebfb4ccfd30b037f2","isMergeCommit":true,"messageTitle":"Merge pull request #51 from DaDevChia/branch-sleep-improvements","messageBody":"Added improvements to sleep feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"1fda0f371511e7763971a8e38c52cc6ee6006686","isMergeCommit":false,"messageTitle":"Deleted redundant sleeplist method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":12}}},{"hash":"94ac2b8b4663af7522108a52ad90de9a1d94ec74","isMergeCommit":false,"messageTitle":"Changed list printing method for list sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":6},"test-code":{"insertions":8,"deletions":7}}},{"hash":"332d5ab2105cabf9e0f9b082cc5839ee54bb3463","isMergeCommit":false,"messageTitle":"Closes #64; Updated junit tests for sleep class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":45,"deletions":18}}},{"hash":"2f8658f4e76f96fdabe3dbe922d12322f4d94096","isMergeCommit":false,"messageTitle":"Closes #75 Added Logging and Assertions for Sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":3}}},{"hash":"3d4b9ae69ff02a8322cf924b553b6c2f3f53137d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/DaDevChia/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d86e23fbe297e8710a3eae25ca3943b0a40ae544","isMergeCommit":false,"messageTitle":"Closes #50; Add parameter class for all separators","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"0ff05b3b4d4c4f18348dc0a776fc530d797a7249","isMergeCommit":false,"messageTitle":"Fixed Checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}}]},{"date":"2023-10-23","commitResults":[{"hash":"e5c4832683aed3603cb80efe4aa56505f9503ab6","isMergeCommit":false,"messageTitle":"Added changes to style from code review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":17}}},{"hash":"3e9374fca356e5feb28ec7cdd3b44aef0182d008","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b74f2d37cb61977204e9bbb83986d88f7551f428","isMergeCommit":false,"messageTitle":"Fixed Checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"c2104bb0d9f49758b042d539db3778ce935cd787","isMergeCommit":true,"messageTitle":"Merge pull request #76 from DaDevChia/branch-sleep-improvements","messageBody":"Sleep code quality Improvements","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"517dbf2ef08e51ef3147ff8211541ab7b268bc0b","isMergeCommit":false,"messageTitle":"Added sleep features to Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":4}}},{"hash":"fa882cecd3ffdfff6f0a21b60e1e3e1d0d7858be","isMergeCommit":true,"messageTitle":"Merge pull request #114 from DaDevChia/branch-sleep-improvements","messageBody":"Added sleep features to Developer Guide","fileTypesAndContributionMap":{}}]}],"AlWo223":[{"date":"2023-10-05","commitResults":[{"hash":"d1830be8fa3c9af05ee0c009b1e7e57fefed93d8","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"cae7a967c15901f3c6c233cc6d5d43d26b914577","isMergeCommit":false,"messageTitle":"test forking","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"446cc7162d1d868e5a3050a324ec45953fc26a3a","isMergeCommit":true,"messageTitle":"Merge pull request #1 from AlWo223/devalex","messageBody":"test forking","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"024c68352be321cb9ceb2f7df72447ae27259dec","isMergeCommit":false,"messageTitle":"Add activity parent class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":62,"deletions":1}}}]},{"date":"2023-10-11","commitResults":[{"hash":"40bd286165eebade7f4426821383a27b08302d21","isMergeCommit":false,"messageTitle":"add run, swim and cycle as activity childs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":24}}}]},{"date":"2023-10-12","commitResults":[{"hash":"9c6c3ed9e8a77f718996d99605e5ab8393d82f15","isMergeCommit":false,"messageTitle":"Enable user to add run","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":124,"deletions":2}}},{"hash":"06f3e25556e6eb2fbd58459542d9802421b01cdf","isMergeCommit":false,"messageTitle":"Simplify add run to add activity","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":16}}},{"hash":"d0949fc7e73bafcf00af8e84541620da5da2b53d","isMergeCommit":false,"messageTitle":"Provide JavaDoc comments","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":1},"test-code":{"insertions":4,"deletions":0}}},{"hash":"b6b92040342ba95378e7a324ff3e28998dfb633f","isMergeCommit":false,"messageTitle":"Implement adding of specific activities swim, cycle and run","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":19}}},{"hash":"af6cc67a94a9a5362066c4ea936bfd8d19d70ef8","isMergeCommit":false,"messageTitle":"Generate JUnit Tests for different types of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":24},"test-code":{"insertions":146,"deletions":1}}},{"hash":"22dddf5c7a3a6aab26c295f9c95e46fff7788447","isMergeCommit":false,"messageTitle":"Implement activity parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":0}}}]},{"date":"2023-10-13","commitResults":[{"hash":"f1a10d37df14ad9eb5360e13fa1d55bf70c3c9d9","isMergeCommit":false,"messageTitle":"Enable parsing of other sport activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":202,"deletions":191}}},{"hash":"41a2d7f82fe734fdcc553083763d2f915b68dc88","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":23},"test-code":{"insertions":25,"deletions":22}}},{"hash":"2498fd588fccd610a3ec3c4241f14d417611a689","isMergeCommit":false,"messageTitle":"Place overload methods next to each other","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":16}}},{"hash":"21dfeec67a371f0dccb96b43391c2081a08d9392","isMergeCommit":false,"messageTitle":"Add single line representation of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":76,"deletions":10},"test-code":{"insertions":82,"deletions":30}}},{"hash":"a3e611afddcbc54beb94540e83bc196655f7fdbb","isMergeCommit":false,"messageTitle":"Describe how to add activities in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":5}}},{"hash":"d18183d67ecfdedc2b15a956a3717447418d735c","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":33},"test-code":{"insertions":10,"deletions":12}}},{"hash":"cb06421b762e002f0014f0a60ec324ebad344cf7","isMergeCommit":false,"messageTitle":"Resolve minor coding standard violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2},"test-code":{"insertions":5,"deletions":4}}},{"hash":"5efb24cc5a01130909e02b92c26e8ae7311a0787","isMergeCommit":false,"messageTitle":"Update src/main/java/athleticli/data/activity/Cycle.java","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"76d67353a828cda2fd27cb32d129ff98ede1c4e6","isMergeCommit":false,"messageTitle":"Update docs/README.md","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":7}}},{"hash":"6ca1d562827ca47c660144ab641fce02869449e4","isMergeCommit":true,"messageTitle":"Merge pull request #19 from AlWo223/activity","messageBody":"Add Activity","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"212799a32b8e92686294704025df23ae828ddad1","isMergeCommit":false,"messageTitle":"Add delete-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":2}}},{"hash":"f9e927a4e48c4a06c49492e359ef10fc2c08ceda","isMergeCommit":false,"messageTitle":"Remove magic numbers in activity parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":23}}},{"hash":"fef8602baa76f930bc9a2d94a38a0a26274f3ccb","isMergeCommit":false,"messageTitle":"Add delete-activity instructions in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":18,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"9fef12d5fe197162e1054e2d0fa70c5d09ff0a61","isMergeCommit":false,"messageTitle":"Add list-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":7}}},{"hash":"bbafeb117839aa2c8046e0566ae84256fa1bb2dd","isMergeCommit":false,"messageTitle":"Enable detailed view of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":142,"deletions":17}}},{"hash":"a95ebe424439167e121ce27bb69140bb45adf76e","isMergeCommit":false,"messageTitle":"change flag parameter of list-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"640898ee0a68ee886104e51336451781857c2330","isMergeCommit":false,"messageTitle":"Describe list-activity command in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":17,"deletions":0}}},{"hash":"ee39eaa464bbfd78829588b8903c4d78848eb924","isMergeCommit":false,"messageTitle":"Add edit command for activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":1}}},{"hash":"d06fe24f8ecab07eb82e821f5261027535368134","isMergeCommit":false,"messageTitle":"Update UserGuide with instruction for editing activities","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":22,"deletions":2}}},{"hash":"3902b0fdc6bfba8d5410dd371a16e912bf2eba43","isMergeCommit":false,"messageTitle":"Enable logging of activity editing process","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"56c4878e53519e4d18bc2f8f8637c93c89fd8615","isMergeCommit":false,"messageTitle":"Add assertion check to edit command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-18","commitResults":[{"hash":"a3424ee0a5873c1627dae1a67b53a80a80ef0cf0","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":30},"test-code":{"insertions":4,"deletions":6}}},{"hash":"17b7716904ee54cc8059ee038a591ef8ae2f8a10","isMergeCommit":true,"messageTitle":"Merge master branch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9444463cdb497bb76c542a5873c8fef01c8c65dd","isMergeCommit":false,"messageTitle":"Add some JavaDoc comments to Parser code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":0}}},{"hash":"199697e0c7d231bde90cda121530dfc22b080fca","isMergeCommit":true,"messageTitle":"Improve code quality and readability","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bdda8c8d199d157e898e00485c085534f45ace0b","isMergeCommit":true,"messageTitle":"Merge pull request #59 from AlWo223/list","messageBody":"Implement commands for editing, deleting, viewing activities","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"9680fb5cbfc66a622ef25e63cedf0856b287cfbc","isMergeCommit":false,"messageTitle":"Write Junit tests for deleting activities","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":49,"deletions":0}}},{"hash":"b279d894da455e4a6b94b705d6dd10744d0cedfd","isMergeCommit":false,"messageTitle":"Write Test methods for adding activities","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":14,"deletions":2}}},{"hash":"c2b01c28c64ebb16539a46582f5d04b7f729da34","isMergeCommit":false,"messageTitle":"Add missing JavaDoc comments for activity related code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":132,"deletions":2}}},{"hash":"b6b1535a7bcd2c6bdf15a9cc298acf1b0f49b42c","isMergeCommit":false,"messageTitle":"Generate test cases for edit and list activity command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":130,"deletions":0}}}]},{"date":"2023-10-23","commitResults":[{"hash":"550788a79273863edfbd0f8809052bb24c8e02c4","isMergeCommit":false,"messageTitle":"Write missing Junit tests for all acitivty related classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":20},"test-code":{"insertions":335,"deletions":2}}},{"hash":"2195ac4fd6c71f4ecfe27489c2b0f22eb2b84e44","isMergeCommit":false,"messageTitle":"Enable autodelete of data file for text-ui-testing","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":5,"deletions":0}}},{"hash":"37582fa681a84a7d5aa7d3e41255e5a4a92f1a12","isMergeCommit":true,"messageTitle":"Merge master in branch Testing","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9871f65f832f963758acbe29ac6c8b5904d7360c","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":14}}},{"hash":"831e293292d3cf0c51525528fd7530a206d49513","isMergeCommit":false,"messageTitle":"Disable test cases conflicting with github gradle check","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":0}}},{"hash":"98b3818cc30ca4ed43fc5c68034a93e9d77d79ce","isMergeCommit":false,"messageTitle":"Prevent tracking of negative activity distances","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"56a616f86a1cb48aef2f767739f4a2428fa791e5","isMergeCommit":false,"messageTitle":"Add comment regarding negative distances to user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"d621d8d4c5a15b8ac3c9457cf8b4def6ea0aa31f","isMergeCommit":false,"messageTitle":"Use timeformatter for moving time input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":27},"test-code":{"insertions":31,"deletions":10}}},{"hash":"9959e8f67b0b37188a88e103aca82b4e03567533","isMergeCommit":false,"messageTitle":"add find by date search for activity list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":1},"test-code":{"insertions":39,"deletions":0}}},{"hash":"105eeae4f365faf9a1312945ffc8b5b96ee598bf","isMergeCommit":false,"messageTitle":"Sort activity list from latest to earliest by default","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"test-code":{"insertions":7,"deletions":0}}},{"hash":"2686de94641bf71f6ff3f213a40d0a53736517c8","isMergeCommit":false,"messageTitle":"add filtering of activities by timespan","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":0},"test-code":{"insertions":11,"deletions":0}}},{"hash":"4ff3cd3b0025934e34bc85d3bf47dcafb02150fc","isMergeCommit":false,"messageTitle":"modify add activity command name","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4},"docs":{"insertions":7,"deletions":7},"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-25","commitResults":[{"hash":"1da15e2c0b96a826b60d71297460cd46768cc9d7","isMergeCommit":false,"messageTitle":"Use locale english to format double output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"7cd215317542bbd6dd0b43b3ec1af0c58e0fad60","isMergeCommit":true,"messageTitle":"Merge pull request #91 from AlWo223/negdist","messageBody":"Prevent tracking of negative distances and adjust duration input format","fileTypesAndContributionMap":{}},{"hash":"ce187aa51bd3b58a1b0aec74ffdb97b9a43c892b","isMergeCommit":true,"messageTitle":"Merge pull request #92 from AlWo223/find_by_date","messageBody":"Implement find by date and timespan filtering of activities","fileTypesAndContributionMap":{}},{"hash":"533635c68a0112da3a3838a5fcf49e25db364e50","isMergeCommit":true,"messageTitle":"merge master in branch Testing","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cc50d03b97b24b9a32ef110df07c805c7fc1e6e2","isMergeCommit":true,"messageTitle":"Merge pull request #89 from AlWo223/Testing","messageBody":"Add test methods and ui-testing for Activity","fileTypesAndContributionMap":{}},{"hash":"ac20ad28feba557e4e7668a5468bfb600ab2de3c","isMergeCommit":false,"messageTitle":"implement calculation of target metric for activity list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":71,"deletions":4},"test-code":{"insertions":28,"deletions":0}}},{"hash":"4ea08a04b08b9fe775a171660e4bfeac8e988b03","isMergeCommit":false,"messageTitle":"Add functionality to compare data with target value","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":16},"test-code":{"insertions":11,"deletions":7}}}]},{"date":"2023-10-26","commitResults":[{"hash":"0c950ee69d2eb6d124192c72835408b83a310d62","isMergeCommit":false,"messageTitle":"Generate sequence diagram for adding activities","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":0}}},{"hash":"8e96dcbf3f9af061a789ec4b1dad170a31cbd0f4","isMergeCommit":false,"messageTitle":"Write first draft for addactivity developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":2}}},{"hash":"15e2f30a3379c5d2e9054e3deadfc38740d11e20","isMergeCommit":true,"messageTitle":"write junit tests for activity goal","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cdb7c5f1d6e714d8bbaff9b3723cbce11d070037","isMergeCommit":false,"messageTitle":"Add instructions for adding activity goal in UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":0}}}]},{"date":"2023-10-27","commitResults":[{"hash":"b070890414c3ad8f3e3622d77122e08a606bd525","isMergeCommit":false,"messageTitle":"Implement AddActivityGoalCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0},"test-code":{"insertions":4,"deletions":0}}},{"hash":"b79e876a8dc86ec33e2ac52361a86b044126441d","isMergeCommit":false,"messageTitle":"Finish implementation of AddActivityGoalCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":190,"deletions":12},"test-code":{"insertions":52,"deletions":2}}},{"hash":"a5bfabd66657e761197f2977b902d68075b69986","isMergeCommit":true,"messageTitle":"Merge reimplementation of abstrac goal class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7e89b97e31dc8caaf90a1b619de9603e307062e7","isMergeCommit":false,"messageTitle":"Write test methods for setting activity goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":2},"docs":{"insertions":3,"deletions":2},"test-code":{"insertions":105,"deletions":31}}},{"hash":"060eb948d66824055dc410e78c70e8263b7a5af4","isMergeCommit":false,"messageTitle":"adjust code to fulfill coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":9},"test-code":{"insertions":10,"deletions":8}}},{"hash":"d7fd2259698e1432750d2f26f1388ae6a84d842a","isMergeCommit":false,"messageTitle":"Adjust JavaDoc comment of checkDate","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"6390d8b4ffc0ad6a128b5dc9d6ac486aa5c4295a","isMergeCommit":false,"messageTitle":"Remove setTarget test","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"6f8c5f55ac07dbdd15f72a9ea87c352dafd0f092","isMergeCommit":true,"messageTitle":"Merge pull request #113 from AlWo223/ActivityGoal","messageBody":"Activity Goal functionality and add command","fileTypesAndContributionMap":{}}]}],"yicheng-toh":[{"date":"2023-10-05","commitResults":[{"hash":"6ef5fd0adac3dbc719b13dbf2b2ab713ac1be1ba","isMergeCommit":false,"messageTitle":"Add profile for yi cheng","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":5}}},{"hash":"9bd5f18d45380e4064736e7e2d522e4bb53d9eb2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"57a806539f9f12400c7873eb0848e0a808657e68","isMergeCommit":true,"messageTitle":"Merge pull request #2 from yicheng-toh/master","messageBody":"Add profile for yi cheng","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"00aa40a7cd4f49250b89e8da6e405912972f4f99","isMergeCommit":false,"messageTitle":"Adjust the format of the table to resolve warning from intellij","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"9db4478dbe4192b8579a7f29fb22b9c8e3ee12af","isMergeCommit":true,"messageTitle":"Merge pull request #13 from yicheng-toh/documents","messageBody":"Edit table format for AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"834e1ea90ff1c97a9b1cbaa7e4e8fb4d7abcc14b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a4d91b2113c0354343357ff8e7e7726363da2a1d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5b01105df5ebb31111aad46bddda02776f17e218","isMergeCommit":false,"messageTitle":"Add Diet Goal Class and Diet Goal List Class","messageBody":"Fixes #10\n","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":0},"test-code":{"insertions":102,"deletions":0}}},{"hash":"a6dc7e822f05482d9be899688800bc6c86e65a25","isMergeCommit":false,"messageTitle":"Add delete functionality to DietGoalList","messageBody":"Fixes #11\n","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":17,"deletions":2}}},{"hash":"75db1b825ac2cf0540f12079d025060c6bbfe19b","isMergeCommit":false,"messageTitle":"Revert \"Add delete functionality to DietGoalList\"","messageBody":"This reverts commit a6dc7e822f05482d9be899688800bc6c86e65a25.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"test-code":{"insertions":2,"deletions":17}}},{"hash":"833207c30435d8f92a6ee8b459efc0337403084e","isMergeCommit":false,"messageTitle":"Improve code quality to pass build test","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":16,"deletions":14}}}]},{"date":"2023-10-11","commitResults":[{"hash":"e485d117db0d7ff75bd58853df24311d78160ddc","isMergeCommit":false,"messageTitle":"Remove redundant newlines","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7},"test-code":{"insertions":0,"deletions":5}}},{"hash":"cf8a65f00e5865381818da68829aee12cb12788f","isMergeCommit":false,"messageTitle":"Revert \"Remove redundant newlines\"","messageBody":"This reverts commit e485d117db0d7ff75bd58853df24311d78160ddc.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0},"test-code":{"insertions":5,"deletions":0}}},{"hash":"5fe5f02580038a546be18b69df69a042fd547467","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Remove redundant newlines as suggested by skylee03\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"test-code":{"insertions":0,"deletions":4}}},{"hash":"35b51d3c961f239a69d6a7e2622813eb9fd764b1","isMergeCommit":true,"messageTitle":"Merge pull request #17 from yicheng-toh/goals","messageBody":"Add DietGoal Class and DietGoalList Class","fileTypesAndContributionMap":{}},{"hash":"f5ad0687c40da73186ba4e69b5915d22f4442099","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3bf1545451d3c35c883dee34f81203d2838e8d71","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d397c52103037b3417e7cfa08b4d3b3897030d55","isMergeCommit":false,"messageTitle":"Add delete function to DietGoalList Fixes #11","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":17,"deletions":0}}},{"hash":"4a11acbfc52340fe1ab7fbf087a0ff27c5c0bb74","isMergeCommit":false,"messageTitle":"Add edit feature for DietGoal","messageBody":"Fixes #12\n","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":0},"test-code":{"insertions":23,"deletions":0}}},{"hash":"a0f11a58c10e27d786fd91577fceb7fbd7c5692f","isMergeCommit":false,"messageTitle":"Add printing to DietGoalList","messageBody":"Fixes #9\n","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0},"test-code":{"insertions":8,"deletions":0}}}]},{"date":"2023-10-12","commitResults":[{"hash":"a39f610494cda3ed34f6101ab724f15467b13ac9","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Convert words to American spelling in accordance to code quality standard suggested by skylee03\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":4}}},{"hash":"7b4b871b1b5cd422c23aa3141172e92cc332358e","isMergeCommit":false,"messageTitle":"Edit variable name in accordance to code quality standards","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"40a393f46f1e028e0b0011bc7766631b2f53f5c3","isMergeCommit":false,"messageTitle":"Revert \"Edit variable name in accordance to code quality standards\"","messageBody":"This reverts commit 7b4b871b1b5cd422c23aa3141172e92cc332358e.\n","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"be38b2183bee45d85cc5db3ac78e038bb68c4bb5","isMergeCommit":false,"messageTitle":"Edit variable name in accordance to code quality standard","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"fbac222d5e7db32a386c4188c149b87070405c32","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into v1.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"464bd877f0fa5f195cd1c55468681926140a936e","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"7bb7071d03d906fb653225ec11f8fdc5d2c015b7","isMergeCommit":true,"messageTitle":"Merge pull request #18 from yicheng-toh/goals","messageBody":"Edit, List and Delete feature added to DietGoalList","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"210ec3b65836832798397065349dd6b6125b04a2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7fc15d856584c273d1ddd02ef20e6fc945c0b877","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"6e6acaa0b85747d95506e6f167879f07be6c3463","isMergeCommit":false,"messageTitle":"Add set diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":147,"deletions":16}}},{"hash":"1819c00c7b91e021c5a2f6835fa77ef2171e9391","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f260c0f6c97f51cd7d8f08a8088c112738d98b35","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"# Conflicts:\n#\tsrc/main/java/athleticli/ui/CommandName.java\n#\tsrc/main/java/athleticli/ui/Message.java\n#\tsrc/main/java/athleticli/ui/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"265a4ceda6601735b2a77ef0267b41f97882f52c","isMergeCommit":false,"messageTitle":"Add javadoc comment for set new diet goal command and related functions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":3}}},{"hash":"b92037b2a0b42ad19711a90845b07cdd3362e004","isMergeCommit":false,"messageTitle":"Add tests for set diet goals","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":8},"test-code":{"insertions":41,"deletions":0}}},{"hash":"9084bae7158b73dfbb3f0a619f6aebe369b56538","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"07f523f4003ceae8db86a2d1b17802b2e8ac81c1","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":7},"test-code":{"insertions":1,"deletions":1}}},{"hash":"8de8cc401abb5d08d84b2bb26252515296bf1f76","isMergeCommit":false,"messageTitle":"Improve code quality as suggested by skylee","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":9},"test-code":{"insertions":7,"deletions":10}}},{"hash":"53dbb39f2e5973f2db0ba853bd36857f40950cf4","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"# Conflicts:\n#\tsrc/test/java/athleticli/ui/ParserTest.java\n","fileTypesAndContributionMap":{}},{"hash":"5497a736bb9ba3e81465ba6cd402dd6e440488a3","isMergeCommit":false,"messageTitle":"Remove bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"6c48bb7583eb068f7da773feb5f87971a8a7246e","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"from dylan and skylee\n\nCo-authored-by: DaDevChia \u003c88506363+DaDevChia@users.noreply.github.com\u003e\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":26}}},{"hash":"f9402e37c285cc3353c372f24a72a921c52e9dff","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"860d0f714dc99262be545f5fcdca7b8b5a7257d5","isMergeCommit":false,"messageTitle":"Remove bugs generated from review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":22}}},{"hash":"92a226e49532f19b23d888ac1819aaae9db6e453","isMergeCommit":true,"messageTitle":"Merge pull request #35 from yicheng-toh/goals","messageBody":"Add logic for setting diet goals","fileTypesAndContributionMap":{}},{"hash":"aad918a5a820574a24ac760f5e96adc0bd96eaef","isMergeCommit":false,"messageTitle":"Add set diet goal tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":78,"deletions":0}}},{"hash":"8ca8855c2425074d46c5d30c3f295e2eb2b11755","isMergeCommit":false,"messageTitle":"Add edit feature for diet goals","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":59,"deletions":5},"test-code":{"insertions":87,"deletions":1}}},{"hash":"14fa302c8df0c16f18f22083f998f63e76d21804","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fd2680282a51c3b9c969b2701d259479d0fdd064","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"42ef388db1c0eb831020d8ecf8f7bb7cea34004d","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"9e01b4dd470e2d983b1dcc1c19c6fcbf6977720b","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":4,"deletions":2}}},{"hash":"d6275c5592af89a77ab748f575a41fafe9df4d81","isMergeCommit":false,"messageTitle":"Update EditDietGoalCommandTest.java","messageBody":"Change assert (false) to fail (e)","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":3}}},{"hash":"74de6f6f59717b4cbff9c03279c74562f4550fb9","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"e79340716e4d73ac351d269ef36416455620b8a4","isMergeCommit":false,"messageTitle":"Update SetDietGoalCommandTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":3}}},{"hash":"5120ea5fc744ce8ccd56029ae6b4e62d2fa39720","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"325a3842beb9c49bbd1abcd5e58f0db615f1d475","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"4b8e30379d7bfac5327aa2e8a689f81e3586dd4a","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/goals\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"38165ec30b062bbee2c2182885be2fc9670b6404","isMergeCommit":false,"messageTitle":"Add list functionality for goals","messageBody":"Fixes #36\n","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":12},"test-code":{"insertions":6,"deletions":4}}},{"hash":"560c41fa157e1c13d3422ba8d005839182f3a529","isMergeCommit":false,"messageTitle":"Revert \"Add list functionality for goals\"","messageBody":"This reverts commit 38165ec30b062bbee2c2182885be2fc9670b6404.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":21},"test-code":{"insertions":4,"deletions":6}}},{"hash":"007f353277c407c23e42689c66846d94f357d711","isMergeCommit":false,"messageTitle":"Revert \"Revert \"Add list functionality for goals\"\"","messageBody":"This reverts commit 560c41fa157e1c13d3422ba8d005839182f3a529.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":12},"test-code":{"insertions":6,"deletions":4}}},{"hash":"bdb4c7ef4c849129a02e24708f4ea7010d658184","isMergeCommit":false,"messageTitle":"Improve code quality as recommended by gradle check","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"3df9060f6f3b4bede451bf9673c60126c2c0d42f","isMergeCommit":false,"messageTitle":"Add list feature and test for diet goals","messageBody":"Fixes #36\n","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":0},"test-code":{"insertions":49,"deletions":0}}},{"hash":"f0c393023640b78601c91c27f90e64fb1be69534","isMergeCommit":true,"messageTitle":"Merge pull request #39 from yicheng-toh/goals","messageBody":"Add logic for edit and list feature for diet goals","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"55bfdce7ca33e0c2d0d7150be776808b39d2ca69","isMergeCommit":false,"messageTitle":"Add delete feature to diet goals","messageBody":"Fixes #47\n","fileTypesAndContributionMap":{"functional-code":{"insertions":56,"deletions":8},"test-code":{"insertions":50,"deletions":0}}},{"hash":"475f260240108ff3e67de71e89b62a50d3e6fc25","isMergeCommit":false,"messageTitle":"Add javaDoc for delete diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":4}}},{"hash":"21c9700f10693d22dee1ca6b3327feaaa48847cd","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"86894b29e040a086c478b5ba17922387c6c27336","isMergeCommit":false,"messageTitle":"Remove bugs pointed out by gradle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"b97bfd626d44cdc53e734cff74a58ff6650bf2fa","isMergeCommit":false,"messageTitle":"Address bugs pointed by gradle check","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"d73c39a8cc37866eb2e25f3b63db45c692284ee5","isMergeCommit":false,"messageTitle":"Address bugs pointed out by gradle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":2}}},{"hash":"c4990ef5c5edfe5288cdbf7bf2d0f286aa0dd961","isMergeCommit":false,"messageTitle":"Add assertion and logging for delete diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":0}}},{"hash":"8e8d5eb84a2dbbcfa3d1cd2f66d052ddf5fdcd7c","isMergeCommit":false,"messageTitle":"Correct the logic for the use of assert for delete diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"0626b32e5e8a590d0263836b1fed44e4c0eb0292","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"135345773cb5f1df502c0d56bce68f51586e92fc","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"As suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"de1897900d894a13f7db59b6daf6ea3081ef3dda","isMergeCommit":false,"messageTitle":"Add logger manager as suggested from review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}},{"hash":"e8ac4eeafc3f90b4831c5e8d6619408afc83318a","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fe7ba04b1ef4956261e8846d72ad6b3311ed6ea1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"89accd50f5d41aec4b2b736ba4a307a6c9cdbccc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"c80e15d1671c5a2df29bcce43f8f50b71959368d","isMergeCommit":true,"messageTitle":"Merge pull request #48 from yicheng-toh/goals","messageBody":"Add logic to delete feature for diet goals","fileTypesAndContributionMap":{}},{"hash":"5b8de0f5491f57d04390013b749cfd7de581539e","isMergeCommit":false,"messageTitle":"Remove small bugs for diet goals parser and UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"b7517f37d328db94e3fea66f6a79b1f89e6306f1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"04fa3b597b79559670080a0adacabf5e70830e9d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"097eb979c0f4b6e8a516a3305d12ff79ada4cdbc","isMergeCommit":false,"messageTitle":"Edit tests to suit change in diet goal UI","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":4}}},{"hash":"a1d40b4527fa202c0f0c512e745f00688c4c2156","isMergeCommit":true,"messageTitle":"Merge pull request #60 from yicheng-toh/goals","messageBody":"Resolve UI bugs for diet goals","fileTypesAndContributionMap":{}},{"hash":"6b6615695e8efb333c505354cb0afd26b8a15c58","isMergeCommit":false,"messageTitle":"Add user guide for diet goals","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":133,"deletions":0}}},{"hash":"0d40e04e993615928bad76e6d9cb141a4950c1d1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"15c1ef7c78934369dff8add9d6d205a5bca275cc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cfcf09fcc76cd212521658db26e837efbae18b99","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Standardisation of nutrients name.\n\nCo-authored-by: nihalzp \u003c81457724+nihalzp@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-22","commitResults":[{"hash":"f3952eacf1f02bde21661454462f27977da36a0e","isMergeCommit":true,"messageTitle":"Merge pull request #67 from yicheng-toh/goals","messageBody":"Add user guide for diet goals","fileTypesAndContributionMap":{}},{"hash":"c3cf1d210ffb57e8afd4f4410734128dcfa1eaad","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2cedf33acacb6375a8eb96318a82e9858c0e4d14","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"148527f78ce0d1854d51ceafb69c1cca1c544f08","isMergeCommit":false,"messageTitle":"Enable assertions when running AthletiCLI","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"4317cc604503258b97ab92e712a4a93a693295a1","isMergeCommit":false,"messageTitle":"Resolve bugs arising from set and edit diet goal command","messageBody":"Fixes #52, #53\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":1}}},{"hash":"3ff13bdb978ea8eb77d520c26c3b8ffdae2379d0","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"94d3e74d658af2c79e0f1efafac1e2767585bbcc","isMergeCommit":true,"messageTitle":"Merge pull request #81 from yicheng-toh/v2.0","messageBody":"Bug fixes for diet goals","fileTypesAndContributionMap":{}},{"hash":"91b84f18b59ea71ce90fca62ecce202043fe1827","isMergeCommit":false,"messageTitle":"Add nutrient verifier class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":12},"test-code":{"insertions":18,"deletions":13}}},{"hash":"bde1fc1aa20fe496200a5b981f495294496cf17b","isMergeCommit":true,"messageTitle":"Merge branch \u0027v2.0\u0027 of https://github.com/yicheng-toh/tp into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e8b121a47571b5876785a3e5ec61e78e2de1d3c6","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"564734d174060980d564fa1db7170d0b1a607503","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e93bd0a55ed69f0a04ac1fdca0f2598197053543","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":6}}},{"hash":"4390ac41677bf685e92ec91c085328f1e56b4f90","isMergeCommit":true,"messageTitle":"Merge branch \u0027v2.0\u0027 of https://github.com/yicheng-toh/tp into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8da238ac5424b33ab2fed7e24815e260a3b62f79","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"a1261976be0afd2475931767edf5977cfc9ef876","isMergeCommit":true,"messageTitle":"Merge pull request #83 from yicheng-toh/v2.0","messageBody":"Add nutrient verifier class ","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"0073e679dd94d81932af308ccf2b525f5717ad7d","isMergeCommit":false,"messageTitle":"Add tests for diet goal and diet goal parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":9},"test-code":{"insertions":83,"deletions":44}}},{"hash":"8168c69bb23fd3ab242b30fda1f356df043bc346","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"075abf178d86f7bfc9cad32876d3eaae946d5ec9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"e4a004f8366d44a9ce8d7cc48b3536497fa43c2f","isMergeCommit":false,"messageTitle":"Add diet goals to developers guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":95,"deletions":4}}},{"hash":"0fb7b737653eddf2d4dcd7276179878a6ddefe5f","isMergeCommit":true,"messageTitle":"Merge pull request #90 from yicheng-toh/v2.0","messageBody":"Add tests for diet goal and diet goal parser","fileTypesAndContributionMap":{}},{"hash":"1424e1cc60dee61ce9ff627a15fbb617c6ec33f3","isMergeCommit":false,"messageTitle":"Add diet goals to text ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}}]},{"date":"2023-10-25","commitResults":[{"hash":"6571556b1108e08fe2eb70c53b5553370fdd8d0e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bf0fa992b3f8e3a05d016e933320999919a99592","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"# Conflicts:\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"5eac6f50eda525e2c4a6ab8c1c2db884ada9a722","isMergeCommit":false,"messageTitle":"Remove grammatical error","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"a8b9c18517348c5d1e2253f8c5633c0bad935ce5","isMergeCommit":true,"messageTitle":"Merge pull request #94 from yicheng-toh/v2.0","messageBody":"Add diet goals to text ui test","fileTypesAndContributionMap":{}}]}],"nihalzp":[{"date":"2023-10-05","commitResults":[{"hash":"5333d4cf1c8a9b0ea1a9ec084892c14dea7d53b2","isMergeCommit":false,"messageTitle":"Add individual info","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"a705a999b30431c68e39f5b0167f9b66b89debaf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into nihalzp-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ca99d34683f1a8b4ffdca5fa6dbfdf33eb4e6afb","isMergeCommit":true,"messageTitle":"Merge pull request #3 from nihalzp/nihalzp-AboutUs","messageBody":"Add Individual Info - nihalzp","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"88c9014401be33db3f1415d271d1e6abc593324c","isMergeCommit":false,"messageTitle":"Relocate diet goals files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":108}}}]},{"date":"2023-10-14","commitResults":[{"hash":"c977c9aed16f59a17ccb9512d30c061de27a153a","isMergeCommit":false,"messageTitle":"Use ArrayList inheritance for DietGoalList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":23}}},{"hash":"020e4dbefe29062a29b5f8e2eb7e86e20daa3f11","isMergeCommit":false,"messageTitle":"Add JavaDoc comments for diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":5}}},{"hash":"d8ff94defc829ff2c17be79015165643874ae29d","isMergeCommit":false,"messageTitle":"Use diet instead of meal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3},"other":{"insertions":2,"deletions":2}}},{"hash":"73b7b8ab849eafc755f1903712899e7559f9a8db","isMergeCommit":false,"messageTitle":"Update diet goals test paths","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":22,"deletions":23}}},{"hash":"403cd565a953c696900f240c4c3d250dc81b0aff","isMergeCommit":false,"messageTitle":"Rename meals to diets in Data class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"ead04ae4847fba3c551ac2545117e7225fc7a7a0","isMergeCommit":false,"messageTitle":"Implement Diet class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":104,"deletions":0}}},{"hash":"750a58d6d163985c90f67dae37df9bf6ebcb3e60","isMergeCommit":false,"messageTitle":"Update doc string in diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":1}}},{"hash":"f48538ce055185165435ec50881e37e26220e28b","isMergeCommit":false,"messageTitle":"Implement DietList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":0}}},{"hash":"f9175487993b5ec115a2afa01d38d319e9a86cee","isMergeCommit":false,"messageTitle":"Add DietTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":69,"deletions":0}}},{"hash":"bd3307495eb8061d5b98192d99304d969ad94548","isMergeCommit":false,"messageTitle":"Add DietListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":97,"deletions":0}}},{"hash":"41f96d52d3dd4b7f0319f83559ca6b09a27929e5","isMergeCommit":false,"messageTitle":"Refactor DietGoalListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":14}}},{"hash":"da06f350e71926f9a0ce37d2a7f6701e5ae45f18","isMergeCommit":false,"messageTitle":"End file with new line","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"942346561f3ee347e60d3d95ed802307cdc462f2","isMergeCommit":false,"messageTitle":"Simplify logic in DietGoal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"24faa7a7468bfc3c3cc48ecfec34c6716c9da92f","isMergeCommit":false,"messageTitle":"Remove redundant blank lines","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"308d4471b8aaf54fdf59de6692b67e8a2a9e2c17","isMergeCommit":true,"messageTitle":"Merge pull request #20 from nihalzp/diet","messageBody":"Add and Refactor Diet","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"f019f39e5bfa0166876bc7e860a08c729d4911be","isMergeCommit":false,"messageTitle":"Rename meal to diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":12}}},{"hash":"6024bdace6ecb11f50c0871bd9a4b3682a83057a","isMergeCommit":false,"messageTitle":"Add AddDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"a5b6a6729ae36ee4aca74da6255acd9e24a33126","isMergeCommit":false,"messageTitle":"Add DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"53b2e8767c47560746212606d5eedc92453abe44","isMergeCommit":false,"messageTitle":"Add ListDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":0}}},{"hash":"52fcad706d32a863171d058b0cb5231045833d4b","isMergeCommit":false,"messageTitle":"Add new line in diet and diet goal list toString","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"f0e98e4485fa746bc0a6fd97de9a427f5e962f80","isMergeCommit":false,"messageTitle":"Add diet command names","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1}}},{"hash":"ec94df1485d57806adf02878b43a045c73efd94c","isMergeCommit":false,"messageTitle":"Add diet specific message strings","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":15}}},{"hash":"c5b661267550c84a842d366f967a635e8942f7ea","isMergeCommit":false,"messageTitle":"Implement parsers for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":217,"deletions":27}}},{"hash":"1b744ec76329f10942f730964626ba261a75a73c","isMergeCommit":false,"messageTitle":"Add tests for AddDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":39,"deletions":0}}},{"hash":"8741c43909a7d7bb3fe8996cdcf9aa800369abf3","isMergeCommit":false,"messageTitle":"Add tests for DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":53,"deletions":0}}},{"hash":"3807da90bac12694e9cd92296769b232f3add879","isMergeCommit":false,"messageTitle":"Add tests for ListDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":39,"deletions":0}}},{"hash":"ed9e42c52a404ed0352e1c628b7f67a2f30e5005","isMergeCommit":false,"messageTitle":"Update tests for DietList","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}},{"hash":"bd0136d0adfd32f2a41c64317c3bc71838387800","isMergeCommit":false,"messageTitle":"Add parser tests for diet","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":113,"deletions":10}}},{"hash":"59c9075387f54f1f3f4f6c63f7642bc5e5a162c3","isMergeCommit":false,"messageTitle":"Add diet guide in docs/readme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":42,"deletions":1}}},{"hash":"14e3ee42cc76c89d4bc0798b127a4014cb78553a","isMergeCommit":false,"messageTitle":"Delete trailing space","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"3c39bbc0af962d145c718b68c3fcbcfabbb88688","isMergeCommit":false,"messageTitle":"Fix JavaDoc comments indentation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":16}}},{"hash":"fd90dd4a778d3fb1d85d7b10df36a48cd23a2fa6","isMergeCommit":false,"messageTitle":"Rename unit test func names","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":17,"deletions":17}}},{"hash":"c4d473794e6bdd31901379ef755f369fbb5e4c66","isMergeCommit":false,"messageTitle":"Fix array initialization indentation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"8221d356f374da5947b48eb9f554b0792dbd8c02","isMergeCommit":false,"messageTitle":"Fix formatting issue in readme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":26,"deletions":9}}},{"hash":"4d38e16e4263892d35bfc181789cb6d6c1155054","isMergeCommit":false,"messageTitle":"Refactor delete diet command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"5e73492dc594864ff26e59d2383f52f5ee46ab4d","isMergeCommit":true,"messageTitle":"Merge pull request #31 from nihalzp/diet-parser","messageBody":"Diet parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"8c8189cec6c3badcb1166699f4393be4585477cd","isMergeCommit":false,"messageTitle":"Fix diet commands and formatting","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":26}}},{"hash":"582f99799f073c326bef887656e215eb02fb78d9","isMergeCommit":false,"messageTitle":"Fix message for carb missing","messageBody":"","tags":["v1.0-Release"],"fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3132eb598029e7f51223d00284e77d6ad8feef03","isMergeCommit":true,"messageTitle":"Merge pull request #66 from nihalzp/fix-user-guide","messageBody":"Fix User Guide for Diet and Reformat","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"6ed6200b87c5bffeabc1c24c8b443f98fec292c0","isMergeCommit":false,"messageTitle":"Use Parameter class for diet parameters","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":13}}},{"hash":"0f40b8834b9b1a9e4650180f4938c58d051dd68d","isMergeCommit":false,"messageTitle":"Add time tracking for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":162,"deletions":89}}},{"hash":"4abbcbe41c65853a869e8f6d8378ba6f52e13eca","isMergeCommit":false,"messageTitle":"Fix tests for diet commands","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":12,"deletions":3}}},{"hash":"eca691f3ab86b67edb48d70e15eb751d4277996c","isMergeCommit":false,"messageTitle":"Fix tests for diet parsers","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":65,"deletions":36}}},{"hash":"0fa31da6f9619119c3019d4adea72a9f33597cc3","isMergeCommit":false,"messageTitle":"Fix tests for diet classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":36,"deletions":15}}},{"hash":"d8cfe5bfd34245d1a72213fd5f952648183ec66c","isMergeCommit":false,"messageTitle":"Update message MESSAGE_DIET_INDEX_TYPE_INVALID","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"cd9b257c3fc7f20d503026f8c67e3231a9e66003","isMergeCommit":false,"messageTitle":"Add assertions in Diet class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"eee010dce17b6f224f8a909a60d8f681713c2bca","isMergeCommit":false,"messageTitle":"More input validation in Parser class for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":3}}},{"hash":"02568aabc0b34b1f6c28dde8644704ae18d51054","isMergeCommit":false,"messageTitle":"Add index assertion in DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"e3595890c2588e040028fddd22a1091522c7aa40","isMergeCommit":false,"messageTitle":"Add more tests for diet parsers","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":281,"deletions":22}}},{"hash":"aacdf1b2545d69e5a1792692558a9042dd00d0ee","isMergeCommit":false,"messageTitle":"Update add-diet help message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"bef5447ef3d7c7f8f6db129515039e1b54aab108","isMergeCommit":false,"messageTitle":"Implement find-diet functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"358ed8984bdf10e3bf17c8964519afb0e3383669","isMergeCommit":false,"messageTitle":"Update parseDate function message and add tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":22,"deletions":0}}},{"hash":"20c228e6549a04b46f7288b0cbf379b05b25c507","isMergeCommit":false,"messageTitle":"Add class description for FindDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"1ff09d52277e1533f927db45e3809eb478f4795f","isMergeCommit":false,"messageTitle":"Update the user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":2}}},{"hash":"081518a3e098a3be3a1ce114b74f8613b65b2fd5","isMergeCommit":false,"messageTitle":"Fix javadoc position","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"c156515369529f8434a1ff5802ef24c7352fa188","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into diet-time-tracking","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"66581411b947e2128990dbc7e8842c8f173230e3","isMergeCommit":false,"messageTitle":"Make datetime and date invalid message generic","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-26","commitResults":[{"hash":"e5496f639d77099a14a821d6b56703e4a27403c3","isMergeCommit":true,"messageTitle":"Merge pull request #102 from nihalzp/diet-time-tracking","messageBody":"Diet time tracking + find-diet","fileTypesAndContributionMap":{}},{"hash":"ea4303cfaeeebf080fad8b14dcf449d26498d38e","isMergeCommit":false,"messageTitle":"Implement edit-diet command and tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":76,"deletions":0},"test-code":{"insertions":164,"deletions":0}}},{"hash":"213ee0e65b536d7aa87951784bb4c273299c559e","isMergeCommit":false,"messageTitle":"Implement the edit-diet functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":6},"test-code":{"insertions":64,"deletions":2}}},{"hash":"60064b98d49fa5f7466495f3a0428250fdb52003","isMergeCommit":false,"messageTitle":"Update the userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":40}}},{"hash":"488c90ca391eee2676bb1a5c029550c0ce0f444f","isMergeCommit":false,"messageTitle":"Update javadoc comments","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8}}},{"hash":"af978412476f2640e94b2ec5a3e04c6546ca9a30","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into diet-edit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"80a2b59c9231ce13b5b49f59d2519876eb646343","isMergeCommit":false,"messageTitle":"Use assertArrayEquals instead of assertEquals","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":22}}},{"hash":"db168593db10286bb1470ebfd6d97f12f8dfdfc7","isMergeCommit":true,"messageTitle":"Merge pull request #106 from nihalzp/diet-edit","messageBody":"Diet Edit Feature","fileTypesAndContributionMap":{}},{"hash":"b75c496ed9a516cabb66372a50244503e91d9a27","isMergeCommit":false,"messageTitle":"Add implementation and user stories diet DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":8}}},{"hash":"8ba22bca40a143b34b68d09dfec613e25087b334","isMergeCommit":true,"messageTitle":"Merge pull request #107 from nihalzp/developer-guide","messageBody":"Developer Guide for Diet","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"skylee03":{"docs":384,"functional-code":971,"test-code":30,"other":4},"DaDevChia":{"docs":112,"functional-code":478,"test-code":400},"AlWo223":{"docs":195,"functional-code":1404,"test-code":1064,"other":5},"yicheng-toh":{"docs":225,"functional-code":364,"test-code":460,"other":1},"nihalzp":{"docs":160,"functional-code":948,"test-code":1013}},"authorContributionVariance":{"skylee03":36607.84,"DaDevChia":18386.273,"AlWo223":42012.94,"yicheng-toh":15042.861,"nihalzp":51064.895},"authorDisplayNameMap":{"skylee03":"CS2113-T17-1 YANG..TIAN","DaDevChia":"CS2113-T17-1 DYLA..TIAN","AlWo223":"CS2113-T17-1 WOLT..LIUS","yicheng-toh":"CS2113-T17-1 TOH ..HENG","nihalzp":"CS2113-T17-1 NIHA..IAJI"}} +{"authorDailyContributionsMap":{"skylee03":[{"date":"2023-10-05","commitResults":[{"hash":"0b24d95bb5dcdbe7f53c0dd57ecd3e991bca0fba","isMergeCommit":false,"messageTitle":"Update skylee03 in AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"8ad36b4ca9d2ccd786c5e20b5c8240bc2ca15211","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into skylee03-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"23829d9a0b09e12b0f8f162d5d87add4f6ab4a63","isMergeCommit":true,"messageTitle":"Merge pull request #4 from skylee03/skylee03-AboutUs","messageBody":"Update skylee03 in AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"c3134ce83d36393de4d6cb68d6340f07ebd6b9b0","isMergeCommit":false,"messageTitle":"Add CLI interaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":253,"deletions":21},"other":{"insertions":2,"deletions":2}}},{"hash":"135bb1b04338c2e0253592c8342d81b54c82595a","isMergeCommit":false,"messageTitle":"Update build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"0481e59c5747ab3d43fa6b51a3e7c7d864054ca5","isMergeCommit":false,"messageTitle":"Create packages/classes for commands and data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":164,"deletions":5}}},{"hash":"8cb6c0a847e3eb76064ffce3ace232ec69d49699","isMergeCommit":false,"messageTitle":"Add ParserTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":40,"deletions":12}}}]},{"date":"2023-10-16","commitResults":[{"hash":"710297a46c87d88cf6d8adfe83c5b78db64d15f9","isMergeCommit":false,"messageTitle":"Use `AthletiException` class to handle all exceptions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":17},"test-code":{"insertions":3,"deletions":3}}},{"hash":"8f252f892e5a11a13fc316eb9297662c969c5c31","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into refactor-exception","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"065480e820ccd9cb6be632e7b564ee36cc2f936c","isMergeCommit":true,"messageTitle":"Merge pull request #41 from skylee03/refactor-exception","messageBody":"Use `AthletiException` class to handle all exceptions","fileTypesAndContributionMap":{}},{"hash":"2eb3e967083322cc11ef6500506c6aa6744f9e08","isMergeCommit":false,"messageTitle":"Use `assert` in `ui` package","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"20d90df4a8c446e303b0c3c75d8ee267031a8eb3","isMergeCommit":false,"messageTitle":"Use `logging` in `AthletiCLI` class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":0}}},{"hash":"4e7f3667fbbb2847269403d46dcd42225835f259","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"1c7afe5447f87cdcb2bfb039cc520c089348ef34","isMergeCommit":false,"messageTitle":"Remove debug output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"2f854b5605a94a156c6aecaa1c9e777e449a15bc","isMergeCommit":true,"messageTitle":"Merge pull request #44 from skylee03/assert-ui","messageBody":"Use `assert` and `logging`","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"5214c3b07fb99d09964e9560f954508e5e6e8fc2","isMergeCommit":false,"messageTitle":"Add help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":132,"deletions":0}}},{"hash":"b84b80eacd7e3743198ed32c6ac92ee230a922fa","isMergeCommit":false,"messageTitle":"Update runtest to ignore trailing spaces","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"49ba6f0df297e185c7469ac5526aa011133e31e8","isMergeCommit":false,"messageTitle":"Update runtest.sh to make it compatible with MacOS","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"c81d5fb5e06414f18e5e3b2926d8f43d99d823cd","isMergeCommit":false,"messageTitle":"Set locale of DateTimeFormatter to English","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"0114bd9c4a5f135b16959e5b457ed7f0c53ed7a1","isMergeCommit":true,"messageTitle":"Merge pull request #78 from skylee03/set-locale","messageBody":"Set locale of DateTimeFormatter to English","fileTypesAndContributionMap":{}},{"hash":"8d15b73af3f636f95ca95466a39e3b9f55b38583","isMergeCommit":true,"messageTitle":"Merge pull request #77 from skylee03/help-command","messageBody":"Add `help` command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"848aa98b502c41aafc8c28bbf396547a31200de6","isMergeCommit":false,"messageTitle":"Add storage features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":19}}},{"hash":"79dced6990c7cd3edb33d705becfaa7030943dfc","isMergeCommit":false,"messageTitle":"Add help messages for save command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"51b1217df5232a93d66b1d0711c81fb9f51503ea","isMergeCommit":false,"messageTitle":"Update src/main/java/athleticli/commands/ByeCommand.java","messageBody":"Co-authored-by: Yi Cheng \u003c75836313+yicheng-toh@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"11e07f26742dad96e7ab2d5401e90d6c36250ef5","isMergeCommit":false,"messageTitle":"Modify the extension of `PATH_SAVE`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f1d356e443da63e06f4d38e5fab10696da75b49","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into storage","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"273f57174a24242f32de525503aedd6dc76aa477","isMergeCommit":false,"messageTitle":"Save data when the JVM begins its shutdown sequence","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":11}}},{"hash":"d4ff6c77512b078593d0721c1635c4704a35623d","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into storage","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7d8724f1da03d1767abcad57caf2757b1bc37fdc","isMergeCommit":true,"messageTitle":"Merge pull request #79 from skylee03/storage","messageBody":"Add storage features","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"131ee521013bbe8bb827aebfde7d94c68d23d694","isMergeCommit":false,"messageTitle":"Add `Findable` interface and classes for find commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":207,"deletions":3}}},{"hash":"4b20c0518ce38fa346b95cf231b3b8031245a002","isMergeCommit":false,"messageTitle":"Add find commands into the parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":1}}},{"hash":"b7b7a16f0f429edd78b65b4a9fded8f3a17228ad","isMergeCommit":false,"messageTitle":"Update help messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"674c55c740884d4a4b914ee20f3585ec655afc1e","isMergeCommit":false,"messageTitle":"Remove redundant `try-catch` in `FindCommand`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":11}}},{"hash":"1c038a815dc0e0ae01dfce8c80fe5e5723fdec9e","isMergeCommit":true,"messageTitle":"Merge pull request #88 from skylee03/findable","messageBody":"Add `Findable` interface and classes for find commands","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"4837bf70a4a4cc74ef4de8c775ceb8f657e5d0bf","isMergeCommit":false,"messageTitle":"Implement goal abstract class for goal functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"a40febfd328bf48cbd669cb2e7d0d06fdb607ab6","isMergeCommit":true,"messageTitle":"Merge pull request #95 from skylee03/abstract-goal","messageBody":"Implement goal abstract class for goal functionality","fileTypesAndContributionMap":{}},{"hash":"948f3b010187ccd97398a0bd2a4cd1159e152c0b","isMergeCommit":false,"messageTitle":"Add `Data data` as a parameter of `isAchieved`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"e1fa645e12c4edefe08f6c8aa7ffa177fc6cabcc","isMergeCommit":false,"messageTitle":"Apply singleton pattern on `AthletiCLI` and `Ui`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":5}}}]},{"date":"2023-10-26","commitResults":[{"hash":"14c3ab999da562617c2378169aa628b47a11aa8d","isMergeCommit":true,"messageTitle":"Merge pull request #100 from skylee03/goal-param","messageBody":"Add `Data data` as a parameter of `isAchieved`","fileTypesAndContributionMap":{}},{"hash":"4107d394795f0018e6dadd1ebb0d39d4ea02a242","isMergeCommit":false,"messageTitle":"Add text description about the design in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":32,"deletions":5}}},{"hash":"1dc84c23988b70fbefde0757fae45b026438f34d","isMergeCommit":false,"messageTitle":"Put the UG into the correct file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":354,"deletions":396}}},{"hash":"055aa0d099009f347dfe563783d8f7d62a0c09a6","isMergeCommit":false,"messageTitle":"Add a good-looking theme to the website","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":16}}},{"hash":"fadf287939f95bcc4deba9f332991297d32d589f","isMergeCommit":false,"messageTitle":"Unify avatar size","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ab3ce4298f4f927908cdc5ef4939813e74619275","isMergeCommit":true,"messageTitle":"Resolve conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b2a26ec920b4537abf7cc1928e7fd1352dac97fe","isMergeCommit":true,"messageTitle":"Merge pull request #105 from skylee03/dg-design","messageBody":"Expand DG and beautify website","fileTypesAndContributionMap":{}},{"hash":"40d16c10e6711c71653e17428e97ef8faa7600a7","isMergeCommit":false,"messageTitle":"Adjust `Goal` abstract class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":65}}},{"hash":"0cc98a77b2ca81f9cb7eec5361f231dd55f122b5","isMergeCommit":false,"messageTitle":"Use enum constructor","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":54}}}]},{"date":"2023-10-27","commitResults":[{"hash":"19f7f405488e0fb88b3f91306199689594d473be","isMergeCommit":true,"messageTitle":"Merge pull request #109 from skylee03/abstract-goal-update","messageBody":"Reimplement `Goal` abstract class","fileTypesAndContributionMap":{}},{"hash":"9a32abb1972242d0be51e236bd95c2322acaea01","isMergeCommit":false,"messageTitle":"Reimplement storage features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":353,"deletions":91}}}]},{"date":"2023-10-28","commitResults":[{"hash":"f77202842a486d6473ccf45587ad9b51d73faaeb","isMergeCommit":false,"messageTitle":"Change the type of goal timespan from `long` to `int`","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-29","commitResults":[{"hash":"1a60499689a1b6b82adc814816abecdcd73c9437","isMergeCommit":true,"messageTitle":"Merge pull request #116 from skylee03/storage-editable","messageBody":"Reimplement storage features","fileTypesAndContributionMap":{}}]}],"DaDevChia":[{"date":"2023-10-05","commitResults":[{"hash":"0b6a61ab5f9e012eab2a34c0a65593eb3ee747db","isMergeCommit":false,"messageTitle":"Added profile information","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0694bcffcee38aa324b0dedbaaf61fa8b89ad035","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into dylanChia-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9bed8b4b05c9f4ac170143e58c4c73d268e03d1b","isMergeCommit":true,"messageTitle":"Merge pull request #5 from DaDevChia/dylanChia-AboutUs","messageBody":"Added profile information","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"e31e4398411fe06ef751b8432a69c3d71b25c757","isMergeCommit":true,"messageTitle":"Merge pull request #8 from skylee03/cli-interaction","messageBody":"Add CLI interaction","fileTypesAndContributionMap":{}},{"hash":"914104a7efdfba71222a6f004d620cb49119934d","isMergeCommit":true,"messageTitle":"Merge pull request #1 from AY2324S1-CS2113-T17-1:master","messageBody":"Master","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"bc77b66ec8241e85f841294349f30e9b9465178b","isMergeCommit":false,"messageTitle":"Implemented Sleep add, edit, delete, list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":276,"deletions":8}}}]},{"date":"2023-10-14","commitResults":[{"hash":"46edcdbfd294c5013e0757a607889e71809482be","isMergeCommit":false,"messageTitle":"Added Junit test for sleep class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":0}}},{"hash":"30613649314867940690602daa35f9c1e8035a45","isMergeCommit":false,"messageTitle":"Added junit test for AddSleepCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":30,"deletions":0}}},{"hash":"f02ea1e04e1a11a4c440b6ebd92499d9f6aabafe","isMergeCommit":false,"messageTitle":"Added junit test for AddSleepCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":41,"deletions":0}}},{"hash":"e335628314a2b34fdc8e888b4123aa841b7a165f","isMergeCommit":true,"messageTitle":"Merge remote master branch into branch-sleep","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"93d65605f87a62f40c372370935fb104f66a5771","isMergeCommit":false,"messageTitle":"Renamed all meal to diet class reference","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"119b279f86e540ae3cb4b7135023cd123a440bcc","isMergeCommit":false,"messageTitle":"Added junit tests for sleep commands in parser","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":29,"deletions":0}}},{"hash":"3daa08c864f2163c73bf65f2c77cee1c53bb0005","isMergeCommit":false,"messageTitle":"Added check for invalid index when deleting sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"9f0b9866dbb061311413c28742ea40725839b51d","isMergeCommit":false,"messageTitle":"Added tests for delete add and list sleep commands","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2},"test-code":{"insertions":79,"deletions":0}}},{"hash":"3cebb7864672cde7cb8da5f1ec04602c333ce7e9","isMergeCommit":false,"messageTitle":"Moved sleep test to correct directory","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"ca31bd932ae8ad595f649bc2c62ad5228c73a782","isMergeCommit":false,"messageTitle":"Removed unecessary imports from tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":11}}},{"hash":"3a803c14ec3b76f2662b2394eae5f4bacb3246c6","isMergeCommit":false,"messageTitle":"Added junit test for sleep edit command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":34,"deletions":0}}},{"hash":"51303b230c62fca9a6a626211baa7cb9017fac29","isMergeCommit":false,"messageTitle":"Fixed Checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":32},"test-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-15","commitResults":[{"hash":"eb4541cc26c4cf8d17caaf64796abc08498cfce5","isMergeCommit":false,"messageTitle":"Fixed space formatting","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"44ecbf846f21e675e5ec5eec5be301d5acc06aa1","isMergeCommit":false,"messageTitle":"Apply formatting suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":15},"test-code":{"insertions":0,"deletions":10}}},{"hash":"a9024e7352c2f21ceb932ed7f88be0cf295225eb","isMergeCommit":true,"messageTitle":"Merge pull request #21 from DaDevChia/branch-sleep","messageBody":"Added sleep tracking functionality, along with list, add, edit, delete methods ","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"500b2e0c0475943eef1256c34867d7d50def75fa","isMergeCommit":false,"messageTitle":"Added javadocs for all sleep features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":84,"deletions":6}}}]},{"date":"2023-10-17","commitResults":[{"hash":"8f210386deab792857278cb869d6e7dbe81e501e","isMergeCommit":false,"messageTitle":"Implemented LocalDateTime for sleep, fixes #22","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":65,"deletions":27}}},{"hash":"0ee91741c46cd5d09fdf8882c0c6a594c57d7176","isMergeCommit":false,"messageTitle":"Implemented setter methods for data object","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":1}}},{"hash":"2e75378f6fa4f6234a6213b8b9e4e63112ab93a4","isMergeCommit":false,"messageTitle":"Reworked all Junit tests for sleep, fixes #23","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":246,"deletions":104}}},{"hash":"98439a6061cc53595d9b4bcf49dc20ece2e4fdd9","isMergeCommit":false,"messageTitle":"Added and updated Junit tests for sleep parser","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":2}}},{"hash":"e8a479ebefd85df7f1e5fddd50d57329a538bf2c","isMergeCommit":false,"messageTitle":"Implement Message class for Sleep #24","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":37},"test-code":{"insertions":3,"deletions":4}}},{"hash":"0966da05332d6d9884a12762f1acca3e8b1cc608","isMergeCommit":false,"messageTitle":"Updated userguide for sleep features #25","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":77,"deletions":0}}},{"hash":"e14aa195ac61c0d1a6904bbd5ce0e58e9eeea98d","isMergeCommit":false,"messageTitle":"Implemeted gradle checkstyle suggestions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15},"test-code":{"insertions":8,"deletions":4}}},{"hash":"d5233b0465955498343b428ca27862b770758e3e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"887ad3d18dea4c1a1eb52f3d136e5c5b77410ff2","isMergeCommit":false,"messageTitle":"Applied spacing suggestions from code review","messageBody":"Added spacing to javadocs as per coding standard\n\nCo-authored-by: nihalzp \u003c81457724+nihalzp@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"0490d9a8a964b89afbc27ff19ccd712fdb8fdfd8","isMergeCommit":false,"messageTitle":"Added exceptions handling for edit / delete sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":10},"test-code":{"insertions":14,"deletions":15}}},{"hash":"ff52e5bb4276c795953d232fda4948bb90a57b90","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-sleep-improvements\u0027 of https://github.com/DaDevChia/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"210ec4fe5da9d884e44c7ffebfb4ccfd30b037f2","isMergeCommit":true,"messageTitle":"Merge pull request #51 from DaDevChia/branch-sleep-improvements","messageBody":"Added improvements to sleep feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"1fda0f371511e7763971a8e38c52cc6ee6006686","isMergeCommit":false,"messageTitle":"Deleted redundant sleeplist method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":12}}},{"hash":"94ac2b8b4663af7522108a52ad90de9a1d94ec74","isMergeCommit":false,"messageTitle":"Changed list printing method for list sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":6},"test-code":{"insertions":8,"deletions":7}}},{"hash":"332d5ab2105cabf9e0f9b082cc5839ee54bb3463","isMergeCommit":false,"messageTitle":"Closes #64; Updated junit tests for sleep class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":45,"deletions":18}}},{"hash":"2f8658f4e76f96fdabe3dbe922d12322f4d94096","isMergeCommit":false,"messageTitle":"Closes #75 Added Logging and Assertions for Sleep","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":3}}},{"hash":"3d4b9ae69ff02a8322cf924b553b6c2f3f53137d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/DaDevChia/tp into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d86e23fbe297e8710a3eae25ca3943b0a40ae544","isMergeCommit":false,"messageTitle":"Closes #50; Add parameter class for all separators","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"0ff05b3b4d4c4f18348dc0a776fc530d797a7249","isMergeCommit":false,"messageTitle":"Fixed Checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}}]},{"date":"2023-10-23","commitResults":[{"hash":"e5c4832683aed3603cb80efe4aa56505f9503ab6","isMergeCommit":false,"messageTitle":"Added changes to style from code review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":17}}},{"hash":"3e9374fca356e5feb28ec7cdd3b44aef0182d008","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-sleep-improvements","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"b74f2d37cb61977204e9bbb83986d88f7551f428","isMergeCommit":false,"messageTitle":"Fixed Checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"c2104bb0d9f49758b042d539db3778ce935cd787","isMergeCommit":true,"messageTitle":"Merge pull request #76 from DaDevChia/branch-sleep-improvements","messageBody":"Sleep code quality Improvements","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"517dbf2ef08e51ef3147ff8211541ab7b268bc0b","isMergeCommit":false,"messageTitle":"Added sleep features to Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":4}}},{"hash":"fa882cecd3ffdfff6f0a21b60e1e3e1d0d7858be","isMergeCommit":true,"messageTitle":"Merge pull request #114 from DaDevChia/branch-sleep-improvements","messageBody":"Added sleep features to Developer Guide","fileTypesAndContributionMap":{}}]}],"AlWo223":[{"date":"2023-10-05","commitResults":[{"hash":"d1830be8fa3c9af05ee0c009b1e7e57fefed93d8","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"cae7a967c15901f3c6c233cc6d5d43d26b914577","isMergeCommit":false,"messageTitle":"test forking","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"446cc7162d1d868e5a3050a324ec45953fc26a3a","isMergeCommit":true,"messageTitle":"Merge pull request #1 from AlWo223/devalex","messageBody":"test forking","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"024c68352be321cb9ceb2f7df72447ae27259dec","isMergeCommit":false,"messageTitle":"Add activity parent class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":62,"deletions":1}}}]},{"date":"2023-10-11","commitResults":[{"hash":"40bd286165eebade7f4426821383a27b08302d21","isMergeCommit":false,"messageTitle":"add run, swim and cycle as activity childs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":24}}}]},{"date":"2023-10-12","commitResults":[{"hash":"9c6c3ed9e8a77f718996d99605e5ab8393d82f15","isMergeCommit":false,"messageTitle":"Enable user to add run","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":124,"deletions":2}}},{"hash":"06f3e25556e6eb2fbd58459542d9802421b01cdf","isMergeCommit":false,"messageTitle":"Simplify add run to add activity","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":16}}},{"hash":"d0949fc7e73bafcf00af8e84541620da5da2b53d","isMergeCommit":false,"messageTitle":"Provide JavaDoc comments","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":1},"test-code":{"insertions":4,"deletions":0}}},{"hash":"b6b92040342ba95378e7a324ff3e28998dfb633f","isMergeCommit":false,"messageTitle":"Implement adding of specific activities swim, cycle and run","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":19}}},{"hash":"af6cc67a94a9a5362066c4ea936bfd8d19d70ef8","isMergeCommit":false,"messageTitle":"Generate JUnit Tests for different types of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":24},"test-code":{"insertions":146,"deletions":1}}},{"hash":"22dddf5c7a3a6aab26c295f9c95e46fff7788447","isMergeCommit":false,"messageTitle":"Implement activity parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":0}}}]},{"date":"2023-10-13","commitResults":[{"hash":"f1a10d37df14ad9eb5360e13fa1d55bf70c3c9d9","isMergeCommit":false,"messageTitle":"Enable parsing of other sport activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":202,"deletions":191}}},{"hash":"41a2d7f82fe734fdcc553083763d2f915b68dc88","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":23},"test-code":{"insertions":25,"deletions":22}}},{"hash":"2498fd588fccd610a3ec3c4241f14d417611a689","isMergeCommit":false,"messageTitle":"Place overload methods next to each other","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":16}}},{"hash":"21dfeec67a371f0dccb96b43391c2081a08d9392","isMergeCommit":false,"messageTitle":"Add single line representation of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":76,"deletions":10},"test-code":{"insertions":82,"deletions":30}}},{"hash":"a3e611afddcbc54beb94540e83bc196655f7fdbb","isMergeCommit":false,"messageTitle":"Describe how to add activities in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":5}}},{"hash":"d18183d67ecfdedc2b15a956a3717447418d735c","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":33},"test-code":{"insertions":10,"deletions":12}}},{"hash":"cb06421b762e002f0014f0a60ec324ebad344cf7","isMergeCommit":false,"messageTitle":"Resolve minor coding standard violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2},"test-code":{"insertions":5,"deletions":4}}},{"hash":"5efb24cc5a01130909e02b92c26e8ae7311a0787","isMergeCommit":false,"messageTitle":"Update src/main/java/athleticli/data/activity/Cycle.java","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"76d67353a828cda2fd27cb32d129ff98ede1c4e6","isMergeCommit":false,"messageTitle":"Update docs/README.md","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":7}}},{"hash":"6ca1d562827ca47c660144ab641fce02869449e4","isMergeCommit":true,"messageTitle":"Merge pull request #19 from AlWo223/activity","messageBody":"Add Activity","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"212799a32b8e92686294704025df23ae828ddad1","isMergeCommit":false,"messageTitle":"Add delete-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":2}}},{"hash":"f9e927a4e48c4a06c49492e359ef10fc2c08ceda","isMergeCommit":false,"messageTitle":"Remove magic numbers in activity parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":23}}},{"hash":"fef8602baa76f930bc9a2d94a38a0a26274f3ccb","isMergeCommit":false,"messageTitle":"Add delete-activity instructions in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":18,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"9fef12d5fe197162e1054e2d0fa70c5d09ff0a61","isMergeCommit":false,"messageTitle":"Add list-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":7}}},{"hash":"bbafeb117839aa2c8046e0566ae84256fa1bb2dd","isMergeCommit":false,"messageTitle":"Enable detailed view of activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":142,"deletions":17}}},{"hash":"a95ebe424439167e121ce27bb69140bb45adf76e","isMergeCommit":false,"messageTitle":"change flag parameter of list-activity command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"640898ee0a68ee886104e51336451781857c2330","isMergeCommit":false,"messageTitle":"Describe list-activity command in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":17,"deletions":0}}},{"hash":"ee39eaa464bbfd78829588b8903c4d78848eb924","isMergeCommit":false,"messageTitle":"Add edit command for activities","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":1}}},{"hash":"d06fe24f8ecab07eb82e821f5261027535368134","isMergeCommit":false,"messageTitle":"Update UserGuide with instruction for editing activities","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":22,"deletions":2}}},{"hash":"3902b0fdc6bfba8d5410dd371a16e912bf2eba43","isMergeCommit":false,"messageTitle":"Enable logging of activity editing process","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"56c4878e53519e4d18bc2f8f8637c93c89fd8615","isMergeCommit":false,"messageTitle":"Add assertion check to edit command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-18","commitResults":[{"hash":"a3424ee0a5873c1627dae1a67b53a80a80ef0cf0","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":30},"test-code":{"insertions":4,"deletions":6}}},{"hash":"17b7716904ee54cc8059ee038a591ef8ae2f8a10","isMergeCommit":true,"messageTitle":"Merge master branch","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9444463cdb497bb76c542a5873c8fef01c8c65dd","isMergeCommit":false,"messageTitle":"Add some JavaDoc comments to Parser code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":0}}},{"hash":"199697e0c7d231bde90cda121530dfc22b080fca","isMergeCommit":true,"messageTitle":"Improve code quality and readability","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bdda8c8d199d157e898e00485c085534f45ace0b","isMergeCommit":true,"messageTitle":"Merge pull request #59 from AlWo223/list","messageBody":"Implement commands for editing, deleting, viewing activities","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"9680fb5cbfc66a622ef25e63cedf0856b287cfbc","isMergeCommit":false,"messageTitle":"Write Junit tests for deleting activities","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":49,"deletions":0}}},{"hash":"b279d894da455e4a6b94b705d6dd10744d0cedfd","isMergeCommit":false,"messageTitle":"Write Test methods for adding activities","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":14,"deletions":2}}},{"hash":"c2b01c28c64ebb16539a46582f5d04b7f729da34","isMergeCommit":false,"messageTitle":"Add missing JavaDoc comments for activity related code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":132,"deletions":2}}},{"hash":"b6b1535a7bcd2c6bdf15a9cc298acf1b0f49b42c","isMergeCommit":false,"messageTitle":"Generate test cases for edit and list activity command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":130,"deletions":0}}}]},{"date":"2023-10-23","commitResults":[{"hash":"550788a79273863edfbd0f8809052bb24c8e02c4","isMergeCommit":false,"messageTitle":"Write missing Junit tests for all acitivty related classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":20},"test-code":{"insertions":335,"deletions":2}}},{"hash":"2195ac4fd6c71f4ecfe27489c2b0f22eb2b84e44","isMergeCommit":false,"messageTitle":"Enable autodelete of data file for text-ui-testing","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":5,"deletions":0}}},{"hash":"37582fa681a84a7d5aa7d3e41255e5a4a92f1a12","isMergeCommit":true,"messageTitle":"Merge master in branch Testing","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9871f65f832f963758acbe29ac6c8b5904d7360c","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":14}}},{"hash":"831e293292d3cf0c51525528fd7530a206d49513","isMergeCommit":false,"messageTitle":"Disable test cases conflicting with github gradle check","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":0}}},{"hash":"98b3818cc30ca4ed43fc5c68034a93e9d77d79ce","isMergeCommit":false,"messageTitle":"Prevent tracking of negative activity distances","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"56a616f86a1cb48aef2f767739f4a2428fa791e5","isMergeCommit":false,"messageTitle":"Add comment regarding negative distances to user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"d621d8d4c5a15b8ac3c9457cf8b4def6ea0aa31f","isMergeCommit":false,"messageTitle":"Use timeformatter for moving time input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":27},"test-code":{"insertions":31,"deletions":10}}},{"hash":"9959e8f67b0b37188a88e103aca82b4e03567533","isMergeCommit":false,"messageTitle":"add find by date search for activity list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":1},"test-code":{"insertions":39,"deletions":0}}},{"hash":"105eeae4f365faf9a1312945ffc8b5b96ee598bf","isMergeCommit":false,"messageTitle":"Sort activity list from latest to earliest by default","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"test-code":{"insertions":7,"deletions":0}}},{"hash":"2686de94641bf71f6ff3f213a40d0a53736517c8","isMergeCommit":false,"messageTitle":"add filtering of activities by timespan","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":0},"test-code":{"insertions":11,"deletions":0}}},{"hash":"4ff3cd3b0025934e34bc85d3bf47dcafb02150fc","isMergeCommit":false,"messageTitle":"modify add activity command name","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4},"docs":{"insertions":7,"deletions":7},"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-25","commitResults":[{"hash":"1da15e2c0b96a826b60d71297460cd46768cc9d7","isMergeCommit":false,"messageTitle":"Use locale english to format double output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"7cd215317542bbd6dd0b43b3ec1af0c58e0fad60","isMergeCommit":true,"messageTitle":"Merge pull request #91 from AlWo223/negdist","messageBody":"Prevent tracking of negative distances and adjust duration input format","fileTypesAndContributionMap":{}},{"hash":"ce187aa51bd3b58a1b0aec74ffdb97b9a43c892b","isMergeCommit":true,"messageTitle":"Merge pull request #92 from AlWo223/find_by_date","messageBody":"Implement find by date and timespan filtering of activities","fileTypesAndContributionMap":{}},{"hash":"533635c68a0112da3a3838a5fcf49e25db364e50","isMergeCommit":true,"messageTitle":"merge master in branch Testing","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cc50d03b97b24b9a32ef110df07c805c7fc1e6e2","isMergeCommit":true,"messageTitle":"Merge pull request #89 from AlWo223/Testing","messageBody":"Add test methods and ui-testing for Activity","fileTypesAndContributionMap":{}},{"hash":"ac20ad28feba557e4e7668a5468bfb600ab2de3c","isMergeCommit":false,"messageTitle":"implement calculation of target metric for activity list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":71,"deletions":4},"test-code":{"insertions":28,"deletions":0}}},{"hash":"4ea08a04b08b9fe775a171660e4bfeac8e988b03","isMergeCommit":false,"messageTitle":"Add functionality to compare data with target value","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":16},"test-code":{"insertions":11,"deletions":7}}}]},{"date":"2023-10-26","commitResults":[{"hash":"0c950ee69d2eb6d124192c72835408b83a310d62","isMergeCommit":false,"messageTitle":"Generate sequence diagram for adding activities","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":0}}},{"hash":"8e96dcbf3f9af061a789ec4b1dad170a31cbd0f4","isMergeCommit":false,"messageTitle":"Write first draft for addactivity developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":2}}},{"hash":"15e2f30a3379c5d2e9054e3deadfc38740d11e20","isMergeCommit":true,"messageTitle":"write junit tests for activity goal","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cdb7c5f1d6e714d8bbaff9b3723cbce11d070037","isMergeCommit":false,"messageTitle":"Add instructions for adding activity goal in UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":0}}}]},{"date":"2023-10-27","commitResults":[{"hash":"b070890414c3ad8f3e3622d77122e08a606bd525","isMergeCommit":false,"messageTitle":"Implement AddActivityGoalCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0},"test-code":{"insertions":4,"deletions":0}}},{"hash":"b79e876a8dc86ec33e2ac52361a86b044126441d","isMergeCommit":false,"messageTitle":"Finish implementation of AddActivityGoalCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":190,"deletions":12},"test-code":{"insertions":52,"deletions":2}}},{"hash":"a5bfabd66657e761197f2977b902d68075b69986","isMergeCommit":true,"messageTitle":"Merge reimplementation of abstrac goal class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7e89b97e31dc8caaf90a1b619de9603e307062e7","isMergeCommit":false,"messageTitle":"Write test methods for setting activity goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":2},"docs":{"insertions":3,"deletions":2},"test-code":{"insertions":105,"deletions":31}}},{"hash":"060eb948d66824055dc410e78c70e8263b7a5af4","isMergeCommit":false,"messageTitle":"adjust code to fulfill coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":9},"test-code":{"insertions":10,"deletions":8}}},{"hash":"d7fd2259698e1432750d2f26f1388ae6a84d842a","isMergeCommit":false,"messageTitle":"Adjust JavaDoc comment of checkDate","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"6390d8b4ffc0ad6a128b5dc9d6ac486aa5c4295a","isMergeCommit":false,"messageTitle":"Remove setTarget test","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"6f8c5f55ac07dbdd15f72a9ea87c352dafd0f092","isMergeCommit":true,"messageTitle":"Merge pull request #113 from AlWo223/ActivityGoal","messageBody":"Activity Goal functionality and add command","fileTypesAndContributionMap":{}}]}],"yicheng-toh":[{"date":"2023-10-05","commitResults":[{"hash":"6ef5fd0adac3dbc719b13dbf2b2ab713ac1be1ba","isMergeCommit":false,"messageTitle":"Add profile for yi cheng","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":5}}},{"hash":"9bd5f18d45380e4064736e7e2d522e4bb53d9eb2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"57a806539f9f12400c7873eb0848e0a808657e68","isMergeCommit":true,"messageTitle":"Merge pull request #2 from yicheng-toh/master","messageBody":"Add profile for yi cheng","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"00aa40a7cd4f49250b89e8da6e405912972f4f99","isMergeCommit":false,"messageTitle":"Adjust the format of the table to resolve warning from intellij","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"9db4478dbe4192b8579a7f29fb22b9c8e3ee12af","isMergeCommit":true,"messageTitle":"Merge pull request #13 from yicheng-toh/documents","messageBody":"Edit table format for AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"834e1ea90ff1c97a9b1cbaa7e4e8fb4d7abcc14b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a4d91b2113c0354343357ff8e7e7726363da2a1d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5b01105df5ebb31111aad46bddda02776f17e218","isMergeCommit":false,"messageTitle":"Add Diet Goal Class and Diet Goal List Class","messageBody":"Fixes #10\n","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":0},"test-code":{"insertions":102,"deletions":0}}},{"hash":"a6dc7e822f05482d9be899688800bc6c86e65a25","isMergeCommit":false,"messageTitle":"Add delete functionality to DietGoalList","messageBody":"Fixes #11\n","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":17,"deletions":2}}},{"hash":"75db1b825ac2cf0540f12079d025060c6bbfe19b","isMergeCommit":false,"messageTitle":"Revert \"Add delete functionality to DietGoalList\"","messageBody":"This reverts commit a6dc7e822f05482d9be899688800bc6c86e65a25.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"test-code":{"insertions":2,"deletions":17}}},{"hash":"833207c30435d8f92a6ee8b459efc0337403084e","isMergeCommit":false,"messageTitle":"Improve code quality to pass build test","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":16,"deletions":14}}}]},{"date":"2023-10-11","commitResults":[{"hash":"e485d117db0d7ff75bd58853df24311d78160ddc","isMergeCommit":false,"messageTitle":"Remove redundant newlines","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7},"test-code":{"insertions":0,"deletions":5}}},{"hash":"cf8a65f00e5865381818da68829aee12cb12788f","isMergeCommit":false,"messageTitle":"Revert \"Remove redundant newlines\"","messageBody":"This reverts commit e485d117db0d7ff75bd58853df24311d78160ddc.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0},"test-code":{"insertions":5,"deletions":0}}},{"hash":"5fe5f02580038a546be18b69df69a042fd547467","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Remove redundant newlines as suggested by skylee03\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"test-code":{"insertions":0,"deletions":4}}},{"hash":"35b51d3c961f239a69d6a7e2622813eb9fd764b1","isMergeCommit":true,"messageTitle":"Merge pull request #17 from yicheng-toh/goals","messageBody":"Add DietGoal Class and DietGoalList Class","fileTypesAndContributionMap":{}},{"hash":"f5ad0687c40da73186ba4e69b5915d22f4442099","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3bf1545451d3c35c883dee34f81203d2838e8d71","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d397c52103037b3417e7cfa08b4d3b3897030d55","isMergeCommit":false,"messageTitle":"Add delete function to DietGoalList Fixes #11","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":17,"deletions":0}}},{"hash":"4a11acbfc52340fe1ab7fbf087a0ff27c5c0bb74","isMergeCommit":false,"messageTitle":"Add edit feature for DietGoal","messageBody":"Fixes #12\n","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":0},"test-code":{"insertions":23,"deletions":0}}},{"hash":"a0f11a58c10e27d786fd91577fceb7fbd7c5692f","isMergeCommit":false,"messageTitle":"Add printing to DietGoalList","messageBody":"Fixes #9\n","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0},"test-code":{"insertions":8,"deletions":0}}}]},{"date":"2023-10-12","commitResults":[{"hash":"a39f610494cda3ed34f6101ab724f15467b13ac9","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Convert words to American spelling in accordance to code quality standard suggested by skylee03\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":4}}},{"hash":"7b4b871b1b5cd422c23aa3141172e92cc332358e","isMergeCommit":false,"messageTitle":"Edit variable name in accordance to code quality standards","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"40a393f46f1e028e0b0011bc7766631b2f53f5c3","isMergeCommit":false,"messageTitle":"Revert \"Edit variable name in accordance to code quality standards\"","messageBody":"This reverts commit 7b4b871b1b5cd422c23aa3141172e92cc332358e.\n","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"be38b2183bee45d85cc5db3ac78e038bb68c4bb5","isMergeCommit":false,"messageTitle":"Edit variable name in accordance to code quality standard","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"fbac222d5e7db32a386c4188c149b87070405c32","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into v1.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"464bd877f0fa5f195cd1c55468681926140a936e","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"7bb7071d03d906fb653225ec11f8fdc5d2c015b7","isMergeCommit":true,"messageTitle":"Merge pull request #18 from yicheng-toh/goals","messageBody":"Edit, List and Delete feature added to DietGoalList","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"210ec3b65836832798397065349dd6b6125b04a2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7fc15d856584c273d1ddd02ef20e6fc945c0b877","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"6e6acaa0b85747d95506e6f167879f07be6c3463","isMergeCommit":false,"messageTitle":"Add set diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":147,"deletions":16}}},{"hash":"1819c00c7b91e021c5a2f6835fa77ef2171e9391","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f260c0f6c97f51cd7d8f08a8088c112738d98b35","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"# Conflicts:\n#\tsrc/main/java/athleticli/ui/CommandName.java\n#\tsrc/main/java/athleticli/ui/Message.java\n#\tsrc/main/java/athleticli/ui/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"265a4ceda6601735b2a77ef0267b41f97882f52c","isMergeCommit":false,"messageTitle":"Add javadoc comment for set new diet goal command and related functions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":3}}},{"hash":"b92037b2a0b42ad19711a90845b07cdd3362e004","isMergeCommit":false,"messageTitle":"Add tests for set diet goals","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":8},"test-code":{"insertions":41,"deletions":0}}},{"hash":"9084bae7158b73dfbb3f0a619f6aebe369b56538","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"07f523f4003ceae8db86a2d1b17802b2e8ac81c1","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":7},"test-code":{"insertions":1,"deletions":1}}},{"hash":"8de8cc401abb5d08d84b2bb26252515296bf1f76","isMergeCommit":false,"messageTitle":"Improve code quality as suggested by skylee","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":9},"test-code":{"insertions":7,"deletions":10}}},{"hash":"53dbb39f2e5973f2db0ba853bd36857f40950cf4","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"# Conflicts:\n#\tsrc/test/java/athleticli/ui/ParserTest.java\n","fileTypesAndContributionMap":{}},{"hash":"5497a736bb9ba3e81465ba6cd402dd6e440488a3","isMergeCommit":false,"messageTitle":"Remove bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"6c48bb7583eb068f7da773feb5f87971a8a7246e","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"from dylan and skylee\n\nCo-authored-by: DaDevChia \u003c88506363+DaDevChia@users.noreply.github.com\u003e\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":26}}},{"hash":"f9402e37c285cc3353c372f24a72a921c52e9dff","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"860d0f714dc99262be545f5fcdca7b8b5a7257d5","isMergeCommit":false,"messageTitle":"Remove bugs generated from review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":22}}},{"hash":"92a226e49532f19b23d888ac1819aaae9db6e453","isMergeCommit":true,"messageTitle":"Merge pull request #35 from yicheng-toh/goals","messageBody":"Add logic for setting diet goals","fileTypesAndContributionMap":{}},{"hash":"aad918a5a820574a24ac760f5e96adc0bd96eaef","isMergeCommit":false,"messageTitle":"Add set diet goal tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":78,"deletions":0}}},{"hash":"8ca8855c2425074d46c5d30c3f295e2eb2b11755","isMergeCommit":false,"messageTitle":"Add edit feature for diet goals","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":59,"deletions":5},"test-code":{"insertions":87,"deletions":1}}},{"hash":"14fa302c8df0c16f18f22083f998f63e76d21804","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fd2680282a51c3b9c969b2701d259479d0fdd064","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"42ef388db1c0eb831020d8ecf8f7bb7cea34004d","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"9e01b4dd470e2d983b1dcc1c19c6fcbf6977720b","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":4,"deletions":2}}},{"hash":"d6275c5592af89a77ab748f575a41fafe9df4d81","isMergeCommit":false,"messageTitle":"Update EditDietGoalCommandTest.java","messageBody":"Change assert (false) to fail (e)","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":3}}},{"hash":"74de6f6f59717b4cbff9c03279c74562f4550fb9","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Co-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"e79340716e4d73ac351d269ef36416455620b8a4","isMergeCommit":false,"messageTitle":"Update SetDietGoalCommandTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":3}}},{"hash":"5120ea5fc744ce8ccd56029ae6b4e62d2fa39720","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"325a3842beb9c49bbd1abcd5e58f0db615f1d475","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"4b8e30379d7bfac5327aa2e8a689f81e3586dd4a","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/goals\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"38165ec30b062bbee2c2182885be2fc9670b6404","isMergeCommit":false,"messageTitle":"Add list functionality for goals","messageBody":"Fixes #36\n","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":12},"test-code":{"insertions":6,"deletions":4}}},{"hash":"560c41fa157e1c13d3422ba8d005839182f3a529","isMergeCommit":false,"messageTitle":"Revert \"Add list functionality for goals\"","messageBody":"This reverts commit 38165ec30b062bbee2c2182885be2fc9670b6404.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":21},"test-code":{"insertions":4,"deletions":6}}},{"hash":"007f353277c407c23e42689c66846d94f357d711","isMergeCommit":false,"messageTitle":"Revert \"Revert \"Add list functionality for goals\"\"","messageBody":"This reverts commit 560c41fa157e1c13d3422ba8d005839182f3a529.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":12},"test-code":{"insertions":6,"deletions":4}}},{"hash":"bdb4c7ef4c849129a02e24708f4ea7010d658184","isMergeCommit":false,"messageTitle":"Improve code quality as recommended by gradle check","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"3df9060f6f3b4bede451bf9673c60126c2c0d42f","isMergeCommit":false,"messageTitle":"Add list feature and test for diet goals","messageBody":"Fixes #36\n","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":0},"test-code":{"insertions":49,"deletions":0}}},{"hash":"f0c393023640b78601c91c27f90e64fb1be69534","isMergeCommit":true,"messageTitle":"Merge pull request #39 from yicheng-toh/goals","messageBody":"Add logic for edit and list feature for diet goals","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"55bfdce7ca33e0c2d0d7150be776808b39d2ca69","isMergeCommit":false,"messageTitle":"Add delete feature to diet goals","messageBody":"Fixes #47\n","fileTypesAndContributionMap":{"functional-code":{"insertions":56,"deletions":8},"test-code":{"insertions":50,"deletions":0}}},{"hash":"475f260240108ff3e67de71e89b62a50d3e6fc25","isMergeCommit":false,"messageTitle":"Add javaDoc for delete diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":4}}},{"hash":"21c9700f10693d22dee1ca6b3327feaaa48847cd","isMergeCommit":false,"messageTitle":"Improve code quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"86894b29e040a086c478b5ba17922387c6c27336","isMergeCommit":false,"messageTitle":"Remove bugs pointed out by gradle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"b97bfd626d44cdc53e734cff74a58ff6650bf2fa","isMergeCommit":false,"messageTitle":"Address bugs pointed by gradle check","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"d73c39a8cc37866eb2e25f3b63db45c692284ee5","isMergeCommit":false,"messageTitle":"Address bugs pointed out by gradle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":2}}},{"hash":"c4990ef5c5edfe5288cdbf7bf2d0f286aa0dd961","isMergeCommit":false,"messageTitle":"Add assertion and logging for delete diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":0}}},{"hash":"8e8d5eb84a2dbbcfa3d1cd2f66d052ddf5fdcd7c","isMergeCommit":false,"messageTitle":"Correct the logic for the use of assert for delete diet goal command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"0626b32e5e8a590d0263836b1fed44e4c0eb0292","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"135345773cb5f1df502c0d56bce68f51586e92fc","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"As suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"de1897900d894a13f7db59b6daf6ea3081ef3dda","isMergeCommit":false,"messageTitle":"Add logger manager as suggested from review","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}},{"hash":"e8ac4eeafc3f90b4831c5e8d6619408afc83318a","isMergeCommit":true,"messageTitle":"Merge branch \u0027goals\u0027 of https://github.com/yicheng-toh/tp into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fe7ba04b1ef4956261e8846d72ad6b3311ed6ea1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"89accd50f5d41aec4b2b736ba4a307a6c9cdbccc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"c80e15d1671c5a2df29bcce43f8f50b71959368d","isMergeCommit":true,"messageTitle":"Merge pull request #48 from yicheng-toh/goals","messageBody":"Add logic to delete feature for diet goals","fileTypesAndContributionMap":{}},{"hash":"5b8de0f5491f57d04390013b749cfd7de581539e","isMergeCommit":false,"messageTitle":"Remove small bugs for diet goals parser and UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"b7517f37d328db94e3fea66f6a79b1f89e6306f1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"04fa3b597b79559670080a0adacabf5e70830e9d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"097eb979c0f4b6e8a516a3305d12ff79ada4cdbc","isMergeCommit":false,"messageTitle":"Edit tests to suit change in diet goal UI","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":4}}},{"hash":"a1d40b4527fa202c0f0c512e745f00688c4c2156","isMergeCommit":true,"messageTitle":"Merge pull request #60 from yicheng-toh/goals","messageBody":"Resolve UI bugs for diet goals","fileTypesAndContributionMap":{}},{"hash":"6b6615695e8efb333c505354cb0afd26b8a15c58","isMergeCommit":false,"messageTitle":"Add user guide for diet goals","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":133,"deletions":0}}},{"hash":"0d40e04e993615928bad76e6d9cb141a4950c1d1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"15c1ef7c78934369dff8add9d6d205a5bca275cc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"cfcf09fcc76cd212521658db26e837efbae18b99","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"Standardisation of nutrients name.\n\nCo-authored-by: nihalzp \u003c81457724+nihalzp@users.noreply.github.com\u003e","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-22","commitResults":[{"hash":"f3952eacf1f02bde21661454462f27977da36a0e","isMergeCommit":true,"messageTitle":"Merge pull request #67 from yicheng-toh/goals","messageBody":"Add user guide for diet goals","fileTypesAndContributionMap":{}},{"hash":"c3cf1d210ffb57e8afd4f4410734128dcfa1eaad","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2cedf33acacb6375a8eb96318a82e9858c0e4d14","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into goals","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"148527f78ce0d1854d51ceafb69c1cca1c544f08","isMergeCommit":false,"messageTitle":"Enable assertions when running AthletiCLI","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"4317cc604503258b97ab92e712a4a93a693295a1","isMergeCommit":false,"messageTitle":"Resolve bugs arising from set and edit diet goal command","messageBody":"Fixes #52, #53\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":1}}},{"hash":"3ff13bdb978ea8eb77d520c26c3b8ffdae2379d0","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"94d3e74d658af2c79e0f1efafac1e2767585bbcc","isMergeCommit":true,"messageTitle":"Merge pull request #81 from yicheng-toh/v2.0","messageBody":"Bug fixes for diet goals","fileTypesAndContributionMap":{}},{"hash":"91b84f18b59ea71ce90fca62ecce202043fe1827","isMergeCommit":false,"messageTitle":"Add nutrient verifier class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":12},"test-code":{"insertions":18,"deletions":13}}},{"hash":"bde1fc1aa20fe496200a5b981f495294496cf17b","isMergeCommit":true,"messageTitle":"Merge branch \u0027v2.0\u0027 of https://github.com/yicheng-toh/tp into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e8b121a47571b5876785a3e5ec61e78e2de1d3c6","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"564734d174060980d564fa1db7170d0b1a607503","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e93bd0a55ed69f0a04ac1fdca0f2598197053543","isMergeCommit":false,"messageTitle":"Apply suggestions from code review","messageBody":"as suggested by skylee\n\nCo-authored-by: Yang Ming-Tian \u003c1178715749@qq.com\u003e","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":6}}},{"hash":"4390ac41677bf685e92ec91c085328f1e56b4f90","isMergeCommit":true,"messageTitle":"Merge branch \u0027v2.0\u0027 of https://github.com/yicheng-toh/tp into v2.0","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8da238ac5424b33ab2fed7e24815e260a3b62f79","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"a1261976be0afd2475931767edf5977cfc9ef876","isMergeCommit":true,"messageTitle":"Merge pull request #83 from yicheng-toh/v2.0","messageBody":"Add nutrient verifier class ","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"0073e679dd94d81932af308ccf2b525f5717ad7d","isMergeCommit":false,"messageTitle":"Add tests for diet goal and diet goal parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":9},"test-code":{"insertions":83,"deletions":44}}},{"hash":"8168c69bb23fd3ab242b30fda1f356df043bc346","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"075abf178d86f7bfc9cad32876d3eaae946d5ec9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"e4a004f8366d44a9ce8d7cc48b3536497fa43c2f","isMergeCommit":false,"messageTitle":"Add diet goals to developers guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":95,"deletions":4}}},{"hash":"0fb7b737653eddf2d4dcd7276179878a6ddefe5f","isMergeCommit":true,"messageTitle":"Merge pull request #90 from yicheng-toh/v2.0","messageBody":"Add tests for diet goal and diet goal parser","fileTypesAndContributionMap":{}},{"hash":"1424e1cc60dee61ce9ff627a15fbb617c6ec33f3","isMergeCommit":false,"messageTitle":"Add diet goals to text ui test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}}]},{"date":"2023-10-25","commitResults":[{"hash":"6571556b1108e08fe2eb70c53b5553370fdd8d0e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"bf0fa992b3f8e3a05d016e933320999919a99592","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into v2.0","messageBody":"# Conflicts:\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"5eac6f50eda525e2c4a6ab8c1c2db884ada9a722","isMergeCommit":false,"messageTitle":"Remove grammatical error","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"a8b9c18517348c5d1e2253f8c5633c0bad935ce5","isMergeCommit":true,"messageTitle":"Merge pull request #94 from yicheng-toh/v2.0","messageBody":"Add diet goals to text ui test","fileTypesAndContributionMap":{}}]}],"nihalzp":[{"date":"2023-10-05","commitResults":[{"hash":"5333d4cf1c8a9b0ea1a9ec084892c14dea7d53b2","isMergeCommit":false,"messageTitle":"Add individual info","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"a705a999b30431c68e39f5b0167f9b66b89debaf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into nihalzp-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ca99d34683f1a8b4ffdca5fa6dbfdf33eb4e6afb","isMergeCommit":true,"messageTitle":"Merge pull request #3 from nihalzp/nihalzp-AboutUs","messageBody":"Add Individual Info - nihalzp","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"88c9014401be33db3f1415d271d1e6abc593324c","isMergeCommit":false,"messageTitle":"Relocate diet goals files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":108}}}]},{"date":"2023-10-14","commitResults":[{"hash":"c977c9aed16f59a17ccb9512d30c061de27a153a","isMergeCommit":false,"messageTitle":"Use ArrayList inheritance for DietGoalList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":23}}},{"hash":"020e4dbefe29062a29b5f8e2eb7e86e20daa3f11","isMergeCommit":false,"messageTitle":"Add JavaDoc comments for diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":63,"deletions":5}}},{"hash":"d8ff94defc829ff2c17be79015165643874ae29d","isMergeCommit":false,"messageTitle":"Use diet instead of meal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3},"other":{"insertions":2,"deletions":2}}},{"hash":"73b7b8ab849eafc755f1903712899e7559f9a8db","isMergeCommit":false,"messageTitle":"Update diet goals test paths","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":22,"deletions":23}}},{"hash":"403cd565a953c696900f240c4c3d250dc81b0aff","isMergeCommit":false,"messageTitle":"Rename meals to diets in Data class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"ead04ae4847fba3c551ac2545117e7225fc7a7a0","isMergeCommit":false,"messageTitle":"Implement Diet class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":104,"deletions":0}}},{"hash":"750a58d6d163985c90f67dae37df9bf6ebcb3e60","isMergeCommit":false,"messageTitle":"Update doc string in diet goal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":1}}},{"hash":"f48538ce055185165435ec50881e37e26220e28b","isMergeCommit":false,"messageTitle":"Implement DietList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":0}}},{"hash":"f9175487993b5ec115a2afa01d38d319e9a86cee","isMergeCommit":false,"messageTitle":"Add DietTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":69,"deletions":0}}},{"hash":"bd3307495eb8061d5b98192d99304d969ad94548","isMergeCommit":false,"messageTitle":"Add DietListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":97,"deletions":0}}},{"hash":"41f96d52d3dd4b7f0319f83559ca6b09a27929e5","isMergeCommit":false,"messageTitle":"Refactor DietGoalListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":14}}},{"hash":"da06f350e71926f9a0ce37d2a7f6701e5ae45f18","isMergeCommit":false,"messageTitle":"End file with new line","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"942346561f3ee347e60d3d95ed802307cdc462f2","isMergeCommit":false,"messageTitle":"Simplify logic in DietGoal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"24faa7a7468bfc3c3cc48ecfec34c6716c9da92f","isMergeCommit":false,"messageTitle":"Remove redundant blank lines","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"308d4471b8aaf54fdf59de6692b67e8a2a9e2c17","isMergeCommit":true,"messageTitle":"Merge pull request #20 from nihalzp/diet","messageBody":"Add and Refactor Diet","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"f019f39e5bfa0166876bc7e860a08c729d4911be","isMergeCommit":false,"messageTitle":"Rename meal to diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":12}}},{"hash":"6024bdace6ecb11f50c0871bd9a4b3682a83057a","isMergeCommit":false,"messageTitle":"Add AddDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"a5b6a6729ae36ee4aca74da6255acd9e24a33126","isMergeCommit":false,"messageTitle":"Add DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":0}}},{"hash":"53b2e8767c47560746212606d5eedc92453abe44","isMergeCommit":false,"messageTitle":"Add ListDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":0}}},{"hash":"52fcad706d32a863171d058b0cb5231045833d4b","isMergeCommit":false,"messageTitle":"Add new line in diet and diet goal list toString","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"f0e98e4485fa746bc0a6fd97de9a427f5e962f80","isMergeCommit":false,"messageTitle":"Add diet command names","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1}}},{"hash":"ec94df1485d57806adf02878b43a045c73efd94c","isMergeCommit":false,"messageTitle":"Add diet specific message strings","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":15}}},{"hash":"c5b661267550c84a842d366f967a635e8942f7ea","isMergeCommit":false,"messageTitle":"Implement parsers for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":217,"deletions":27}}},{"hash":"1b744ec76329f10942f730964626ba261a75a73c","isMergeCommit":false,"messageTitle":"Add tests for AddDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":39,"deletions":0}}},{"hash":"8741c43909a7d7bb3fe8996cdcf9aa800369abf3","isMergeCommit":false,"messageTitle":"Add tests for DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":53,"deletions":0}}},{"hash":"3807da90bac12694e9cd92296769b232f3add879","isMergeCommit":false,"messageTitle":"Add tests for ListDietCommand","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":39,"deletions":0}}},{"hash":"ed9e42c52a404ed0352e1c628b7f67a2f30e5005","isMergeCommit":false,"messageTitle":"Update tests for DietList","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}},{"hash":"bd0136d0adfd32f2a41c64317c3bc71838387800","isMergeCommit":false,"messageTitle":"Add parser tests for diet","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":113,"deletions":10}}},{"hash":"59c9075387f54f1f3f4f6c63f7642bc5e5a162c3","isMergeCommit":false,"messageTitle":"Add diet guide in docs/readme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":42,"deletions":1}}},{"hash":"14e3ee42cc76c89d4bc0798b127a4014cb78553a","isMergeCommit":false,"messageTitle":"Delete trailing space","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"3c39bbc0af962d145c718b68c3fcbcfabbb88688","isMergeCommit":false,"messageTitle":"Fix JavaDoc comments indentation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":16}}},{"hash":"fd90dd4a778d3fb1d85d7b10df36a48cd23a2fa6","isMergeCommit":false,"messageTitle":"Rename unit test func names","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":17,"deletions":17}}},{"hash":"c4d473794e6bdd31901379ef755f369fbb5e4c66","isMergeCommit":false,"messageTitle":"Fix array initialization indentation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"8221d356f374da5947b48eb9f554b0792dbd8c02","isMergeCommit":false,"messageTitle":"Fix formatting issue in readme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":26,"deletions":9}}},{"hash":"4d38e16e4263892d35bfc181789cb6d6c1155054","isMergeCommit":false,"messageTitle":"Refactor delete diet command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"5e73492dc594864ff26e59d2383f52f5ee46ab4d","isMergeCommit":true,"messageTitle":"Merge pull request #31 from nihalzp/diet-parser","messageBody":"Diet parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"8c8189cec6c3badcb1166699f4393be4585477cd","isMergeCommit":false,"messageTitle":"Fix diet commands and formatting","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":26}}},{"hash":"582f99799f073c326bef887656e215eb02fb78d9","isMergeCommit":false,"messageTitle":"Fix message for carb missing","messageBody":"","tags":["v1.0-Release"],"fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3132eb598029e7f51223d00284e77d6ad8feef03","isMergeCommit":true,"messageTitle":"Merge pull request #66 from nihalzp/fix-user-guide","messageBody":"Fix User Guide for Diet and Reformat","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"6ed6200b87c5bffeabc1c24c8b443f98fec292c0","isMergeCommit":false,"messageTitle":"Use Parameter class for diet parameters","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":13}}},{"hash":"0f40b8834b9b1a9e4650180f4938c58d051dd68d","isMergeCommit":false,"messageTitle":"Add time tracking for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":162,"deletions":89}}},{"hash":"4abbcbe41c65853a869e8f6d8378ba6f52e13eca","isMergeCommit":false,"messageTitle":"Fix tests for diet commands","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":12,"deletions":3}}},{"hash":"eca691f3ab86b67edb48d70e15eb751d4277996c","isMergeCommit":false,"messageTitle":"Fix tests for diet parsers","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":65,"deletions":36}}},{"hash":"0fa31da6f9619119c3019d4adea72a9f33597cc3","isMergeCommit":false,"messageTitle":"Fix tests for diet classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":36,"deletions":15}}},{"hash":"d8cfe5bfd34245d1a72213fd5f952648183ec66c","isMergeCommit":false,"messageTitle":"Update message MESSAGE_DIET_INDEX_TYPE_INVALID","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"cd9b257c3fc7f20d503026f8c67e3231a9e66003","isMergeCommit":false,"messageTitle":"Add assertions in Diet class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"eee010dce17b6f224f8a909a60d8f681713c2bca","isMergeCommit":false,"messageTitle":"More input validation in Parser class for diet","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":3}}},{"hash":"02568aabc0b34b1f6c28dde8644704ae18d51054","isMergeCommit":false,"messageTitle":"Add index assertion in DeleteDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"e3595890c2588e040028fddd22a1091522c7aa40","isMergeCommit":false,"messageTitle":"Add more tests for diet parsers","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":281,"deletions":22}}},{"hash":"aacdf1b2545d69e5a1792692558a9042dd00d0ee","isMergeCommit":false,"messageTitle":"Update add-diet help message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"bef5447ef3d7c7f8f6db129515039e1b54aab108","isMergeCommit":false,"messageTitle":"Implement find-diet functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"358ed8984bdf10e3bf17c8964519afb0e3383669","isMergeCommit":false,"messageTitle":"Update parseDate function message and add tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":22,"deletions":0}}},{"hash":"20c228e6549a04b46f7288b0cbf379b05b25c507","isMergeCommit":false,"messageTitle":"Add class description for FindDietCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"1ff09d52277e1533f927db45e3809eb478f4795f","isMergeCommit":false,"messageTitle":"Update the user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":2}}},{"hash":"081518a3e098a3be3a1ce114b74f8613b65b2fd5","isMergeCommit":false,"messageTitle":"Fix javadoc position","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"c156515369529f8434a1ff5802ef24c7352fa188","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into diet-time-tracking","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"66581411b947e2128990dbc7e8842c8f173230e3","isMergeCommit":false,"messageTitle":"Make datetime and date invalid message generic","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-26","commitResults":[{"hash":"e5496f639d77099a14a821d6b56703e4a27403c3","isMergeCommit":true,"messageTitle":"Merge pull request #102 from nihalzp/diet-time-tracking","messageBody":"Diet time tracking + find-diet","fileTypesAndContributionMap":{}},{"hash":"ea4303cfaeeebf080fad8b14dcf449d26498d38e","isMergeCommit":false,"messageTitle":"Implement edit-diet command and tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":76,"deletions":0},"test-code":{"insertions":164,"deletions":0}}},{"hash":"213ee0e65b536d7aa87951784bb4c273299c559e","isMergeCommit":false,"messageTitle":"Implement the edit-diet functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":6},"test-code":{"insertions":64,"deletions":2}}},{"hash":"60064b98d49fa5f7466495f3a0428250fdb52003","isMergeCommit":false,"messageTitle":"Update the userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":40}}},{"hash":"488c90ca391eee2676bb1a5c029550c0ce0f444f","isMergeCommit":false,"messageTitle":"Update javadoc comments","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8}}},{"hash":"af978412476f2640e94b2ec5a3e04c6546ca9a30","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027 into diet-edit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"80a2b59c9231ce13b5b49f59d2519876eb646343","isMergeCommit":false,"messageTitle":"Use assertArrayEquals instead of assertEquals","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":22}}},{"hash":"db168593db10286bb1470ebfd6d97f12f8dfdfc7","isMergeCommit":true,"messageTitle":"Merge pull request #106 from nihalzp/diet-edit","messageBody":"Diet Edit Feature","fileTypesAndContributionMap":{}},{"hash":"b75c496ed9a516cabb66372a50244503e91d9a27","isMergeCommit":false,"messageTitle":"Add implementation and user stories diet DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":8}}},{"hash":"8ba22bca40a143b34b68d09dfec613e25087b334","isMergeCommit":true,"messageTitle":"Merge pull request #107 from nihalzp/developer-guide","messageBody":"Developer Guide for Diet","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"skylee03":{"docs":384,"functional-code":1241,"test-code":30,"other":4},"DaDevChia":{"docs":112,"functional-code":478,"test-code":400},"AlWo223":{"docs":195,"functional-code":1401,"test-code":1064,"other":5},"yicheng-toh":{"docs":225,"functional-code":363,"test-code":460,"other":1},"nihalzp":{"docs":160,"functional-code":944,"test-code":1013}},"authorContributionVariance":{"skylee03":38478.28,"DaDevChia":17541.574,"AlWo223":40440.93,"yicheng-toh":14410.145,"nihalzp":48740.594},"authorDisplayNameMap":{"skylee03":"CS2113-T17-1 YANG..TIAN","DaDevChia":"CS2113-T17-1 DYLA..TIAN","AlWo223":"CS2113-T17-1 WOLT..LIUS","yicheng-toh":"CS2113-T17-1 TOH ..HENG","nihalzp":"CS2113-T17-1 NIHA..IAJI"}} diff --git a/AY2324S1-CS2113-T17-3_tp_master/authorship.json b/AY2324S1-CS2113-T17-3_tp_master/authorship.json index 28448df..886dcf3 100644 --- a/AY2324S1-CS2113-T17-3_tp_master/authorship.json +++ b/AY2324S1-CS2113-T17-3_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" mainClass.set(\"seedu.stocker.Stocker\")","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" archiveBaseName.set(\"stocker\")","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"martinschnder":2,"TeoHaoZhi":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"|-----------------------------|:----------------:|:------------------------------------------:|:--------------------------------:|","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"| ![](team/Martin.jpeg) | Martin Schneider | [Github](https://github.com/martinschnder) | [Portfolio](docs/team/Martin.md) |","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"| ![](team/Karishma.png) | Karishma | [Github](https://github.com/karishma-t) | [Portfolio](team/karishma.md) |","lastModifiedDate":"2023-10-06"},{"lineNumber":7,"author":{"gitId":"karishma-t"},"content":"| ![](team/Barbara_image.JPG) | Barbara Chong | [Github](https://github.com/barbaracwx) | [Portfolio](team/Barbara.md) |","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"| ![](team/HaoZhi.png) | Teo Hao Zhi | [Github](https://github.com/TeoHaoZhi) | [Portfolio](team/HaoZhi.md) |","lastModifiedDate":"2023-10-06"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":"| ![](team/Azfarul.JPG) | Azfarul Matin | [Github](https://github.com/azfarulmatin) | [Portfolio](team/Azfarul.md) |","lastModifiedDate":"2023-10-07"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"karishma-t":1,"martinschnder":1,"azfarulmatin":2,"TeoHaoZhi":5,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"1. Reference to AB-3 Developer Guide","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"- [Source](https://se-education.org/addressbook-level3/DeveloperGuide.html#proposed-undoredo-feature)","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"- Used as template to structure this Developer Guide","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"\u003cimg src\u003d\"UML Diagrams/Architecture_Diagram.png\" width\u003d\"280\"\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"The architecture diagram given above explains the high level design of the application. The diagram depicts the key","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"component of the application that enables it to provide its functionalities.","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"Majority of the app\u0027s work is done by the following components","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"- Login System : Handles user authentication before enabling app usage","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"- Ui : Asks for user input by handling output messages","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"- Parser : Makes sense of user input","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"- Commands : List of various commands","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"- CommandResult : Execution of various commands","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"The section below will explain in more detail the design considerations, implementations and rationale of the various","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"components listed above.","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"### Login System Component","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"The login system component seeks to authenticate and login existing users or register a new user.","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"#### Design considerations","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"- There must be a way to check and verify users with a master list","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":"- The search for existing users username and password must be fast","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":"- Master list must be stored separately on hard drive of machine","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"#### Implementation and rationale","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"The login system class works in the following way. Upon booting up the application, a txt file","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"containing a current list of existing users will be loaded into a users attribute within the class in the form of a hash","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"table.When a user attempts to login to their account, the entered username and password is checked against","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"the current list of users in the hashtable. If the username and password matches, the user is logged in.","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":"As for registering new users, newly inputted username and password will be saved to the users attribute and this","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":"pair of username and password is then appended to the txt file containing current users. The updated user list will be","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"loaded into the users attribute when the application is booted up again.","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"The login system class uses the below methods to achieve its functionality","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":"- `authenticateUserChoice()` -Decides whether the user chooses to register or login","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":"- `newUserCreator()` -Creates a new user for future login","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":"- `loginExistingUser()` -Login existing user","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":"- `loadExistingUsers()` -Load existing users into hashtable for reference","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":"Given below is an example of how the login system class works.","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"When the user first launches the programme, the Stocker object will be instantiated. The object will","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":"invoke its own `run()` method which will call its own `start()` method. The Stocker object then instantiates a","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":"new UI object which displays the login message by invoking `showLoginMessage()` method. At this point, Stocker object","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":"will also instantiate a new login system object.","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"The login system object will invoke its own `run()` method to begin the login process. This method begins by loading","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":"existing users into the users attribute of the login system class by `loadExistingusers()` method. it then invokes","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":"`authenticateUserChoice()` to receive an input from the user to whether register or login a user. Based on the input of","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":"the user, either `newUserCreator()` is launched or `loginExistingUser()` methods will be called to register or login a","lastModifiedDate":"2023-10-21"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":"user.","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":"The following sequence diagram shows how the login system class works when the program is launched.","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"\u003cimg src\u003d\"UML Diagrams/StockerToLoginSystem.png\" width\u003d\"280\"\u003e","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"martinschnder"},"content":"### Main data structures","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":"#### Implementation","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"##### Drug","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"martinschnder"},"content":"The Drug class is very basic class for now. It only contains the product name as well as it\u0027s expiry date, but we will soon add some new properties such as product description, etc...","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"martinschnder"},"content":"##### Inventory","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"martinschnder"},"content":"The Inventory class is used to keep track of the quantity of product in stock. The hash map seemed to be the most appropriate data structure to match a product id to a quantity and a product entity which are encapsulated in a \"StockEntry\" class.","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"martinschnder"},"content":"##### Cart","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"martinschnder"},"content":"The Cart class is used to represent an ongoing transaction : to perform a sale, the vendor can add different products with their respective quantities in a cart which will be deducted from the inventory at the checkout.","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"martinschnder"},"content":"To represent this, we chose to use an arraylist of \"CartEntry\" classes which reprensent a product/quantity tuple.","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":"##### SalesList","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":"The SalesList is used to represent every past sales in order to create some statistics and reports. This class is only a list of subclasses representing validated carts.","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"martinschnder"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"Barbaracwx"},"content":"## Commands","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"Barbaracwx"},"content":"## 1. Find Function","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function is designed to enable users to search for specific drugs in the inventory using either the drug\u0027s","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"Barbaracwx"},"content":"name or the drugs expiry date. This component assists in locating and retrieving relevant drugs efficiently.","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"Barbaracwx"},"content":"**Design Considerations**","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"Barbaracwx"},"content":"The design of the \"Find\" function takes into account the following considerations:","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"Barbaracwx"},"content":"1. **Search Criteria:** The function must provide users with the ability to specify each criteria, such as keywords or","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"Barbaracwx"},"content":" attributes, to filter the items they are looking for.","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"Barbaracwx"},"content":"2. **Search Speed:** To enhance user experience, the search process should be fast and responsive, ensuring that users","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"Barbaracwx"},"content":" receive search results quickly.","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"Barbaracwx"},"content":"**Implementation and Rationale**","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function is implemented as follows:","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"Barbaracwx"},"content":"- **User-Defined Search Criteria:** Users provide search criteria, such as keywords, to define what they","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"Barbaracwx"},"content":" are looking for. The \"Find\" function processes these criteria to locate relevant items.","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"Barbaracwx"},"content":"- **Search Algorithm:** A robust search algorithm is employed to efficiently scan through the list of items and identify","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"Barbaracwx"},"content":" those","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"Barbaracwx"},"content":" that match the specified criteria.","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"Barbaracwx"},"content":"- **Result Presentation:** The function displays the search results, presenting users with a list of items that meet the","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"Barbaracwx"},"content":" search criteria, allowing them to quickly identify the items they are interested in.","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"Barbaracwx"},"content":"- **User-Friendly Interface:** The \"Find\" function is integrated into the user interface, making it easily accessible","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"Barbaracwx"},"content":" and intuitive for users to perform searches.","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"Barbaracwx"},"content":"- **Alternative Consideration:** During the design process, alternative approaches to searching are evaluated to ensure","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"Barbaracwx"},"content":" the","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"Barbaracwx"},"content":" most effective and user-friendly method is implemented.","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":142,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function offers a valuable way for users to narrow down their searches, find specific items of interest, and","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"Barbaracwx"},"content":"enhance the usability of the application.","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"Barbaracwx"},"content":"**Function Methods**","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":147,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-25"},{"lineNumber":148,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":149,"author":{"gitId":"Barbaracwx"},"content":"- `execute()` - This method is responsible for executing the \"Find\" command, searching for drugs that match the","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"Barbaracwx"},"content":" user-specified keyword within the inventory.","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"Barbaracwx"},"content":"- It returns a `CommandResult` containing the outcome of the command execution,","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"Barbaracwx"},"content":" which includes a success message and a list of found StockEntry objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"Barbaracwx"},"content":"**Example Usage**","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"Barbaracwx"},"content":"To illustrate how the \"Find\" function works, consider the following example usage:","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"Barbaracwx"},"content":"1. **User Input:** The user initiates the \"Find\" command by typing something like the following:","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"Barbaracwx"},"content":"`find /n panadol` - This command instructs the program to search for drugs in the inventory based on the name criteria","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"Barbaracwx"},"content":"and the keyword \"panadol.\"","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"Barbaracwx"},"content":"`find /d 12/03/2026` - This command instructs the program to search for drugs in the inventory based on the expiry date","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"Barbaracwx"},"content":"criteria and the keyword \"12/03/2026.\"","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"Barbaracwx"},"content":"2. **Method Execution:** The `execute()` method within the \"FindCommand\" class is called. It takes the provided keyword","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"Barbaracwx"},"content":" and criterion as input.","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"Barbaracwx"},"content":"3. **Search Process:** The method processes the search by iterating through the list of `StockEntry` objects in the","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"Barbaracwx"},"content":" inventory.","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"Barbaracwx"},"content":" For each entry, it checks if the `matches` method returns `true`, which means that the drug name or expiry date","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"Barbaracwx"},"content":" contains the given keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"Barbaracwx"},"content":"4. **Building Results:** As matching entries are found, they are added to a list called `foundEntries`.","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"Barbaracwx"},"content":"5. **Result Display:** The `CommandResult` is prepared, containing a success message (e.g., \"Listed all drugs with the","lastModifiedDate":"2023-10-25"},{"lineNumber":175,"author":{"gitId":"Barbaracwx"},"content":" keyword","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"Barbaracwx"},"content":" in the inventory.\") and the list of found `StockEntry` objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"Barbaracwx"},"content":"6. `User Feedback:` The result is then displayed to the user, showing a list of drugs in the inventory that match the","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"Barbaracwx"},"content":" specified keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"Barbaracwx"},"content":"The following sequence diagram shows how the Find Command function works. ","lastModifiedDate":"2023-10-25"},{"lineNumber":181,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"Barbaracwx"},"content":"\u003cimg src\u003d\"UML Diagrams/FindCommandDiagram.png\" width\u003d\"350\"\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"Barbaracwx"},"content":"Architecture Diagram of find command function:","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"Barbaracwx"},"content":"\u003cimg src\u003d\"UML Diagrams/FindCommandArchitectureDiagram.png\" width\u003d\"500\"\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":189,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"azfarulmatin"},"content":"## 2. ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` is responsible for listing all drugs in the inventory. This command retrieves the list of drugs from the inventory and provides it as part of the command result. If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":194,"author":{"gitId":"azfarulmatin"},"content":"### Design Considerations","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"azfarulmatin"},"content":"- **User-Friendly Listing:** The primary goal of the `ListCommand` is to provide a user-friendly way to list all drugs in the inventory, enhancing the user\u0027s experience in accessing inventory information.","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"azfarulmatin"},"content":"### Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` is implemented as follows:","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"azfarulmatin"},"content":"- **Retrieving Drug List:** The command retrieves the list of drugs from the inventory using the `getAllDrugs` method.","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"azfarulmatin"},"content":"- **Handling Empty Inventory:** It checks if the list of drugs is empty. If the inventory is empty, it returns a user-friendly message indicating that the inventory is empty.","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"azfarulmatin"},"content":"- **Listing Drugs:** If the inventory contains drugs, the command constructs a success message and includes the list of drugs in the command result.","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"azfarulmatin"},"content":"### Function Methods","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"azfarulmatin"},"content":"- `execute()`: This method is responsible for executing the `ListCommand`, listing all drugs in the inventory. It checks the inventory, prepares a user-friendly result message, and returns a `CommandResult` containing the outcome of the command execution, which includes a success message and the list of found `Drug` objects.","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"azfarulmatin"},"content":"### Example Usage","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"azfarulmatin"},"content":"To illustrate how the `ListCommand` works, consider the following example usage:","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"azfarulmatin"},"content":"1. **User Input:** The user initiates the `ListCommand` by entering the following command:","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"azfarulmatin"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"karishma-t"},"content":"## 2. Delete Command","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is designed to enable users to remove specific drugs from the inventory based on the drug\u0027s name. This component facilitates the management of the inventory by allowing users to remove drugs they no longer need, fully depleted or discontinued.","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"karishma-t"},"content":"**Design Considerations**","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"karishma-t"},"content":"The design of the \"Delete\" function takes into account the following considerations:","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"karishma-t"},"content":"1. **User-Specified Drug Name:** The function allows users to specify the drug name they want to delete from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"karishma-t"},"content":"2. **Data Integrity:** It ensures that the deletion operation maintains the integrity of the inventory data structure, updating it correctly.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"karishma-t"},"content":"**Implementation and Rationale**","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":236,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is implemented as follows:","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":238,"author":{"gitId":"karishma-t"},"content":"- **User-Defined Drug Name:** Users provide the name of the drug they wish to delete.","lastModifiedDate":"2023-10-26"},{"lineNumber":239,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":240,"author":{"gitId":"karishma-t"},"content":"- **Data Deletion Algorithm:** The function employs data deletion logic to remove the specified drug from the inventory. This involves identifying the drug based on the provided name and removing it from the list.","lastModifiedDate":"2023-10-26"},{"lineNumber":241,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":242,"author":{"gitId":"karishma-t"},"content":"- **Error Handling:** The function includes error handling to address scenarios where the specified drug is not found in the inventory. In such cases, an appropriate error message is generated.","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"karishma-t"},"content":"- **User Feedback:** Upon successful deletion, the function generates a success message confirming the removal of the drug.","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is an essential feature for managing the inventory, allowing users to keep it up to date and remove unwanted or outdated drugs.","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"karishma-t"},"content":"**Function Methods**","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"karishma-t"},"content":"- `execute()` - This method is responsible for executing the \"Delete\" command, removing the drug with the specified name from the inventory. It returns a `CommandResult` containing the outcome of the command execution, which includes a success message upon successful deletion or an error message if the drug is not found in the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"karishma-t"},"content":"**Example Usage**","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"karishma-t"},"content":"To illustrate how the \"Delete\" function works, consider the following example usage:","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"karishma-t"},"content":"1. **User Input:** The user initiates the \"Delete\" command by typing something like the following:","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"karishma-t"},"content":" `delete /n panadol`- This command instructs the program to remove the drug named \"paracetamol\" from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"karishma-t"},"content":"2. **Method Execution:** The `execute()` method within the \"DeleteCommand\" class is called. It takes the provided drug name as input.","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"karishma-t"},"content":"3. **Search Process:** The method processes the deletion by searching for the drug with the specified name in the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"karishma-t"},"content":"4. **Deletion Operation:** If the drug is found, it is removed from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"karishma-t"},"content":"5. **Success Message:** The `CommandResult` is prepared, containing a success message (e.g., \"Drug removed from inventory: paracetamol\").","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"karishma-t"},"content":"6. **User Feedback:** The result is displayed to the user, confirming the successful removal of the drug from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function provides a straightforward way for users to manage the inventory by removing specific drugs as needed.","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"karishma-t"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":275,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":276,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":277,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":278,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":279,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":280,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":281,"author":{"gitId":"Barbaracwx"},"content":"- Works in the field of drug distribution, such as pharmacies and doctors\u0027 offices.","lastModifiedDate":"2023-10-25"},{"lineNumber":282,"author":{"gitId":"Barbaracwx"},"content":"- Manages a large inventory of pharmaceuticals with varying details (expiration dates, manufacturers, storage","lastModifiedDate":"2023-10-25"},{"lineNumber":283,"author":{"gitId":"Barbaracwx"},"content":" conditions).","lastModifiedDate":"2023-10-25"},{"lineNumber":284,"author":{"gitId":"Barbaracwx"},"content":"- Prefers desktop applications for their work.","lastModifiedDate":"2023-10-25"},{"lineNumber":285,"author":{"gitId":"Barbaracwx"},"content":"- Proficient in fast typing.","lastModifiedDate":"2023-10-25"},{"lineNumber":286,"author":{"gitId":"Barbaracwx"},"content":"- Favors typing over mouse interactions.","lastModifiedDate":"2023-10-25"},{"lineNumber":287,"author":{"gitId":"Barbaracwx"},"content":"- Comfortable using Command Line Interface (CLI) applications for efficiency.","lastModifiedDate":"2023-10-25"},{"lineNumber":288,"author":{"gitId":"Barbaracwx"},"content":"- Requires password-protected access to sensitive patient healthcare information.","lastModifiedDate":"2023-10-25"},{"lineNumber":289,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":290,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":291,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":292,"author":{"gitId":"Barbaracwx"},"content":"**Stocker** is designed to cater to the specific needs of drug distributors by offering the following benefits:","lastModifiedDate":"2023-10-25"},{"lineNumber":293,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":294,"author":{"gitId":"Barbaracwx"},"content":"1. Quick access to real-time inventory information.","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"Barbaracwx"},"content":"2. Efficient tracking of incoming stock.","lastModifiedDate":"2023-10-25"},{"lineNumber":296,"author":{"gitId":"Barbaracwx"},"content":"3. Categorization of drugs based on various labels.","lastModifiedDate":"2023-10-25"},{"lineNumber":297,"author":{"gitId":"Barbaracwx"},"content":"4. A prioritized list of urgently needed restocks for timely replenishment.","lastModifiedDate":"2023-10-25"},{"lineNumber":298,"author":{"gitId":"Barbaracwx"},"content":"5. Assistance in generating comprehensive reports for stock turnover analysis.","lastModifiedDate":"2023-10-25"},{"lineNumber":299,"author":{"gitId":"Barbaracwx"},"content":"6. Secure access through individual user accounts to safeguard patient healthcare data.","lastModifiedDate":"2023-10-25"},{"lineNumber":300,"author":{"gitId":"Barbaracwx"},"content":"7. Enhanced user experience for experienced professionals who prefer keyboard commands and CLI interactions for seamless","lastModifiedDate":"2023-10-25"},{"lineNumber":301,"author":{"gitId":"Barbaracwx"},"content":" stock management.","lastModifiedDate":"2023-10-25"},{"lineNumber":302,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":303,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":304,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":305,"author":{"gitId":"martinschnder"},"content":"Priorities: High (must have) - \\* \\* _, Medium (nice to have) - _ _, Low (unlikely to have) - _","lastModifiedDate":"2023-10-25"},{"lineNumber":306,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":307,"author":{"gitId":"Barbaracwx"},"content":"| Priority | Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2023-10-25"},{"lineNumber":308,"author":{"gitId":"martinschnder"},"content":"| -------- | ------- | ----------------- | ---------------------------------------------------- | ----------------------------------------------------------- |","lastModifiedDate":"2023-10-25"},{"lineNumber":309,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Pharmacist | Add drugs to track what drugs are available in stock | Reduce manual errors |","lastModifiedDate":"2023-10-25"},{"lineNumber":310,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Pharmacist | Remove drugs to track what are no longer in used | Ensure compliance |","lastModifiedDate":"2023-10-25"},{"lineNumber":311,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Receptionist | View a list of products of that category | Easily obtain an overview of the products |","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | First-time user | See a list of all available actions | Better understand how to use the application |","lastModifiedDate":"2023-10-25"},{"lineNumber":313,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Inventory Manager | Find a specific drug currently in the system | Check up its details and quantities specifically |","lastModifiedDate":"2023-10-25"},{"lineNumber":314,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2023-10-25"},{"lineNumber":315,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":316,"author":{"gitId":"martinschnder"},"content":"_(More to be added)_","lastModifiedDate":"2023-10-25"},{"lineNumber":317,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":318,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":319,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":320,"author":{"gitId":"Barbaracwx"},"content":"1. Should work on any mainstream OS as long as it has Java 11 or above installed.","lastModifiedDate":"2023-10-25"},{"lineNumber":321,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":322,"author":{"gitId":"Barbaracwx"},"content":"2. Should be able to hold up to 1000 drug entries without a noticeable sluggishness in performance for typical usage.","lastModifiedDate":"2023-10-25"},{"lineNumber":323,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":324,"author":{"gitId":"Barbaracwx"},"content":"3. A user with above-average typing speed for regular English text (i.e. not code, not system admin commands) should be","lastModifiedDate":"2023-10-25"},{"lineNumber":325,"author":{"gitId":"Barbaracwx"},"content":" able to accomplish most of the tasks faster using commands than using the mouse.","lastModifiedDate":"2023-10-25"},{"lineNumber":326,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":327,"author":{"gitId":"martinschnder"},"content":"_(More to be added)_","lastModifiedDate":"2023-10-25"},{"lineNumber":328,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":329,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":330,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":331,"author":{"gitId":"martinschnder"},"content":"- _glossary item_ - Definition","lastModifiedDate":"2023-10-25"},{"lineNumber":332,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":333,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":334,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":335,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"karishma-t":52,"martinschnder":46,"azfarulmatin":32,"TeoHaoZhi":55,"-":30,"Barbaracwx":120}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"# Stocker","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker v1.o is a desktop app that will provide quick access to currently available stock,","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"track incoming stock and expiration dates, and categorize drugs based on different labels.","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"can get your inventory management tasks done faster than traditional GUI apps.","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":8,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"TeoHaoZhi":5,"-":6}},{"path":"docs/UML Diagrams/ArchitectureDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"title Architecture Diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"skinparam component {","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"BackgroundColor lightblue","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"[Parser]","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"[Commands]","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"[CommandResult]","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"[LoginSystem and Ui] as interactor","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"interface \"user\"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"user -[hidden]- Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"CommandResult -[hidden]- Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"interactor --\u003e Parser : Makes sense of input","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"Parser -\u003e Commands : Searches for inputted command","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Commands -\u003e CommandResult : Executes relevant command","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"CommandResult -\u003e interactor : Return control","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"user -[#red]-\u003e interactor : Logs in or Register","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"TeoHaoZhi":25}},{"path":"docs/UML Diagrams/FindCommandArchitectureDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"@startuml FindCommandArchitectureDiagram","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"!define ARROW_STYLE [-[#LOGIC_COLOR]-\u003e]","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"actor User as U","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"package \"Your Application\" {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":" [User Interface] as UI","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":" [FindCommand] as FindCmd","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" [Inventory] as Inv","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":" [StockEntry] as Entry","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" [CommandResult] as CmdResult","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"U -down-\u003e UI: Initiates \u0027Find\u0027 Command","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"UI -down-\u003e FindCmd: Invokes \u0027FindCommand\u0027","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":"UI -down-\u003e Inv: Accesses \u0027Inventory\u0027","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -down-\u003e Entry: Iterates Through Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":"Entry -down-\u003e Entry: Checks Each Entry","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"Entry --\u003e FindCmd: Match/No Match","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":"FindCmd --\u003e CmdResult: Prepares Result","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":"CmdResult -up-\u003e UI: Returns Result","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":"CmdResult -up-\u003e U: Displays Search Results","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"Barbaracwx":26}},{"path":"docs/UML Diagrams/FindCommandDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"@startuml FindCommandDiagram","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"actor User","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"participant \"FindCommand\" as FindCmd LOGIC_COLOR_T1","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"participant \"Inventory\" as Inventory LOGIC_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"User -\u003e FindCmd: Execute \u0027Find\u0027 Command","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":"User \u003c-- FindCmd: CommandResult","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -\u003e Inventory: Retrieve Stock Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"Inventory --\u003e FindCmd: List of Stock Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -\u003e FindCmd: Process Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"FindCmd --\u003e User: Display Search Results","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"Barbaracwx":17}},{"path":"docs/UML Diagrams/ListCommand.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"class ListCommand {","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":" - COMMAND_WORD: String","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":" - MESSAGE_USAGE: String","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":" - MESSAGE_SUCCESS: String","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":" + execute(): CommandResult","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"}","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"azfarulmatin":8}},{"path":"docs/UML Diagrams/StockerToLoginSystem.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"@startuml","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"hide footbox","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"actor User","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":Stocker\" as Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":Ui\" as Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":LoginSystem\" as LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"User -\u003e Stocker : Stocker()","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"activate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Stocker : run()","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"activate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Stocker :start()","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Ui : Ui()","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"activate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"Ui -\u003e Ui : showLoginMessage()","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"activate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Ui -\u003e Ui : ShowToUser()","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"Ui --\u003e User : LoginMessage","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e LoginSystem :LoginSystem()","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"activate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : run()","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"activate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : loadExistingUsers()","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem: authenticateUserChoice()","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"User -\u003e LoginSystem : register or login input","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"alt Register","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : newUserCreator()","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem --\u003e User : showSuccessfulRegistrationMessage()","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":"else Login","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003eLoginSystem : loginExistingUser()","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem --\u003e User: showSuccessfulLoginMessage()","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"end","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"@enduml","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"TeoHaoZhi":47}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker v1.o is a desktop app that will provide quick access to currently available stock, ","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"track incoming stock and expiration dates, and categorize drugs based on different labels. ","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker ","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"can get your inventory management tasks done faster than traditional GUI apps.","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"{Give steps to get started quickly}","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"1. Down the latest version of `Stocker` from [here](https://github.com/AY2324S1-CS2113-T17-3/tp/releases).","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"## Features ","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-Login System","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Authentication system that allows user to register as a user or login","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"as an existing user.","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-add","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a drug into the inventory list.","lastModifiedDate":"2023-10-10"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-delete","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"Deletes a drug being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-list","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"List all drug information that is being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-find","lastModifiedDate":"2023-10-10"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":"Finds drugs using their name or expiry date.","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-help","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"List all currently available commands in current version, their ","lastModifiedDate":"2023-10-10"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"uses and how to format them in the command line.","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-register","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"Register a new user into the login system.","lastModifiedDate":"2023-10-20"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-login","lastModifiedDate":"2023-10-20"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"Login an existing user into the system.","lastModifiedDate":"2023-10-20"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-save","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":"Save existing drugs from inventory list onto a txt file.","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":"File is then used to update inventory list when stocker is ran.","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-add vendor","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a vendor into a list to be tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature- list vendors","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":"Displays the name of all vendors being tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"## Usage","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":"### `Login System`- Create new user or login existing user","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":"Login system is automatically launched at the start of the programme.","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":"**Registering a user**","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 1 : Enter register to select option to register a user.","lastModifiedDate":"2023-10-20"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e ","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 2: Enter desired username and password.","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e ","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Upon successful creation, registration success message is observed","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"Registration successful.","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":"**Login an existing user**","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 1 : Enter login to select option to login a user.","lastModifiedDate":"2023-10-20"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 2: Enter registered username and password.","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Upon successful creation, successful login message is observed.","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":"Login Successful.","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":"### `add` - Adds drug into inventory list","lastModifiedDate":"2023-10-10"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a drug to be tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":"add /n DRUG_NAME /d EXPIRY_DATE /q QUANTITY","lastModifiedDate":"2023-10-10"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":"`add /n Panadol /d 12 June 2026 /q 300","lastModifiedDate":"2023-10-10"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":117,"author":{"gitId":"TeoHaoZhi"},"content":"New drug added in the inventory: Panadol","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":"### `delete` - Deletes a drug being tracked by the system","lastModifiedDate":"2023-10-10"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":"Deletes a drug being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":"delete /n DRUG_NAM","lastModifiedDate":"2023-10-10"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":130,"author":{"gitId":"TeoHaoZhi"},"content":"`delete /n Panadol","lastModifiedDate":"2023-10-10"},{"lineNumber":131,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":132,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":134,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":135,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":136,"author":{"gitId":"TeoHaoZhi"},"content":"removed : Panadol","lastModifiedDate":"2023-10-10"},{"lineNumber":137,"author":{"gitId":"TeoHaoZhi"},"content":"There are now 0 drugs in the system","lastModifiedDate":"2023-10-10"},{"lineNumber":138,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":139,"author":{"gitId":"TeoHaoZhi"},"content":"### `list` - List all drug information that is being tracked by the system","lastModifiedDate":"2023-10-10"},{"lineNumber":140,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":141,"author":{"gitId":"TeoHaoZhi"},"content":"List all drug information that is being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":142,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":143,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":144,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":145,"author":{"gitId":"TeoHaoZhi"},"content":"list","lastModifiedDate":"2023-10-10"},{"lineNumber":146,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":147,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":148,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":149,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":"`list","lastModifiedDate":"2023-10-10"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":153,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":154,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":155,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":156,"author":{"gitId":"TeoHaoZhi"},"content":"|| 1. Name: Panadol, Expiry Date: 12 June 2026/ Quantity: 300","lastModifiedDate":"2023-10-29"},{"lineNumber":157,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":158,"author":{"gitId":"TeoHaoZhi"},"content":"Listed all drugs in the inventory.","lastModifiedDate":"2023-10-15"},{"lineNumber":159,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":160,"author":{"gitId":"Barbaracwx"},"content":"### `find` - Finds drugs using their name or expiry date","lastModifiedDate":"2023-10-20"},{"lineNumber":161,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":162,"author":{"gitId":"Barbaracwx"},"content":"1. Finds drugs whose **names** contain any of the given keywords.","lastModifiedDate":"2023-10-20"},{"lineNumber":163,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":165,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":166,"author":{"gitId":"Barbaracwx"},"content":"find /n panadol","lastModifiedDate":"2023-10-20"},{"lineNumber":167,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":168,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":169,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":170,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":171,"author":{"gitId":"Barbaracwx"},"content":"` find /n KEYWORD ","lastModifiedDate":"2023-10-20"},{"lineNumber":172,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":173,"author":{"gitId":"Barbaracwx"},"content":"- The search is case-insensitive, meaning that \"aspirin\" will match \"Aspirin.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":174,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":175,"author":{"gitId":"Barbaracwx"},"content":"- The order of the keywords does not matter. For example, \"Painkiller Relief\" will match \"Relief Painkiller.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":176,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":177,"author":{"gitId":"Barbaracwx"},"content":"- Only the drug name is searched.","lastModifiedDate":"2023-10-20"},{"lineNumber":178,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":179,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":180,"author":{"gitId":"Barbaracwx"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":181,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":182,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":183,"author":{"gitId":"Barbaracwx"},"content":"1. Name: panadol, Expiry Date: 12 sep, Quantity: 120","lastModifiedDate":"2023-10-20"},{"lineNumber":184,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":185,"author":{"gitId":"Barbaracwx"},"content":"Listed all drugs with the keyword in the inventory.","lastModifiedDate":"2023-10-20"},{"lineNumber":186,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":187,"author":{"gitId":"Barbaracwx"},"content":"2. Finds drugs whose **expiry dates** contain any of the given keywords.","lastModifiedDate":"2023-10-20"},{"lineNumber":188,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":189,"author":{"gitId":"Barbaracwx"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":190,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":191,"author":{"gitId":"Barbaracwx"},"content":"find /d sep","lastModifiedDate":"2023-10-20"},{"lineNumber":192,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":193,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":194,"author":{"gitId":"Barbaracwx"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":195,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":196,"author":{"gitId":"Barbaracwx"},"content":"` find /d KEYWORD","lastModifiedDate":"2023-10-20"},{"lineNumber":197,"author":{"gitId":"Barbaracwx"},"content":"`","lastModifiedDate":"2023-10-20"},{"lineNumber":198,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":199,"author":{"gitId":"Barbaracwx"},"content":"- Only the drug\u0027s expiry date is searched.","lastModifiedDate":"2023-10-20"},{"lineNumber":200,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":201,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":202,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":203,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":204,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":205,"author":{"gitId":"Barbaracwx"},"content":"1. Name: panadol, Expiry Date: 12 sep, Quantity: 120","lastModifiedDate":"2023-10-20"},{"lineNumber":206,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":207,"author":{"gitId":"Barbaracwx"},"content":"Listed all drugs with the keyword in the inventory.","lastModifiedDate":"2023-10-20"},{"lineNumber":208,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":209,"author":{"gitId":"TeoHaoZhi"},"content":"### `help` - List currently available commands in current version, their uses and how to format them in the command line","lastModifiedDate":"2023-10-10"},{"lineNumber":210,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":211,"author":{"gitId":"TeoHaoZhi"},"content":"List all currently available commands in current version, ","lastModifiedDate":"2023-10-10"},{"lineNumber":212,"author":{"gitId":"TeoHaoZhi"},"content":"their uses and how to format them in the command line","lastModifiedDate":"2023-10-10"},{"lineNumber":213,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":214,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":215,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":216,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":217,"author":{"gitId":"TeoHaoZhi"},"content":"help","lastModifiedDate":"2023-10-10"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":219,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":220,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"TeoHaoZhi"},"content":"`help","lastModifiedDate":"2023-10-10"},{"lineNumber":223,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":224,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":225,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":226,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":227,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":228,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":229,"author":{"gitId":"TeoHaoZhi"},"content":"|| add: Adds a new drug to the drug list. Parameters: NAME, EXPIRY DATE, QUANTITY, ","lastModifiedDate":"2023-10-15"},{"lineNumber":230,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: add /n Doliprane /d 12/06/2035 /q 52","lastModifiedDate":"2023-10-15"},{"lineNumber":231,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":232,"author":{"gitId":"TeoHaoZhi"},"content":"|| delete: Removes a drug from drug list. Parameters: Name ","lastModifiedDate":"2023-10-15"},{"lineNumber":233,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: delete \u003cDrug Name\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":234,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":235,"author":{"gitId":"TeoHaoZhi"},"content":"|| help: Shows program usage instructions. ","lastModifiedDate":"2023-10-15"},{"lineNumber":236,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: help","lastModifiedDate":"2023-10-15"},{"lineNumber":237,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":238,"author":{"gitId":"TeoHaoZhi"},"content":"|| list: List all drug information that is being tracked by the system. ","lastModifiedDate":"2023-10-15"},{"lineNumber":239,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: list","lastModifiedDate":"2023-10-15"},{"lineNumber":240,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":241,"author":{"gitId":"Barbaracwx"},"content":"|| find: Finds drug in inventory using name or expiry date","lastModifiedDate":"2023-10-20"},{"lineNumber":242,"author":{"gitId":"Barbaracwx"},"content":"|| Example: find /n panadol","lastModifiedDate":"2023-10-20"},{"lineNumber":243,"author":{"gitId":"Barbaracwx"},"content":"|| Example: find /d sep","lastModifiedDate":"2023-10-20"},{"lineNumber":244,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":245,"author":{"gitId":"TeoHaoZhi"},"content":"|| bye: Exits the program.","lastModifiedDate":"2023-10-15"},{"lineNumber":246,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: bye","lastModifiedDate":"2023-10-15"},{"lineNumber":247,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":249,"author":{"gitId":"TeoHaoZhi"},"content":"### `register` - Register a new user into the system","lastModifiedDate":"2023-10-20"},{"lineNumber":250,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":251,"author":{"gitId":"TeoHaoZhi"},"content":"Asks for user input for a username and password field which","lastModifiedDate":"2023-10-20"},{"lineNumber":252,"author":{"gitId":"TeoHaoZhi"},"content":"will be used to create a new user for the system.","lastModifiedDate":"2023-10-20"},{"lineNumber":253,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":254,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":255,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":256,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":257,"author":{"gitId":"TeoHaoZhi"},"content":"register","lastModifiedDate":"2023-10-20"},{"lineNumber":258,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":259,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":260,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":261,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":262,"author":{"gitId":"TeoHaoZhi"},"content":"`register`","lastModifiedDate":"2023-10-20"},{"lineNumber":263,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":264,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":265,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":266,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":267,"author":{"gitId":"TeoHaoZhi"},"content":"Registration Successful.","lastModifiedDate":"2023-10-20"},{"lineNumber":268,"author":{"gitId":"TeoHaoZhi"},"content":"New User Created.","lastModifiedDate":"2023-10-20"},{"lineNumber":269,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":270,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":271,"author":{"gitId":"TeoHaoZhi"},"content":"### `login` - login an existing user into the system","lastModifiedDate":"2023-10-20"},{"lineNumber":272,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":273,"author":{"gitId":"TeoHaoZhi"},"content":"Asks for user input for a username and password field which","lastModifiedDate":"2023-10-20"},{"lineNumber":274,"author":{"gitId":"TeoHaoZhi"},"content":"will be used to check if such a user exists for the system","lastModifiedDate":"2023-10-20"},{"lineNumber":275,"author":{"gitId":"TeoHaoZhi"},"content":"and log the user in.","lastModifiedDate":"2023-10-20"},{"lineNumber":276,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":277,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":278,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":279,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":280,"author":{"gitId":"TeoHaoZhi"},"content":"login","lastModifiedDate":"2023-10-20"},{"lineNumber":281,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":282,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":283,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":284,"author":{"gitId":"TeoHaoZhi"},"content":"`login`","lastModifiedDate":"2023-10-20"},{"lineNumber":285,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":286,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":287,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":288,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":289,"author":{"gitId":"TeoHaoZhi"},"content":"Login Sucessful","lastModifiedDate":"2023-10-20"},{"lineNumber":290,"author":{"gitId":"TeoHaoZhi"},"content":"Welcome Back!","lastModifiedDate":"2023-10-20"},{"lineNumber":291,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":292,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":293,"author":{"gitId":"TeoHaoZhi"},"content":"### `save` - save existing drugs onto hard drive of computer","lastModifiedDate":"2023-10-21"},{"lineNumber":294,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":295,"author":{"gitId":"TeoHaoZhi"},"content":"Saves existing drugs onto hard drive of computer. The txt file","lastModifiedDate":"2023-10-21"},{"lineNumber":296,"author":{"gitId":"TeoHaoZhi"},"content":"is then used as reference to update drug inventory when stocker ","lastModifiedDate":"2023-10-21"},{"lineNumber":297,"author":{"gitId":"TeoHaoZhi"},"content":"is booted up.","lastModifiedDate":"2023-10-21"},{"lineNumber":298,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":299,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-21"},{"lineNumber":300,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":301,"author":{"gitId":"TeoHaoZhi"},"content":"save","lastModifiedDate":"2023-10-21"},{"lineNumber":302,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":303,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-21"},{"lineNumber":304,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":305,"author":{"gitId":"TeoHaoZhi"},"content":"`save`","lastModifiedDate":"2023-10-21"},{"lineNumber":306,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":307,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-21"},{"lineNumber":308,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":309,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-21"},{"lineNumber":310,"author":{"gitId":"TeoHaoZhi"},"content":"Drugs successfully saved.","lastModifiedDate":"2023-10-21"},{"lineNumber":311,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-21"},{"lineNumber":312,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":313,"author":{"gitId":"TeoHaoZhi"},"content":"### `addVendor` - adds a vendor into list of vendors being tracked by system","lastModifiedDate":"2023-10-29"},{"lineNumber":314,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":315,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a vendor to be tracked by the system. The enteries are used to form a list of summarised vendors.","lastModifiedDate":"2023-10-29"},{"lineNumber":316,"author":{"gitId":"TeoHaoZhi"},"content":"is booted up.","lastModifiedDate":"2023-10-29"},{"lineNumber":317,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":318,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":319,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":320,"author":{"gitId":"TeoHaoZhi"},"content":"addVendor DRUGNAME","lastModifiedDate":"2023-10-29"},{"lineNumber":321,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":322,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":323,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":324,"author":{"gitId":"TeoHaoZhi"},"content":"`addVendor Moderna`","lastModifiedDate":"2023-10-29"},{"lineNumber":325,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":326,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-29"},{"lineNumber":327,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":328,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":329,"author":{"gitId":"TeoHaoZhi"},"content":"New vendor added into the vendors list: Moderna","lastModifiedDate":"2023-10-29"},{"lineNumber":330,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":331,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":332,"author":{"gitId":"TeoHaoZhi"},"content":"### `listVendors` - list all vendors currently being tracked by the system","lastModifiedDate":"2023-10-29"},{"lineNumber":333,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":334,"author":{"gitId":"TeoHaoZhi"},"content":"Displays a list of all vendors currently being tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":335,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":336,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":337,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":338,"author":{"gitId":"TeoHaoZhi"},"content":"listVendors","lastModifiedDate":"2023-10-29"},{"lineNumber":339,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":340,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":341,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":342,"author":{"gitId":"TeoHaoZhi"},"content":"`listVendors`","lastModifiedDate":"2023-10-29"},{"lineNumber":343,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":344,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-29"},{"lineNumber":345,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":346,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":347,"author":{"gitId":"TeoHaoZhi"},"content":"|| 1. Name : Moderna","lastModifiedDate":"2023-10-29"},{"lineNumber":348,"author":{"gitId":"TeoHaoZhi"},"content":"||","lastModifiedDate":"2023-10-29"},{"lineNumber":349,"author":{"gitId":"TeoHaoZhi"},"content":"||Listed all vendors in the list.","lastModifiedDate":"2023-10-29"},{"lineNumber":350,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":351,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":352,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":353,"author":{"gitId":"TeoHaoZhi"},"content":"**Q**: Can i register with blank username and password","lastModifiedDate":"2023-10-17"},{"lineNumber":354,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":355,"author":{"gitId":"TeoHaoZhi"},"content":"**A**: No. Ensure your entries are not blank.","lastModifiedDate":"2023-10-17"},{"lineNumber":356,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":357,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":358,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":359,"author":{"gitId":"TeoHaoZhi"},"content":"* add : `add /n DRUG_NAME /d EXPIRY_DATE /q QUANTITY`","lastModifiedDate":"2023-10-10"},{"lineNumber":360,"author":{"gitId":"TeoHaoZhi"},"content":"* delete : `delete /n DRUG_NAME`","lastModifiedDate":"2023-10-10"},{"lineNumber":361,"author":{"gitId":"TeoHaoZhi"},"content":"* list : `list`","lastModifiedDate":"2023-10-10"},{"lineNumber":362,"author":{"gitId":"Barbaracwx"},"content":"* find : `find /n KEYWORD` or `find /d KEYWORD`","lastModifiedDate":"2023-10-20"},{"lineNumber":363,"author":{"gitId":"TeoHaoZhi"},"content":"* help : `help`","lastModifiedDate":"2023-10-10"},{"lineNumber":364,"author":{"gitId":"TeoHaoZhi"},"content":"* register : `register`","lastModifiedDate":"2023-10-20"},{"lineNumber":365,"author":{"gitId":"TeoHaoZhi"},"content":"* login : `login`","lastModifiedDate":"2023-10-20"},{"lineNumber":366,"author":{"gitId":"TeoHaoZhi"},"content":"* save : `save`","lastModifiedDate":"2023-10-21"},{"lineNumber":367,"author":{"gitId":"TeoHaoZhi"},"content":"* add Vendor : `addVendor`","lastModifiedDate":"2023-10-29"},{"lineNumber":368,"author":{"gitId":"TeoHaoZhi"},"content":"* list Vendor : `listVendors`","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"TeoHaoZhi":302,"-":31,"Barbaracwx":35}},{"path":"docs/team/Azfarul.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"# Azfarul Matin - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"azfarulmatin":6}},{"path":"docs/team/Barbara.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"# Barbara Chong - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"Barbaracwx":6}},{"path":"docs/team/HaoZhi.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"# Hao Zhi - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"TeoHaoZhi":6}},{"path":"docs/team/Karishma.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"karishma-t"},"content":"# Karishma - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"karishma-t"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"karishma-t":5}},{"path":"docs/team/Martin.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"# Martin Schneider - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"martinschnder":5}},{"path":"src/main/java/seedu/stocker/Stocker.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.ui.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.parser.Parser;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.Command;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.CommandResult;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.ExitCommand;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"public class Stocker {","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private Ui ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" private Inventory inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" private SalesList salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" private Cart currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" private VendorsList vendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" private Storage storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public static void main(String[] launchArgs) throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" new Stocker().run();","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs Login System.","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" public boolean startLogin() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" this.ui \u003d new Ui();","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" ui.showLoginMessage();","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" system.run();","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" return system.loginStatus;","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs the program until termination.","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" public void run() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" start();","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" runCommandLoopUntilExitCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" exit();","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" * Sets up the required objects, and prints the welcome message.","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" private void start() {","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" this.ui \u003d new Ui();","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d new Inventory();","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" this.salesList \u003d new SalesList();","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":" this.currentCart \u003d new Cart();","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" this.vendorsList \u003d new VendorsList();","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" this.storage \u003d new Storage(inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" storage.loadFileContents(\"drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" boolean checker \u003d startLogin();","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" assert checker \u003d\u003d true;","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" if(checker){","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" ui.showWelcomeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"martinschnder"},"content":" ui.showInitFailedMessage();","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" System.exit(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" * Prints the Goodbye message and exits.","lastModifiedDate":"2023-10-11"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":" private void exit() {","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":" ui.showGoodbyeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":" System.exit(0);","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" * Reads the user command and executes it, until the user issues the exit command.","lastModifiedDate":"2023-10-11"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" private void runCommandLoopUntilExitCommand() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"martinschnder"},"content":" Command command;","lastModifiedDate":"2023-10-09"},{"lineNumber":91,"author":{"gitId":"martinschnder"},"content":" do {","lastModifiedDate":"2023-10-09"},{"lineNumber":92,"author":{"gitId":"martinschnder"},"content":" String userCommandText \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":93,"author":{"gitId":"martinschnder"},"content":" command \u003d new Parser().parseCommand(userCommandText);","lastModifiedDate":"2023-10-09"},{"lineNumber":94,"author":{"gitId":"martinschnder"},"content":" CommandResult result \u003d executeCommand(command);","lastModifiedDate":"2023-10-09"},{"lineNumber":95,"author":{"gitId":"martinschnder"},"content":" ui.showResultToUser(result);","lastModifiedDate":"2023-10-09"},{"lineNumber":96,"author":{"gitId":"Barbaracwx"},"content":" assert !ExitCommand.isExit((command));","lastModifiedDate":"2023-10-19"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":" } while (!ExitCommand.isExit(command));","lastModifiedDate":"2023-10-09"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":" * Executes the command and returns the result.","lastModifiedDate":"2023-10-09"},{"lineNumber":104,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":105,"author":{"gitId":"martinschnder"},"content":" * @param command user command","lastModifiedDate":"2023-10-09"},{"lineNumber":106,"author":{"gitId":"martinschnder"},"content":" * @return result of the command","lastModifiedDate":"2023-10-09"},{"lineNumber":107,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" private CommandResult executeCommand(Command command) throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":109,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, salesList, currentCart);","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"martinschnder"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"martinschnder"},"content":" return result;","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":113,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"martinschnder":64,"TeoHaoZhi":42,"-":6,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/authentication/LoginSystem.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.authentication;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.ui.Ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileReader;","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedReader;","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" * Represents a login system used for authentication of users.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" * User information is saved within a hashtable and uploaded","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" * into txt file for future reference.","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"public class LoginSystem {","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public boolean loginStatus;","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" private Ui interactor;","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" private final HashMap\u003cString, String\u003e users;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public LoginSystem() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" users \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" this.in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" interactor \u003d new Ui();","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./users.txt\");","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" * Returns user choice of whether they wish to register a new user","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" * or if they would want to login using an existing user.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" * @return choice of user to login or register","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws StockerException if register or login is not inputted","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" public String authenticateUserChoice() throws StockerException{","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" try {","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":" while (in.hasNextLine()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":" String choice \u003d in.nextLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":" if (choice.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":" return \"register\";","lastModifiedDate":"2023-10-20"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (choice.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":" return \"login\";","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":" throw new StockerException();","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":" } catch (StockerException e) {","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidChoiceMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":" return authenticateUserChoice();","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" return \"error\";","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" * Creates a new user with input username and password from user.","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":" * Username and password are saved into a txt file for future","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":" * reference.","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if inappropriate output is entered.","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" public void newUserCreator() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUsernameMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" String username \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" while (username.equals(\"\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showBlankNameMessage();","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" username \u003d in.nextLine();","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" String password \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" while (password.equals(\"\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showBlankPasswordMessage();","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" password \u003d in.nextLine();","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" assert(username.equals(\"\") \u003d\u003d false);","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" assert (password.equals(\"\") \u003d\u003d false);","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":" if (users.containsKey(username)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUserAlreadyExistMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" users.put(username, password);","lastModifiedDate":"2023-10-11"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showSuccessfulRegistrationMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":" writeNewUserToFile();","lastModifiedDate":"2023-10-11"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"TeoHaoZhi"},"content":" * Login existing user by asking for username and password input","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":" * from user.","lastModifiedDate":"2023-10-14"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if inappropriate input is entered.","lastModifiedDate":"2023-10-14"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":" public void loginExistingUser() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUsernameMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":" String usernameInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":" String passwordInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":131,"author":{"gitId":"TeoHaoZhi"},"content":" if (!users.containsKey(usernameInput)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":132,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidUsernameOrPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":134,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":135,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":136,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":137,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":138,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":139,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":140,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":141,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":142,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":143,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":144,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":145,"author":{"gitId":"TeoHaoZhi"},"content":" if (users.get(usernameInput).equals(passwordInput)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":146,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showSuccessfulLoginMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":147,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":148,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":149,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidUsernameOrPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":153,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":154,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":155,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":156,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":157,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":158,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":159,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":160,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":161,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":162,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":163,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":165,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":166,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":167,"author":{"gitId":"TeoHaoZhi"},"content":" * Writes new user creation into a txt file to save for future reference","lastModifiedDate":"2023-10-14"},{"lineNumber":168,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":169,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException","lastModifiedDate":"2023-10-14"},{"lineNumber":170,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":171,"author":{"gitId":"TeoHaoZhi"},"content":" public void writeNewUserToFile() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":172,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedWriter writer \u003d new BufferedWriter(new FileWriter(\"./users.txt\", true));","lastModifiedDate":"2023-10-11"},{"lineNumber":173,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":174,"author":{"gitId":"TeoHaoZhi"},"content":" for (Map.Entry\u003cString, String\u003e entry :","lastModifiedDate":"2023-10-11"},{"lineNumber":175,"author":{"gitId":"TeoHaoZhi"},"content":" users.entrySet()) {","lastModifiedDate":"2023-10-11"},{"lineNumber":176,"author":{"gitId":"TeoHaoZhi"},"content":" // put key and value separated by a colon","lastModifiedDate":"2023-10-11"},{"lineNumber":177,"author":{"gitId":"TeoHaoZhi"},"content":" writer.write(entry.getKey() + \":\"","lastModifiedDate":"2023-10-11"},{"lineNumber":178,"author":{"gitId":"TeoHaoZhi"},"content":" + entry.getValue());","lastModifiedDate":"2023-10-11"},{"lineNumber":179,"author":{"gitId":"TeoHaoZhi"},"content":" // new line","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"TeoHaoZhi"},"content":" writer.newLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":181,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":182,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":183,"author":{"gitId":"TeoHaoZhi"},"content":" writer.flush();","lastModifiedDate":"2023-10-11"},{"lineNumber":184,"author":{"gitId":"TeoHaoZhi"},"content":" writer.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":185,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":186,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":187,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":188,"author":{"gitId":"TeoHaoZhi"},"content":" * Loads existing users from txt file into hash table","lastModifiedDate":"2023-10-14"},{"lineNumber":189,"author":{"gitId":"TeoHaoZhi"},"content":" * for login system to use for authentication when","lastModifiedDate":"2023-10-14"},{"lineNumber":190,"author":{"gitId":"TeoHaoZhi"},"content":" * user tries to login.","lastModifiedDate":"2023-10-14"},{"lineNumber":191,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":192,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if fail to read from txt file","lastModifiedDate":"2023-10-14"},{"lineNumber":193,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":194,"author":{"gitId":"TeoHaoZhi"},"content":" public void loadExistingUsers() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":195,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedReader reader \u003d new BufferedReader(new FileReader(\"./users.txt\"));","lastModifiedDate":"2023-10-11"},{"lineNumber":196,"author":{"gitId":"TeoHaoZhi"},"content":" String line;","lastModifiedDate":"2023-10-11"},{"lineNumber":197,"author":{"gitId":"TeoHaoZhi"},"content":" while ((line \u003d reader.readLine()) !\u003d null) {","lastModifiedDate":"2023-10-11"},{"lineNumber":198,"author":{"gitId":"TeoHaoZhi"},"content":" String[] parts \u003d line.split(\":\", 2);","lastModifiedDate":"2023-10-11"},{"lineNumber":199,"author":{"gitId":"TeoHaoZhi"},"content":" if (parts.length \u003e\u003d 2) {","lastModifiedDate":"2023-10-11"},{"lineNumber":200,"author":{"gitId":"TeoHaoZhi"},"content":" String key \u003d parts[0];","lastModifiedDate":"2023-10-11"},{"lineNumber":201,"author":{"gitId":"TeoHaoZhi"},"content":" String value \u003d parts[1];","lastModifiedDate":"2023-10-11"},{"lineNumber":202,"author":{"gitId":"TeoHaoZhi"},"content":" users.put(key, value);","lastModifiedDate":"2023-10-11"},{"lineNumber":203,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":204,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":205,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":206,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":207,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":208,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs login system by loading user information into hash table","lastModifiedDate":"2023-10-14"},{"lineNumber":209,"author":{"gitId":"TeoHaoZhi"},"content":" * and get input for user to check for authentication.","lastModifiedDate":"2023-10-14"},{"lineNumber":210,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":211,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if unable to read from txt file to","lastModifiedDate":"2023-10-14"},{"lineNumber":212,"author":{"gitId":"TeoHaoZhi"},"content":" * load users","lastModifiedDate":"2023-10-14"},{"lineNumber":213,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":214,"author":{"gitId":"TeoHaoZhi"},"content":" public void run() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":215,"author":{"gitId":"TeoHaoZhi"},"content":" loadExistingUsers();","lastModifiedDate":"2023-10-11"},{"lineNumber":216,"author":{"gitId":"TeoHaoZhi"},"content":" String choice \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":217,"author":{"gitId":"TeoHaoZhi"},"content":" if (choice.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":218,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":219,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":220,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (choice.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":221,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":222,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":223,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":224,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":225,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":226,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"TeoHaoZhi":226}},{"path":"src/main/java/seedu/stocker/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * Adds a drug into the inventory","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a new drug to the drug list. \"","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameters: NAME, EXPIRY DATE, QUANTITY, \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \" /n Doliprane /d 12/06/2035 /q 52\";","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New drug added in the inventory: %1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" private final Drug toAdd;","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" private final long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" public AddCommand(String name, String expiryDate, Long quantity) {","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.toAdd \u003d new Drug(name, expiryDate);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" public Drug getDrug() {","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return this.toAdd;","lastModifiedDate":"2023-10-09"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(toAdd.getName(), toAdd, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, toAdd.getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":33,"TeoHaoZhi":2,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/AddToCartCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * Adds a certain quantity of one drug into the current cart","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"public class AddToCartCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"addtocart\";","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD ","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" + \": Adds a new drug to the current cart. \"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \"Parameters: NAME, QUANTITY,\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" + \" /n Doliprane /q 2\";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New drug added in the current cart: %1$s\";","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" private final String drugName;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" private final long quantity;","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public AddToCartCommand(String name, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.drugName \u003d name;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" StockEntry matchingEntry \u003d inventory.getStockEntries().stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" .filter(entry -\u003e entry","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" .getDrug().getName()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" .equalsIgnoreCase(this.drugName) \u0026\u0026 ","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" entry.getQuantity() \u003e this.quantity)","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" .findAny()","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" .orElse(null);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" if (matchingEntry !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" currentCart.addEntry(this.drugName, this.quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, matchingEntry.getDrug().getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"This drug is not in stock. \");","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":40,"TeoHaoZhi":1,"Barbaracwx":4}},{"path":"src/main/java/seedu/stocker/commands/AddVendorCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.Vendor;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":" * Adds a vendor into the inventory","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"public class AddVendorCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"addVendor\";","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a new vendor to the vendors list. \"","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameter: NAME\" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + \" Moderna\";","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New vendor added in the vendors list: %1$s\";","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" private final Vendor toAdd;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public AddVendorCommand(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" this.toAdd \u003d new Vendor(name);","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" VendorsList.addNewVendor(toAdd);","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd.getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":31}},{"path":"src/main/java/seedu/stocker/commands/CheckOutCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Remove a drug from inventory and add it into the sales list","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"public class CheckOutCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"checkout\";","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Checks out current cart. \"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Parameters:\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"The current cart has been checked out. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public CheckOutCommand() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" currentCart.checkOut(salesList, inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS));","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":22,"TeoHaoZhi":1,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" protected Inventory inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" protected SalesList salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" protected Cart currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" protected Command() {","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" public void setData(Inventory inventory, SalesList salesList, Cart currentCart) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" this.salesList \u003d salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.currentCart \u003d currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" public abstract CommandResult execute() throws IOException, StockerException;","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":24,"TeoHaoZhi":5}},{"path":"src/main/java/seedu/stocker/commands/CommandResult.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"// import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Optional;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" * Represents the result of a command execution.","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"public class CommandResult\u003cT\u003e {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" * The feedback message to be shown to the user. Contains a description of the execution result","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" public final String feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":" * The list of drugs that was produced by the command","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private final List\u003cT\u003e relevantElements;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public CommandResult(String feedbackToUser) {","lastModifiedDate":"2023-10-09"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" relevantElements \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" public CommandResult(String feedbackToUser, List\u003cT\u003e relevantElements) {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" this.relevantElements \u003d relevantElements;","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" * Returns a list of drugs that was produced by the command, if any.","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" public Optional\u003cList\u003cT\u003e\u003e getRelevantElements() {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" return Optional.ofNullable(relevantElements);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" public String getFeedbackToUserFindTest() {","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" if (relevantElements !\u003d null) {","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" StringBuilder feedback \u003d new StringBuilder();","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" for (int i \u003d 0; i \u003c relevantElements.size(); i++) {","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(i + 1).append(\". \").append(relevantElements.get(i));","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(System.lineSeparator());","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(System.lineSeparator());","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(feedbackToUser);","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"Barbaracwx"},"content":" return feedback.toString();","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"Barbaracwx"},"content":" return feedbackToUser;","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":34,"Barbaracwx":21}},{"path":"src/main/java/seedu/stocker/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.DrugNotFoundException;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"public class DeleteCommand extends Command{","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Removes a drug from drug list. \"","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameters: Name \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \" \u003cDrug Name\u003e\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Drug removed from inventory: %1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_FAILURE \u003d \"Drug not find in the inventory. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" private final String keyToDelete;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"karishma-t"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"karishma-t"},"content":" * Constructs a DeleteCommand with the specified drug name.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"karishma-t"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"karishma-t"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" public DeleteCommand(String key) {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" this.keyToDelete \u003d key.trim().toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"karishma-t"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"karishma-t"},"content":" * Executes the \u0027delete\u0027 command, removing a drug from the inventory list by name.","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"karishma-t"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"karishma-t"},"content":" * @return A CommandResult indicating the result of the deletion operation.","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"karishma-t"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" StockEntry deletedEntry \u003d inventory.deleteDrug(this.keyToDelete);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, deletedEntry.getDrug().getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" } catch (DrugNotFoundException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_FAILURE);","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"karishma-t"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"karishma-t":14,"martinschnder":9,"TeoHaoZhi":19,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Terminates the program.","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"bye\";","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Exits the program.\"+ System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_EXIT_ACKNOWEDGEMENT \u003d \"Exiting Stocker as requested ...\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_EXIT_ACKNOWEDGEMENT);","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" public static boolean isExit(Command command) {","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" return command instanceof ExitCommand; // instanceof returns false if it is null","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":19,"TeoHaoZhi":2,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" * Represents a command to find drugs in the inventory that match a given keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" * Usage message for the \u0027find\u0027 command.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" /n\" + \": Finds drug in inventory using name.\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" \"Example: \" + COMMAND_WORD + \" /n panadol\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" COMMAND_WORD + \" /d\" + \": Finds drug in inventory using date.\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" \"Example: \" + COMMAND_WORD + \" /d panadol\" ;","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" * Success message displayed after successfully finding drugs in the inventory.","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" private final String keyword;","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" private final String criterion;","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" * Creates a FindCommand with the specified keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" * @param keyword The keyword to search for in the inventory.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" public FindCommand(String keyword, String criterion) {","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" this.keyword \u003d keyword.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" this.criterion \u003d criterion;","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" private static boolean matches(String criterion, String keyword, StockEntry entry) {","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" if (criterion.equals(\"/n\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" return entry.getDrug().getName().toLowerCase().contains(keyword);","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" return entry.getDrug().getExpiryDate().toLowerCase().contains(keyword);","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"Barbaracwx"},"content":" * Executes the \u0027find\u0027 command, searching for drugs that match the keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"Barbaracwx"},"content":" * @return A CommandResult containing the outcome of the command execution.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"Barbaracwx"},"content":" if (keyword \u003d\u003d null || keyword.trim().isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e entries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e foundEntries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" for (StockEntry entry : entries) {","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" if (matches(this.criterion, this.keyword, entry)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" foundEntries.add(entry);","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, foundEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":15,"TeoHaoZhi":12,"Barbaracwx":52}},{"path":"src/main/java/seedu/stocker/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Shows help instructions.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"help\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows program usage instructions. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" System.lineSeparator() + AddCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + DeleteCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + HelpCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ListCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" + System.lineSeparator() + ShowStockLevelCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + FindCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + AddToCartCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + CheckOutCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + ViewCartCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + LoginCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-20"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + RegisterCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + SaveCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + AddVendorCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ListVendorCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ExitCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" );","lastModifiedDate":"2023-10-09"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":21,"TeoHaoZhi":25,"Barbaracwx":3}},{"path":"src/main/java/seedu/stocker/commands/IncorrectCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Represents an incorrect command. Upon execution, produces some feedback to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class IncorrectCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public final String feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public IncorrectCommand(String feedbackToUser) {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(feedbackToUser);","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":17,"TeoHaoZhi":1,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":" * Represents a command to list all drugs in the inventory.","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":" * This command retrieves the list of drugs from the inventory and provides it as part of the command result.","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"azfarulmatin"},"content":" * If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all drug information that is being \"","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"tracked by the system. \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"azfarulmatin"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all drugs in the inventory.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"azfarulmatin"},"content":" * Executes the list command.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":" * @return A CommandResult containing the success message and the list of drugs.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"azfarulmatin"},"content":" // Assertion: Check if the inventory is properly initialised","lastModifiedDate":"2023-10-20"},{"lineNumber":30,"author":{"gitId":"azfarulmatin"},"content":" assert inventory !\u003d null : \"Inventory should be initialised before executing ListCommand.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"azfarulmatin"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e stockEntries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"azfarulmatin"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" if (stockEntries.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"azfarulmatin"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"azfarulmatin"},"content":" } else {","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"azfarulmatin"},"content":" // Return a CommandResult with the success message and the list of drugs","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, stockEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":3,"azfarulmatin":25,"TeoHaoZhi":13,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/ListVendorCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.Vendor;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Generates a list of vendors tracked by system","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class ListVendorCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"listVendors\";","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all vendor information that is being \"","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + \"tracked by the system.\" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all vendors in the list.\";","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" * Executes the list command.","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" * @return A CommandResult containing the success message and the list of drugs.","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" List\u003cVendor\u003e vendorEntries \u003d VendorsList.getVendorEntries();","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" if (vendorEntries.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" // Return a CommandResult with the success message and the list of drugs","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, vendorEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":40}},{"path":"src/main/java/seedu/stocker/commands/LoginCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-20"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Login existing user into system.","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class LoginCommand extends Command {","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"login\";","lastModifiedDate":"2023-10-20"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Login new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Welcome back!\" ;","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException, StockerException {","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" system.loadExistingUsers();","lastModifiedDate":"2023-10-20"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" system.loginExistingUser();","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-20"}],"authorContributionMap":{"TeoHaoZhi":28,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/RegisterCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-20"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Registers new user into login system.","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class RegisterCommand extends Command {","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"register\";","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Register new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New User Created.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException, StockerException {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" system.loadExistingUsers();","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" system.newUserCreator();","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-20"}],"authorContributionMap":{"TeoHaoZhi":26,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/SaveCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" * Backups existing drug list inventory into txt file to be uploaded later.","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"public class SaveCommand extends Command{","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"save\";","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Saves existing druglist that is loaded \"","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" +\"into inventory when system is booted up.\"","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Drugs successfully saved.\";","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e entries\u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" Storage storageManager \u003d new Storage(inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" storageManager.writeToFile(\"drugs.txt\", \"\");","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" for(int i \u003d 0; i \u003c entries.size(); i +\u003d 1){","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" storageManager.appendToFile(\"drugs.txt\",entries.get(i).toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"martinschnder":5,"TeoHaoZhi":33,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/ShowStockLevelCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import java.util.Comparator;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":" * Represents a command to display a report of stock levels sorted by quantity in ascending order.","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"public class ShowStockLevelCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" public static final String COMMAND_WORD \u003d \"stocklevel\";","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all drugs by quantity level \"","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" + \"tracked by the system in ascending order. \" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Stock Level Report (Sorted by Quantity)\";","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" * Executes the \"stocklevel\" command. Displays a report of stock levels sorted by quantity in ascending order.","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" * @return A CommandResult containing the success message and a list of stock entries sorted by quantity.","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" // Assertion: Check if the inventory is properly initialized","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":" assert inventory !\u003d null : \"Inventory should be initialized before executing ShowStockLevelCommand.\";","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"Barbaracwx"},"content":" List\u003cStockEntry\u003e stockEntries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" if (stockEntries.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" // Sort the stockEntries by quantity in ascending order","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" stockEntries.sort(Comparator.comparingLong(StockEntry::getQuantity));","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" // Create a new list to store the sorted stockEntries","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" List\u003cStockEntry\u003e arrangedListbyQuantity \u003d new ArrayList\u003c\u003e(stockEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, arrangedListbyQuantity);","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":1,"Barbaracwx":46}},{"path":"src/main/java/seedu/stocker/commands/ViewCartCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Represents a command to list all drugs in the current cart.","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * This command retrieves the list of drugs from the current cart and provides it as part of the command result.","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" * If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"public class ViewCartCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"viewcart\";","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \": View the current cart items.\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all the content of your cart. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_FAILURE \u003d \"Your cart is empty. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" * Execute the ViewCartCommand","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" if (currentCart.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_FAILURE);","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return new CommandResult(MESSAGE_SUCCESS, currentCart.getCurrentCart());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":29,"TeoHaoZhi":1,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/common/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.common;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Container for user visible messages.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class Messages {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_WELCOME \u003d \"Welcome to your Stocker!\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_GOODBYE \u003d \"Good bye!\";","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_LOGIN_WELCOME \u003d \"Welcome! \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Key in register or login based on your needs \\n\"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"1.Register user \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + \"2.Login\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USERNAME_INPUT \u003d \"Enter your username:\";","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_PASSWORD_INPUT \u003d \"Enter Your Password:\";","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESSFUL_REGISTRATION \u003d \"Registration successful.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESSFUL_LOGIN \u003d \"Login successful.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_INVALID_CHOICE \u003d \"Invalid Input, enter register or login only!\";","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USER_ALREADY_EXIST \u003d \"User already exists. Please make user with \"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + \"different name or login instead\";","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_INVALID_USERNAME_OR_PASSWORD \u003d \"Invalid username or password. Please try again.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_NO_BLANK_NAME_ALLOWED \u003d \"No blank name allowed. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Enter your desired username again\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_NO_BLANK_PASSWORD_ALLOWED \u003d \"No blank password allowed. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Enter your desired password again\";","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_INIT_FAILED \u003d \"Failed to initialise Stocker application. Exiting...\";","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":13,"TeoHaoZhi":16}},{"path":"src/main/java/seedu/stocker/drugs/Cart.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class Cart {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" private ArrayList\u003cCartEntry\u003e entries;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public Cart() {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.entries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public void addEntry(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" this.entries.add(new CartEntry(key, quantity));","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public List\u003cCartEntry\u003e getCurrentCart() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" return this.entries;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" public boolean isEmpty() {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" return entries.isEmpty();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" public void checkOut(SalesList salesList, Inventory inventory) {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" salesList.addSale(this);","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" for (CartEntry entry : entries) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" inventory.removeFromStock(entry.getKey(), entry.getQuantity());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" this.entries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":32}},{"path":"src/main/java/seedu/stocker/drugs/CartEntry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"public class CartEntry {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" private String key;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" private long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public CartEntry(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" this.key \u003d key;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public String getKey() {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" return this.key;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public long getQuantity() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" return this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" * Returns a string representation of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the key and quantity date of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" public String toString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return \"Key: \" + this.key","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" + \", Quantity: \" + this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":31}},{"path":"src/main/java/seedu/stocker/drugs/Drug.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class Drug {","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":" public String name;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":" String expiryDate;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public Drug(String name, String expiryDate) {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.expiryDate \u003d expiryDate;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"azfarulmatin"},"content":" * Gets the name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" * @return The name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"azfarulmatin"},"content":" public String getName() {","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"azfarulmatin"},"content":" return name;","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"azfarulmatin"},"content":" * Sets the name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":" * @param name The new name to set for the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"azfarulmatin"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"azfarulmatin"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"azfarulmatin"},"content":" * Gets the expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"azfarulmatin"},"content":" * @return The expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"azfarulmatin"},"content":" public String getExpiryDate() {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"azfarulmatin"},"content":" return expiryDate;","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"azfarulmatin"},"content":" * Sets the expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"azfarulmatin"},"content":" * @param expiryDate The new expiry date to set for the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"azfarulmatin"},"content":" public void setExpiryDate(String expiryDate) {","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"azfarulmatin"},"content":" this.expiryDate \u003d expiryDate;","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"azfarulmatin"},"content":" * Returns a string representation of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the name and expiry date of the drug.","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"azfarulmatin"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"azfarulmatin"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" return \"Name: \" + name + \", Expiry Date: \" + expiryDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":5,"azfarulmatin":43,"TeoHaoZhi":11}},{"path":"src/main/java/seedu/stocker/drugs/Inventory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.DrugNotFoundException;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"public class Inventory {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public HashMap\u003cString, StockEntry\u003e stock;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public Inventory() {","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" this.stock \u003d new HashMap\u003cString, StockEntry\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public void addNewDrug(String key, Drug drug, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" this.stock.put(key, new StockEntry(drug, quantity));","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" public void removeFromStock(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.stock.get(key).decrQuantity(quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" public List\u003cStockEntry\u003e getStockEntries() {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" return this.stock.values().stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" .collect(Collectors.toCollection(ArrayList::new));","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" public StockEntry deleteDrug(String key) throws DrugNotFoundException {","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" if (this.stock.containsKey(key)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" return stock.remove(key);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" throw new DrugNotFoundException(\"\");","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":35,"azfarulmatin":3}},{"path":"src/main/java/seedu/stocker/drugs/SalesList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class SalesList {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" private ArrayList\u003cCart\u003e validatedCarts;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public SalesList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.validatedCarts \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void addSale(Cart cart) {","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" this.validatedCarts.add(cart);","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public List\u003cCart\u003e getAllSales() {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" return this.validatedCarts;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":22}},{"path":"src/main/java/seedu/stocker/drugs/StockEntry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"public class StockEntry {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":" private final Drug drug;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" private long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public StockEntry(Drug drug, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.drug \u003d drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public Drug getDrug() {","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" return this.drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public long getQuantity() {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" return this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" public void setQuantity(long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" public void incrQuantity(long delta) {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" this.quantity +\u003d delta;","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" public void decrQuantity(long delta) {","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" assert(this.quantity \u003e delta);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" this.quantity -\u003d delta;","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" * Returns a string representation of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the key and quantity date of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" public String toString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":" return \"Name: \" + this.drug.getName()","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" + \", Expiry date: \" + this.drug.getExpiryDate()","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" + \", Quantity: \" + this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":45,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/exceptions/DrugNotFoundException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Signals that the drug has not been found in a specific list.","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class DrugNotFoundException extends Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" public DrugNotFoundException(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" super(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":10}},{"path":"src/main/java/seedu/stocker/exceptions/InvalidDrugFormatException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Signals that the laod function cannot read the serialized drug.","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class InvalidDrugFormatException extends Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" public InvalidDrugFormatException(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" super(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":10}},{"path":"src/main/java/seedu/stocker/exceptions/StockerException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class StockerException extends Exception{","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"TeoHaoZhi":4}},{"path":"src/main/java/seedu/stocker/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.parser;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.AddCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.Command;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.DeleteCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.ExitCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.FindCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.HelpCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.IncorrectCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ListCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.LoginCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.RegisterCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.SaveCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.AddVendorCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ShowStockLevelCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ViewCartCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.AddToCartCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.CheckOutCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.ListVendorCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-09"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"public class Parser {","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public Parser() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" * Parses user input into command for execution.","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" * @param userInput full user input string","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" * @return the command based on the user input","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" public Command parseCommand(String userInput) throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" String[] words \u003d userInput.trim().split(\" \", 2); // split the input into command and arguments","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" if (words.length \u003d\u003d 0) {","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" final String commandWord \u003d words[0];","lastModifiedDate":"2023-10-09"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" final String arguments \u003d userInput.replaceFirst(commandWord, \"\").trim();","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"martinschnder"},"content":" switch (commandWord) {","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" case AddCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" return prepareAddCommand(arguments);","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"Barbaracwx"},"content":" case FindCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":" return prepareFindCommand(arguments);","lastModifiedDate":"2023-10-20"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" case AddToCartCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" return prepareAddToCartCommand(arguments);","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"karishma-t"},"content":" case DeleteCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"karishma-t"},"content":" return new DeleteCommand(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" case CheckOutCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" return new CheckOutCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"martinschnder"},"content":" case ExitCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" return new ExitCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":" case HelpCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"martinschnder"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":68,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"azfarulmatin"},"content":" case ListCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"azfarulmatin"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"azfarulmatin"},"content":" ","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"martinschnder"},"content":" case ViewCartCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" return new ViewCartCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":" case RegisterCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-20"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" return new RegisterCommand();","lastModifiedDate":"2023-10-20"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":" case LoginCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-20"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" return new LoginCommand();","lastModifiedDate":"2023-10-20"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" case SaveCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" return new SaveCommand();","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":" ","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":" case AddVendorCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" return prepareAddVendorCommand(arguments);","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"Barbaracwx"},"content":" case ShowStockLevelCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"Barbaracwx"},"content":" return new ShowStockLevelCommand();","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":" case ListVendorCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" return new ListVendorCommand();","lastModifiedDate":"2023-10-28"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":93,"author":{"gitId":"martinschnder"},"content":" default:","lastModifiedDate":"2023-10-09"},{"lineNumber":94,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":95,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":96,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":" * Parses arguments in the context of the add drug command.","lastModifiedDate":"2023-10-09"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":" * @param args full command args string","lastModifiedDate":"2023-10-09"},{"lineNumber":102,"author":{"gitId":"martinschnder"},"content":" * @return the prepared command","lastModifiedDate":"2023-10-09"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":104,"author":{"gitId":"martinschnder"},"content":" private Command prepareAddCommand(String args) {","lastModifiedDate":"2023-10-09"},{"lineNumber":105,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"/n (.*) /d (.*) /q (.*)\");","lastModifiedDate":"2023-10-09"},{"lineNumber":107,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(args);","lastModifiedDate":"2023-10-09"},{"lineNumber":108,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 3) {","lastModifiedDate":"2023-10-09"},{"lineNumber":109,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-09"},{"lineNumber":110,"author":{"gitId":"martinschnder"},"content":" String expiryDate \u003d matcher.group(2);","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"martinschnder"},"content":" Long quantity \u003d Long.parseLong(matcher.group(3));","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"martinschnder"},"content":" return new AddCommand(name, expiryDate, quantity);","lastModifiedDate":"2023-10-09"},{"lineNumber":113,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":114,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":115,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":116,"author":{"gitId":"martinschnder"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":120,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"martinschnder"},"content":" * Parses arguments in the context of the add drug to cart command.","lastModifiedDate":"2023-10-23"},{"lineNumber":123,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"martinschnder"},"content":" * @param args full command args string","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"martinschnder"},"content":" * @return the prepared command","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":127,"author":{"gitId":"martinschnder"},"content":" private Command prepareAddToCartCommand(String args) {","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"/n (.*) /q (.*)\");","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(args);","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 2) {","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"Barbaracwx"},"content":" long quantity \u003d Long.parseLong(matcher.group(2));","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"martinschnder"},"content":" return new AddToCartCommand(name, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":138,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":139,"author":{"gitId":"Barbaracwx"},"content":" private Command prepareFindCommand(String args) {","lastModifiedDate":"2023-10-20"},{"lineNumber":140,"author":{"gitId":"Barbaracwx"},"content":" String[] findArgs \u003d args.split(\" \", 2);","lastModifiedDate":"2023-10-20"},{"lineNumber":141,"author":{"gitId":"Barbaracwx"},"content":" if (findArgs.length \u003d\u003d 2) {","lastModifiedDate":"2023-10-20"},{"lineNumber":142,"author":{"gitId":"Barbaracwx"},"content":" String criterion \u003d findArgs[0];","lastModifiedDate":"2023-10-20"},{"lineNumber":143,"author":{"gitId":"Barbaracwx"},"content":" String keyword \u003d findArgs[1];","lastModifiedDate":"2023-10-20"},{"lineNumber":144,"author":{"gitId":"Barbaracwx"},"content":" if (criterion.equals(\"/n\") || criterion.equals(\"/d\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":145,"author":{"gitId":"Barbaracwx"},"content":" return new FindCommand(keyword, criterion);","lastModifiedDate":"2023-10-20"},{"lineNumber":146,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-20"},{"lineNumber":147,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-20"},{"lineNumber":148,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":149,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-20"},{"lineNumber":150,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-20"},{"lineNumber":151,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":152,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":153,"author":{"gitId":"TeoHaoZhi"},"content":" private Command prepareAddVendorCommand (String args) throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"TeoHaoZhi"},"content":" String[] vendorArgs \u003d args.split(\" \",1);","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"TeoHaoZhi"},"content":" String vendorName \u003d vendorArgs[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"TeoHaoZhi"},"content":" try {","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"TeoHaoZhi"},"content":" if (vendorName.equals(null) || vendorName.equals(\"\") || vendorName.equals(\" \")) {","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"TeoHaoZhi"},"content":" throw new IOException();","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"TeoHaoZhi"},"content":" } catch(Exception invalidInput){","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"TeoHaoZhi"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,AddVendorCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"TeoHaoZhi"},"content":" return new AddVendorCommand(vendorName);","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"karishma-t":4,"martinschnder":86,"azfarulmatin":4,"TeoHaoZhi":39,"Barbaracwx":32}},{"path":"src/main/java/seedu/stocker/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.storage;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.InvalidDrugFormatException;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" * Represents an object to handle writing to txt files and appending to them.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"public class Storage {","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private Inventory inventory;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public Storage(Inventory inventory) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d inventory;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" * Writes to the first line of a txt file","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" * can be used to clear a txt file as well.","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath relative path of file to write to","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" * @param textToAdd what to write to the file","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if invalid input is entered","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" public void writeToFile(String filePath, String textToAdd) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" FileWriter fw \u003d new FileWriter(filePath);","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" fw.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" * Appends given text to next line of txt file.","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath relative path of file to write to","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" * @param textToAppend what to write to the file","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if invalid input is given","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" public void appendToFile(String filePath, String textToAppend) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedWriter bf \u003d new BufferedWriter(new FileWriter(filePath,true));","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":" bf.write(textToAppend);","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":" bf.newLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":" bf.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":" * Loads drugs from txt file into inventory system.","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath Relative path to file containing list of drugs to be loaded.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if file is not found","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" public void loadFileContents(String filePath) throws IOException, InvalidDrugFormatException {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" File f \u003d new File(filePath);","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" Scanner reader \u003d new Scanner(f);","lastModifiedDate":"2023-10-21"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"Name: (.*), Expiry date: (.*), Quantity: (.*)\");","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" while(reader.hasNextLine()){","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(reader.nextLine());","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 3) {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" String expiryDate \u003d matcher.group(2);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":" Long quantity \u003d Long.parseLong(matcher.group(3));","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"martinschnder"},"content":" Drug drug \u003d new Drug(name, expiryDate);","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(name, drug, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"martinschnder"},"content":" throw new InvalidDrugFormatException(\"\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":26,"TeoHaoZhi":59}},{"path":"src/main/java/seedu/stocker/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.io.InputStream;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Optional;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.CommandResult;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_USERNAME_INPUT;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_USER_ALREADY_EXIST;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_LOGIN_WELCOME;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_SUCCESSFUL_LOGIN;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_NO_BLANK_NAME_ALLOWED;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_NO_BLANK_PASSWORD_ALLOWED;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_PASSWORD_INPUT;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_WELCOME;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_CHOICE;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_GOODBYE;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_USERNAME_OR_PASSWORD;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_SUCCESSFUL_REGISTRATION;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INIT_FAILED;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"public class Ui {","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * Offset required to convert between 1-indexing and 0-indexing.","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" public static final int DISPLAYED_INDEX_OFFSET \u003d 1;","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" * A decorative prefix added to the beginning of lines printed by Jerry","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" private static final String LINE_PREFIX \u003d \"|| \";","lastModifiedDate":"2023-10-09"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" private static final String DIVIDER \u003d \"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\";","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" * A platform independent line separator.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" private static final String LS \u003d System.lineSeparator();","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" * Format of indexed list item","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" private static final String MESSAGE_INDEXED_LIST_ITEM \u003d \"\\t%1$d. %2$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" private final PrintStream out;","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" public Ui() {","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" this(System.in, System.out);","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" public Ui(InputStream in, PrintStream out) {","lastModifiedDate":"2023-10-09"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" this.in \u003d new Scanner(in);","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" this.out \u003d out;","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" * Prompts for the command and reads the text entered by the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"martinschnder"},"content":" * Ignores empty, pure whitespace, and comment lines.","lastModifiedDate":"2023-10-09"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":" * Echos the command back to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"martinschnder"},"content":" * @return command (full line) entered by the user","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" out.print(LINE_PREFIX + \"Enter command: \");","lastModifiedDate":"2023-10-09"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" String fullUserInput \u003d in.nextLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" return fullUserInput;","lastModifiedDate":"2023-10-14"},{"lineNumber":75,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":" * Shows message(s) to the user","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":" public void showToUser(String... message) {","lastModifiedDate":"2023-10-09"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":" for (String m : message) {","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":" out.println(LINE_PREFIX + m.replace(\"\\n\", LS + LINE_PREFIX));","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" public void showLoginMessage() {","lastModifiedDate":"2023-10-12"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(DIVIDER, MESSAGE_LOGIN_WELCOME, DIVIDER);","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":" public void showUsernameMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_USERNAME_INPUT);","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":" public void showPasswordMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_PASSWORD_INPUT);","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":" public void showSuccessfulRegistrationMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_SUCCESSFUL_REGISTRATION);","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":" public void showSuccessfulLoginMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_SUCCESSFUL_LOGIN);","lastModifiedDate":"2023-10-14"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":" public void showInvalidChoiceMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_INVALID_CHOICE);","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":" public void showUserAlreadyExistMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_USER_ALREADY_EXIST);","lastModifiedDate":"2023-10-14"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":" public void showEnterChoiceAgainMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_LOGIN_WELCOME);","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":" public void showInvalidUsernameOrPasswordMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_INVALID_USERNAME_OR_PASSWORD);","lastModifiedDate":"2023-10-14"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":" public void showBlankNameMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_NO_BLANK_NAME_ALLOWED);","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":" public void showBlankPasswordMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_NO_BLANK_PASSWORD_ALLOWED);","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":130,"author":{"gitId":"martinschnder"},"content":" public void showWelcomeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":131,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_WELCOME, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":132,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":134,"author":{"gitId":"martinschnder"},"content":" public void showGoodbyeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":135,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_GOODBYE, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":136,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":137,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":138,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":139,"author":{"gitId":"martinschnder"},"content":" * Shows the result of a command execution to the user. Includes additional formatting to demarcate different","lastModifiedDate":"2023-10-09"},{"lineNumber":140,"author":{"gitId":"martinschnder"},"content":" * command execution segments.","lastModifiedDate":"2023-10-09"},{"lineNumber":141,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":142,"author":{"gitId":"martinschnder"},"content":" public \u003cT\u003evoid showResultToUser(CommandResult\u003cT\u003e result) {","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"martinschnder"},"content":" final Optional\u003cList\u003cT\u003e\u003e resultElements \u003d result.getRelevantElements();","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"martinschnder"},"content":" if (resultElements.isPresent()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"martinschnder"},"content":" showElementsListView(resultElements.get());","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":147,"author":{"gitId":"martinschnder"},"content":" showToUser(result.feedbackToUser, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":148,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":149,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":" * Shows a list of strings to the user, formatted as an indexed list.","lastModifiedDate":"2023-10-14"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":153,"author":{"gitId":"martinschnder"},"content":" private void showToUserAsIndexedList(List\u003cString\u003e list) {","lastModifiedDate":"2023-10-09"},{"lineNumber":154,"author":{"gitId":"martinschnder"},"content":" showToUser(getIndexedListForViewing(list));","lastModifiedDate":"2023-10-09"},{"lineNumber":155,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":156,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":157,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":158,"author":{"gitId":"martinschnder"},"content":" * Shows a list of drugs to the user, formatted as an indexed list.","lastModifiedDate":"2023-10-09"},{"lineNumber":159,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":160,"author":{"gitId":"martinschnder"},"content":" private \u003cT\u003evoid showElementsListView(List\u003cT\u003e elements) {","lastModifiedDate":"2023-10-23"},{"lineNumber":161,"author":{"gitId":"martinschnder"},"content":" final List\u003cString\u003e formattedElements \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":162,"author":{"gitId":"martinschnder"},"content":" for (int i \u003d 0; i \u003c elements.size(); i++) {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"martinschnder"},"content":" formattedElements.add(elements.get(i).toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":165,"author":{"gitId":"martinschnder"},"content":" showToUserAsIndexedList(formattedElements);","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":167,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":168,"author":{"gitId":"martinschnder"},"content":" public void showInitFailedMessage() {","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_INIT_FAILED, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":173,"author":{"gitId":"TeoHaoZhi"},"content":" * Formats a list of strings as a viewable indexed list.","lastModifiedDate":"2023-10-14"},{"lineNumber":174,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":175,"author":{"gitId":"martinschnder"},"content":" public static String getIndexedListForViewing(List\u003cString\u003e listItems) {","lastModifiedDate":"2023-10-10"},{"lineNumber":176,"author":{"gitId":"martinschnder"},"content":" final StringBuilder formatted \u003d new StringBuilder();","lastModifiedDate":"2023-10-09"},{"lineNumber":177,"author":{"gitId":"martinschnder"},"content":" int displayIndex \u003d DISPLAYED_INDEX_OFFSET;","lastModifiedDate":"2023-10-09"},{"lineNumber":178,"author":{"gitId":"martinschnder"},"content":" for (String listItem : listItems) {","lastModifiedDate":"2023-10-09"},{"lineNumber":179,"author":{"gitId":"martinschnder"},"content":" formatted.append(getIndexedListItem(displayIndex, listItem)).append(LS);","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"martinschnder"},"content":" displayIndex++;","lastModifiedDate":"2023-10-09"},{"lineNumber":181,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":182,"author":{"gitId":"martinschnder"},"content":" return formatted.toString();","lastModifiedDate":"2023-10-09"},{"lineNumber":183,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":184,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":185,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":186,"author":{"gitId":"martinschnder"},"content":" * Formats a string as a viewable indexed list item.","lastModifiedDate":"2023-10-09"},{"lineNumber":187,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":188,"author":{"gitId":"martinschnder"},"content":" * @param visibleIndex visible index for this listing","lastModifiedDate":"2023-10-09"},{"lineNumber":189,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":190,"author":{"gitId":"martinschnder"},"content":" private static String getIndexedListItem(int visibleIndex, String listItem) {","lastModifiedDate":"2023-10-09"},{"lineNumber":191,"author":{"gitId":"martinschnder"},"content":" return String.format(MESSAGE_INDEXED_LIST_ITEM, visibleIndex, listItem);","lastModifiedDate":"2023-10-09"},{"lineNumber":192,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":193,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":194,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":97,"TeoHaoZhi":97}},{"path":"src/main/java/seedu/stocker/vendors/Vendor.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.vendors;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class Vendor {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":" public String name;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":" public Vendor(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" * Gets the name of the vendor.","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" * @return The name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public String getName() {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" return name;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" * Sets the name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" * @param name The new name to set for the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * Returns a string representation of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" * @return A string containing the name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" public String toString() {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" return \"Name: \" + name;","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":38}},{"path":"src/main/java/seedu/stocker/vendors/VendorsList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.vendors;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"public class VendorsList {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" public static ArrayList\u003cVendor\u003e vendorArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public VendorsList(){","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" vendorArrayList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" * Adds new vendor to vendor list","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" * @param vendor","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" public static void addNewVendor(Vendor vendor){","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" vendorArrayList.add(vendor);","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" * Gets details of all vendors","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" * @return","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public static List\u003cVendor\u003e getVendorEntries() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" return vendorArrayList.stream()","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" .collect(Collectors.toCollection(ArrayList::new));","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":32}},{"path":"src/test/java/seedu/stocker/StockerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"class StockerTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"TeoHaoZhi":2,"-":10}},{"path":"src/test/java/seedu/stocker/commands/AddCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"class AddCommandTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" AddCommand command \u003d new AddCommand(\"Paracetamol\", \"12/05/2024\", 12L); ","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" command.setData(new Inventory(), new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"New drug added in the inventory: Paracetamol\";","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" assertEquals(command.execute().feedbackToUser, new CommandResult(expectedOutput).feedbackToUser);","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" assertEquals(command.execute().getRelevantElements(), new CommandResult(expectedOutput).getRelevantElements());","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"martinschnder":21}},{"path":"src/test/java/seedu/stocker/commands/AddToCartCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"class AddToCartCommandTest {","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" AddCommand command \u003d new AddCommand(\"Paracetamol\", \"12/05/2024\", 12L); ","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" Cart cart \u003d new Cart();","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" assertEquals(0, cart.getCurrentCart().size());","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" SalesList salesList \u003d new SalesList();","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, salesList, cart);","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" command.execute();","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" AddToCartCommand command2 \u003d new AddToCartCommand(\"paracetamol\", 2L);","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" command2.setData(inventory, salesList, cart);","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" command2.execute();","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" assertEquals(command2.execute().feedbackToUser, \"New drug added in the current cart: Paracetamol\");","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"martinschnder":27}},{"path":"src/test/java/seedu/stocker/commands/DeleteCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"karishma-t"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"karishma-t"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"karishma-t"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"karishma-t"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"karishma-t"},"content":"class DeleteCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"karishma-t"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"karishma-t"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"karishma-t"},"content":" // Create an inventory and add a drug to it","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"karishma-t"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" Drug doliprane \u003d new Drug(\"Doliprane\", \"12/06/2035\");","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(\"doliprane\", doliprane, 52L);","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"karishma-t"},"content":" // Create a DeleteCommand for the drug","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"karishma-t"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(\"Doliprane\");","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" deleteCommand.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"karishma-t"},"content":" // Test the execution of the DeleteCommand","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"Drug removed from inventory: Doliprane\";","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"karishma-t"},"content":" assertEquals(deleteCommand.execute().feedbackToUser, expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"karishma-t"},"content":" // Ensure that the drug is no longer in the inventory","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" assertEquals(0, inventory.getStockEntries().size());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"karishma-t"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"karishma-t":25,"martinschnder":7}},{"path":"src/test/java/seedu/stocker/commands/FindCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" * JUnit test class for the FindCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"class FindCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a keyword for drug names.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestByName() {","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a keyword","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"Pa\", \"/n\");","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" Drug drug2 \u003d new Drug(\"Panadol\", \"04/07/2030\");","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"Panadol\", drug2, 20L);","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d \"1. Name: Panadol, Expiry date: 04/07/2030, Quantity: 20\" + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with the modified inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a keyword for drug expiry dates.","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestByExpiryDate() {","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a keyword for expiry date","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"01/03/2027\", \"/d\");","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"Barbaracwx"},"content":" Drug drug1 \u003d new Drug(\"Paracetamol\", \"01/03/2027\");","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"Paracetamol\", drug1, 12L);","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"Barbaracwx"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output for drugs with matching expiry date","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d \"1. Name: Paracetamol, Expiry date: 01/03/2027, Quantity: 12\" + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"Barbaracwx"},"content":" \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with the modified inventory","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a null keyword, expecting an invalid format message.","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestWithNullKeyword() {","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a null keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"\", \"/n\");","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"Barbaracwx"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output for invalid format","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE);","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with a null keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"martinschnder":3,"Barbaracwx":91}},{"path":"src/test/java/seedu/stocker/commands/HelpCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"class HelpCommandTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" HelpCommand command \u003d new HelpCommand();","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" String expectedOutput \u003d System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"add: Adds a new drug to the drug list. Parameters: NAME, EXPIRY DATE, QUANTITY, \"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: add /n Doliprane /d 12/06/2035 /q 52\"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + \"delete: Removes a drug from drug list. Parameters: Name \"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: delete \u003cDrug Name\u003e\"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" + \"help: Shows program usage instructions. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: help\"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" + \"list: List all drug information that is being tracked by the system. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: list\"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" + \"stocklevel: List all drugs by quantity level tracked by the system in ascending order. \"","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: stocklevel\"","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" + \"find /n: Finds drug in inventory using name.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: find /n panadol\"","lastModifiedDate":"2023-10-20"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" + \"find /d: Finds drug in inventory using date.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: find /d panadol\"","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" + \"addtocart: Adds a new drug to the current cart. Parameters: NAME, QUANTITY,\"","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" + \"Example: addtocart /n Doliprane /q 2\"","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" + \"checkout: Checks out current cart. Parameters:\"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" + \"Example: checkout\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" + \"viewcart: View the current cart items.\"","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" + \"Example: viewcart\"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" + \"login: Login new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: login\"","lastModifiedDate":"2023-10-20"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" + \"register: Register new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: register\"","lastModifiedDate":"2023-10-20"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":" + \"save: Saves existing druglist that is loaded into inventory when system is booted up.\"","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: save\"","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" + \"addVendor: Adds a new vendor to the vendors list. Parameter: NAME\"","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: addVendor Moderna\"","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" + \"listVendors: List all vendor information that is being tracked by the system.\"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: listVendors\"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" + \"bye: Exits the program.\"","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: bye\";","lastModifiedDate":"2023-10-11"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" assertEquals(new CommandResult(expectedOutput).feedbackToUser, command.execute().feedbackToUser);","lastModifiedDate":"2023-10-11"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"martinschnder":15,"TeoHaoZhi":73,"Barbaracwx":10}},{"path":"src/test/java/seedu/stocker/commands/ListCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"//test for list","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"azfarulmatin"},"content":"class ListCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"azfarulmatin"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"azfarulmatin"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"azfarulmatin"},"content":" ListCommand command \u003d new ListCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" command.setData(new Inventory(), new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" String expectedOutput \u003d \"The inventory is empty.\";","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"azfarulmatin"},"content":" assertEquals( new CommandResult(expectedOutput).feedbackToUser,command.execute().feedbackToUser);","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"azfarulmatin"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"martinschnder":3,"azfarulmatin":15,"Barbaracwx":1}},{"path":"src/test/java/seedu/stocker/ui/UiTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"class UiTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void getIndexedListForViewing_success() {","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"\\t1. Paracetamol\" + System.lineSeparator()","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" + \"\\t2. Ibuprofene\" + System.lineSeparator()","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" + \"\\t3. Doliprane\" + System.lineSeparator();","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" List\u003cString\u003e input \u003d Arrays.asList(\"Paracetamol\", \"Ibuprofene\", \"Doliprane\");","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" assertEquals(expectedOutput, new Ui().getIndexedListForViewing(input));","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":11,"TeoHaoZhi":11}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"FC ACTUAL.TXT ACTUAL.TXT \u003eNUL \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"TeoHaoZhi":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"diff EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"if [ ACTUAL.TXT \u003d\u003d ACTUAL.TXT ]","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"TeoHaoZhi":1,"-":22}}] +[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" mainClass.set(\"seedu.stocker.Stocker\")","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" archiveBaseName.set(\"stocker\")","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"martinschnder":2,"TeoHaoZhi":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"|-----------------------------|:----------------:|:------------------------------------------:|:--------------------------------:|","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"| ![](team/Martin.jpeg) | Martin Schneider | [Github](https://github.com/martinschnder) | [Portfolio](docs/team/Martin.md) |","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"| ![](team/Karishma.png) | Karishma | [Github](https://github.com/karishma-t) | [Portfolio](team/karishma.md) |","lastModifiedDate":"2023-10-06"},{"lineNumber":7,"author":{"gitId":"karishma-t"},"content":"| ![](team/Barbara_image.JPG) | Barbara Chong | [Github](https://github.com/barbaracwx) | [Portfolio](team/Barbara.md) |","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"| ![](team/HaoZhi.png) | Teo Hao Zhi | [Github](https://github.com/TeoHaoZhi) | [Portfolio](team/HaoZhi.md) |","lastModifiedDate":"2023-10-06"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":"| ![](team/Azfarul.JPG) | Azfarul Matin | [Github](https://github.com/azfarulmatin) | [Portfolio](team/Azfarul.md) |","lastModifiedDate":"2023-10-07"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"karishma-t":1,"martinschnder":1,"azfarulmatin":2,"TeoHaoZhi":5,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"1. Reference to AB-3 Developer Guide","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"- [Source](https://se-education.org/addressbook-level3/DeveloperGuide.html#proposed-undoredo-feature)","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"- Used as template to structure this Developer Guide","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"\u003cimg src\u003d\"UML Diagrams/Architecture_Diagram.png\" width\u003d\"280\"\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"The architecture diagram given above explains the high level design of the application. The diagram depicts the key","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"component of the application that enables it to provide its functionalities.","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"Majority of the app\u0027s work is done by the following components","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"- Login System : Handles user authentication before enabling app usage","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"- Ui : Asks for user input by handling output messages","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"- Parser : Makes sense of user input","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"- Commands : List of various commands","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"- CommandResult : Execution of various commands","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"The section below will explain in more detail the design considerations, implementations and rationale of the various","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"components listed above.","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"### Login System Component","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"The login system component seeks to authenticate and login existing users or register a new user.","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"#### Design considerations","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"- There must be a way to check and verify users with a master list","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":"- The search for existing users username and password must be fast","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":"- Master list must be stored separately on hard drive of machine","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"#### Implementation and rationale","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"The login system class works in the following way. Upon booting up the application, a txt file","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"containing a current list of existing users will be loaded into a users attribute within the class in the form of a hash","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"table.When a user attempts to login to their account, the entered username and password is checked against","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"the current list of users in the hashtable. If the username and password matches, the user is logged in.","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":"As for registering new users, newly inputted username and password will be saved to the users attribute and this","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":"pair of username and password is then appended to the txt file containing current users. The updated user list will be","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"loaded into the users attribute when the application is booted up again.","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"The login system class uses the below methods to achieve its functionality","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":"- `authenticateUserChoice()` -Decides whether the user chooses to register or login","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":"- `newUserCreator()` -Creates a new user for future login","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":"- `loginExistingUser()` -Login existing user","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":"- `loadExistingUsers()` -Load existing users into hashtable for reference","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":"Given below is an example of how the login system class works.","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"When the user first launches the programme, the Stocker object will be instantiated. The object will","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":"invoke its own `run()` method which will call its own `start()` method. The Stocker object then instantiates a","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":"new UI object which displays the login message by invoking `showLoginMessage()` method. At this point, Stocker object","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":"will also instantiate a new login system object.","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"The login system object will invoke its own `run()` method to begin the login process. This method begins by loading","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":"existing users into the users attribute of the login system class by `loadExistingusers()` method. it then invokes","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":"`authenticateUserChoice()` to receive an input from the user to whether register or login a user. Based on the input of","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":"the user, either `newUserCreator()` is launched or `loginExistingUser()` methods will be called to register or login a","lastModifiedDate":"2023-10-21"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":"user.","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":"The following sequence diagram shows how the login system class works when the program is launched.","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"\u003cimg src\u003d\"UML Diagrams/StockerToLoginSystem.png\" width\u003d\"280\"\u003e","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"martinschnder"},"content":"### Main data structures","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":"#### Implementation","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"##### Drug","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"martinschnder"},"content":"The Drug class is very basic class for now. It only contains the product name as well as it\u0027s expiry date, but we will soon add some new properties such as product description, etc...","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"martinschnder"},"content":"##### Inventory","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"martinschnder"},"content":"The Inventory class is used to keep track of the quantity of product in stock. The hash map seemed to be the most appropriate data structure to match a product id to a quantity and a product entity which are encapsulated in a \"StockEntry\" class.","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"martinschnder"},"content":"##### Cart","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"martinschnder"},"content":"The Cart class is used to represent an ongoing transaction : to perform a sale, the vendor can add different products with their respective quantities in a cart which will be deducted from the inventory at the checkout.","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"martinschnder"},"content":"To represent this, we chose to use an arraylist of \"CartEntry\" classes which reprensent a product/quantity tuple.","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":"##### SalesList","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":"The SalesList is used to represent every past sales in order to create some statistics and reports. This class is only a list of subclasses representing validated carts.","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"martinschnder"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"Barbaracwx"},"content":"## Commands","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"Barbaracwx"},"content":"## 1. Find Function","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function is designed to enable users to search for specific drugs in the inventory using either the drug\u0027s","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"Barbaracwx"},"content":"name or the drugs expiry date. This component assists in locating and retrieving relevant drugs efficiently.","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"Barbaracwx"},"content":"**Design Considerations**","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"Barbaracwx"},"content":"The design of the \"Find\" function takes into account the following considerations:","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"Barbaracwx"},"content":"1. **Search Criteria:** The function must provide users with the ability to specify each criteria, such as keywords or","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"Barbaracwx"},"content":" attributes, to filter the items they are looking for.","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"Barbaracwx"},"content":"2. **Search Speed:** To enhance user experience, the search process should be fast and responsive, ensuring that users","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"Barbaracwx"},"content":" receive search results quickly.","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"Barbaracwx"},"content":"**Implementation and Rationale**","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function is implemented as follows:","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"Barbaracwx"},"content":"- **User-Defined Search Criteria:** Users provide search criteria, such as keywords, to define what they","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"Barbaracwx"},"content":" are looking for. The \"Find\" function processes these criteria to locate relevant items.","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"Barbaracwx"},"content":"- **Search Algorithm:** A robust search algorithm is employed to efficiently scan through the list of items and identify","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"Barbaracwx"},"content":" those","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"Barbaracwx"},"content":" that match the specified criteria.","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"Barbaracwx"},"content":"- **Result Presentation:** The function displays the search results, presenting users with a list of items that meet the","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"Barbaracwx"},"content":" search criteria, allowing them to quickly identify the items they are interested in.","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"Barbaracwx"},"content":"- **User-Friendly Interface:** The \"Find\" function is integrated into the user interface, making it easily accessible","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"Barbaracwx"},"content":" and intuitive for users to perform searches.","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"Barbaracwx"},"content":"- **Alternative Consideration:** During the design process, alternative approaches to searching are evaluated to ensure","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"Barbaracwx"},"content":" the","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"Barbaracwx"},"content":" most effective and user-friendly method is implemented.","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":142,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function offers a valuable way for users to narrow down their searches, find specific items of interest, and","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"Barbaracwx"},"content":"enhance the usability of the application.","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"Barbaracwx"},"content":"**Function Methods**","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":147,"author":{"gitId":"Barbaracwx"},"content":"The \"Find\" function includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-25"},{"lineNumber":148,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":149,"author":{"gitId":"Barbaracwx"},"content":"- `execute()` - This method is responsible for executing the \"Find\" command, searching for drugs that match the","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"Barbaracwx"},"content":" user-specified keyword within the inventory.","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"Barbaracwx"},"content":"- It returns a `CommandResult` containing the outcome of the command execution,","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"Barbaracwx"},"content":" which includes a success message and a list of found StockEntry objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"Barbaracwx"},"content":"**Example Usage**","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"Barbaracwx"},"content":"To illustrate how the \"Find\" function works, consider the following example usage:","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"Barbaracwx"},"content":"1. **User Input:** The user initiates the \"Find\" command by typing something like the following:","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"Barbaracwx"},"content":"`find /n panadol` - This command instructs the program to search for drugs in the inventory based on the name criteria","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"Barbaracwx"},"content":"and the keyword \"panadol.\"","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"Barbaracwx"},"content":"`find /d 12/03/2026` - This command instructs the program to search for drugs in the inventory based on the expiry date","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"Barbaracwx"},"content":"criteria and the keyword \"12/03/2026.\"","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"Barbaracwx"},"content":"2. **Method Execution:** The `execute()` method within the \"FindCommand\" class is called. It takes the provided keyword","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"Barbaracwx"},"content":" and criterion as input.","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"Barbaracwx"},"content":"3. **Search Process:** The method processes the search by iterating through the list of `StockEntry` objects in the","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"Barbaracwx"},"content":" inventory.","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"Barbaracwx"},"content":" For each entry, it checks if the `matches` method returns `true`, which means that the drug name or expiry date","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"Barbaracwx"},"content":" contains the given keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"Barbaracwx"},"content":"4. **Building Results:** As matching entries are found, they are added to a list called `foundEntries`.","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"Barbaracwx"},"content":"5. **Result Display:** The `CommandResult` is prepared, containing a success message (e.g., \"Listed all drugs with the","lastModifiedDate":"2023-10-25"},{"lineNumber":175,"author":{"gitId":"Barbaracwx"},"content":" keyword","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"Barbaracwx"},"content":" in the inventory.\") and the list of found `StockEntry` objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"Barbaracwx"},"content":"6. `User Feedback:` The result is then displayed to the user, showing a list of drugs in the inventory that match the","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"Barbaracwx"},"content":" specified keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"Barbaracwx"},"content":"The following sequence diagram shows how the Find Command function works. ","lastModifiedDate":"2023-10-25"},{"lineNumber":181,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"Barbaracwx"},"content":"\u003cimg src\u003d\"UML Diagrams/FindCommandDiagram.png\" width\u003d\"350\"\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"Barbaracwx"},"content":"Architecture Diagram of find command function:","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"Barbaracwx"},"content":"\u003cimg src\u003d\"UML Diagrams/FindCommandArchitectureDiagram.png\" width\u003d\"500\"\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":189,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"azfarulmatin"},"content":"## 2. ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` is responsible for listing all drugs in the inventory. This command retrieves the list of drugs from the inventory and provides it as part of the command result. If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":194,"author":{"gitId":"azfarulmatin"},"content":"### Design Considerations","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"azfarulmatin"},"content":"- **User-Friendly Listing:** The primary goal of the `ListCommand` is to provide a user-friendly way to list all drugs in the inventory, enhancing the user\u0027s experience in accessing inventory information.","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"azfarulmatin"},"content":"### Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` is implemented as follows:","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"azfarulmatin"},"content":"- **Retrieving Drug List:** The command retrieves the list of drugs from the inventory using the `getAllDrugs` method.","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"azfarulmatin"},"content":"- **Handling Empty Inventory:** It checks if the list of drugs is empty. If the inventory is empty, it returns a user-friendly message indicating that the inventory is empty.","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"azfarulmatin"},"content":"- **Listing Drugs:** If the inventory contains drugs, the command constructs a success message and includes the list of drugs in the command result.","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"azfarulmatin"},"content":"### Function Methods","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"azfarulmatin"},"content":"The `ListCommand` includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"azfarulmatin"},"content":"- `execute()`: This method is responsible for executing the `ListCommand`, listing all drugs in the inventory. It checks the inventory, prepares a user-friendly result message, and returns a `CommandResult` containing the outcome of the command execution, which includes a success message and the list of found `Drug` objects.","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"azfarulmatin"},"content":"### Example Usage","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"azfarulmatin"},"content":"To illustrate how the `ListCommand` works, consider the following example usage:","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"azfarulmatin"},"content":"1. **User Input:** The user initiates the `ListCommand` by entering the following command:","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"azfarulmatin"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"TeoHaoZhi"},"content":"## 3. Delete Command","lastModifiedDate":"2023-10-29"},{"lineNumber":223,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is designed to enable users to remove specific drugs from the inventory based on the drug\u0027s name. This component facilitates the management of the inventory by allowing users to remove drugs they no longer need, fully depleted or discontinued.","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"karishma-t"},"content":"**Design Considerations**","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"karishma-t"},"content":"The design of the \"Delete\" function takes into account the following considerations:","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"karishma-t"},"content":"1. **User-Specified Drug Name:** The function allows users to specify the drug name they want to delete from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"karishma-t"},"content":"2. **Data Integrity:** It ensures that the deletion operation maintains the integrity of the inventory data structure, updating it correctly.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"karishma-t"},"content":"**Implementation and Rationale**","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":236,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is implemented as follows:","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":238,"author":{"gitId":"karishma-t"},"content":"- **User-Defined Drug Name:** Users provide the name of the drug they wish to delete.","lastModifiedDate":"2023-10-26"},{"lineNumber":239,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":240,"author":{"gitId":"karishma-t"},"content":"- **Data Deletion Algorithm:** The function employs data deletion logic to remove the specified drug from the inventory. This involves identifying the drug based on the provided name and removing it from the list.","lastModifiedDate":"2023-10-26"},{"lineNumber":241,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":242,"author":{"gitId":"karishma-t"},"content":"- **Error Handling:** The function includes error handling to address scenarios where the specified drug is not found in the inventory. In such cases, an appropriate error message is generated.","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"karishma-t"},"content":"- **User Feedback:** Upon successful deletion, the function generates a success message confirming the removal of the drug.","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function is an essential feature for managing the inventory, allowing users to keep it up to date and remove unwanted or outdated drugs.","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"karishma-t"},"content":"**Function Methods**","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function includes the following method to achieve its functionality:","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"karishma-t"},"content":"- `execute()` - This method is responsible for executing the \"Delete\" command, removing the drug with the specified name from the inventory. It returns a `CommandResult` containing the outcome of the command execution, which includes a success message upon successful deletion or an error message if the drug is not found in the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"karishma-t"},"content":"**Example Usage**","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"karishma-t"},"content":"To illustrate how the \"Delete\" function works, consider the following example usage:","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"karishma-t"},"content":"1. **User Input:** The user initiates the \"Delete\" command by typing something like the following:","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"karishma-t"},"content":" `delete /n panadol`- This command instructs the program to remove the drug named \"paracetamol\" from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"karishma-t"},"content":"2. **Method Execution:** The `execute()` method within the \"DeleteCommand\" class is called. It takes the provided drug name as input.","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"karishma-t"},"content":"3. **Search Process:** The method processes the deletion by searching for the drug with the specified name in the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"karishma-t"},"content":"4. **Deletion Operation:** If the drug is found, it is removed from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"karishma-t"},"content":"5. **Success Message:** The `CommandResult` is prepared, containing a success message (e.g., \"Drug removed from inventory: paracetamol\").","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"karishma-t"},"content":"6. **User Feedback:** The result is displayed to the user, confirming the successful removal of the drug from the inventory.","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"karishma-t"},"content":"The \"Delete\" function provides a straightforward way for users to manage the inventory by removing specific drugs as needed.","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"karishma-t"},"content":"---","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"TeoHaoZhi"},"content":"## 4. Help Command","lastModifiedDate":"2023-10-29"},{"lineNumber":275,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":276,"author":{"gitId":"TeoHaoZhi"},"content":"The command is responsible for showing users a list of all possible commands.","lastModifiedDate":"2023-10-29"},{"lineNumber":277,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":278,"author":{"gitId":"TeoHaoZhi"},"content":"**Design Considerations**","lastModifiedDate":"2023-10-29"},{"lineNumber":279,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":280,"author":{"gitId":"TeoHaoZhi"},"content":"The command was designed to print out and show how to use a list of all possible commands in a neat and concise way.","lastModifiedDate":"2023-10-29"},{"lineNumber":281,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":282,"author":{"gitId":"TeoHaoZhi"},"content":"**Implementation and Rationale**","lastModifiedDate":"2023-10-29"},{"lineNumber":283,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":284,"author":{"gitId":"TeoHaoZhi"},"content":"Command will use java\u0027s system out to print out all required information with a blank line in between for clarity.","lastModifiedDate":"2023-10-29"},{"lineNumber":285,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":286,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-29"},{"lineNumber":287,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":288,"author":{"gitId":"TeoHaoZhi"},"content":"## 5. Save Command","lastModifiedDate":"2023-10-29"},{"lineNumber":289,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":290,"author":{"gitId":"TeoHaoZhi"},"content":"The save command was made as a means to backup user entered drug data into the hard drive of the computer to ensure ","lastModifiedDate":"2023-10-29"},{"lineNumber":291,"author":{"gitId":"TeoHaoZhi"},"content":"previously entered data is saved and accessable whenever the app is launched.","lastModifiedDate":"2023-10-29"},{"lineNumber":292,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":293,"author":{"gitId":"TeoHaoZhi"},"content":"### Design Considerations","lastModifiedDate":"2023-10-29"},{"lineNumber":294,"author":{"gitId":"TeoHaoZhi"},"content":"The save command had to be implemented in a way to enable direct writing of files onto the hard drive and a function had ","lastModifiedDate":"2023-10-29"},{"lineNumber":295,"author":{"gitId":"TeoHaoZhi"},"content":"to be made to load said file back into the drug inventory upon starting the application.","lastModifiedDate":"2023-10-29"},{"lineNumber":296,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":297,"author":{"gitId":"TeoHaoZhi"},"content":"### Implementation","lastModifiedDate":"2023-10-29"},{"lineNumber":298,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":299,"author":{"gitId":"TeoHaoZhi"},"content":"There is a method to access the drugs within the inventory class. a separate method from the inventory class would then ","lastModifiedDate":"2023-10-29"},{"lineNumber":300,"author":{"gitId":"TeoHaoZhi"},"content":"write the contents of these drugs back to the txt file for saving.","lastModifiedDate":"2023-10-29"},{"lineNumber":301,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":302,"author":{"gitId":"TeoHaoZhi"},"content":"Upon booting up the system, a method from the inventory class goes through the contents of the txt file and copies it to","lastModifiedDate":"2023-10-29"},{"lineNumber":303,"author":{"gitId":"TeoHaoZhi"},"content":"the inventory drug list.","lastModifiedDate":"2023-10-29"},{"lineNumber":304,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":305,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-29"},{"lineNumber":306,"author":{"gitId":"TeoHaoZhi"},"content":"## 6. addVendor Command","lastModifiedDate":"2023-10-29"},{"lineNumber":307,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":308,"author":{"gitId":"TeoHaoZhi"},"content":"The command was made to add vendors to a list of vendors so as to have access to it when needed.","lastModifiedDate":"2023-10-29"},{"lineNumber":309,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":310,"author":{"gitId":"TeoHaoZhi"},"content":"### Design Considerations","lastModifiedDate":"2023-10-29"},{"lineNumber":311,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":312,"author":{"gitId":"TeoHaoZhi"},"content":"The storage must be size adjustable based on the number of objects, in this case vendors placed into it.","lastModifiedDate":"2023-10-29"},{"lineNumber":313,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":314,"author":{"gitId":"TeoHaoZhi"},"content":"### Implementation","lastModifiedDate":"2023-10-29"},{"lineNumber":315,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":316,"author":{"gitId":"TeoHaoZhi"},"content":"In order to attain the adjustable storage based on numebr of objects, an ArrayList was used as additional vendors can be","lastModifiedDate":"2023-10-29"},{"lineNumber":317,"author":{"gitId":"TeoHaoZhi"},"content":"appended to the ArrayList whenever a new entry is required.","lastModifiedDate":"2023-10-29"},{"lineNumber":318,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":319,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-29"},{"lineNumber":320,"author":{"gitId":"TeoHaoZhi"},"content":"## 7. listVendors Command","lastModifiedDate":"2023-10-29"},{"lineNumber":321,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":322,"author":{"gitId":"TeoHaoZhi"},"content":"The command was made to list all vendors being tracked by the system in a neat way to the user","lastModifiedDate":"2023-10-29"},{"lineNumber":323,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":324,"author":{"gitId":"TeoHaoZhi"},"content":"### Design Considerations","lastModifiedDate":"2023-10-29"},{"lineNumber":325,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":326,"author":{"gitId":"TeoHaoZhi"},"content":"The possibility of an empty list had to be considered","lastModifiedDate":"2023-10-29"},{"lineNumber":327,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":328,"author":{"gitId":"TeoHaoZhi"},"content":"### Implementation","lastModifiedDate":"2023-10-29"},{"lineNumber":329,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":330,"author":{"gitId":"TeoHaoZhi"},"content":"The list of vendors could be printed by using streams to efficiently collect and print out the information of vendors","lastModifiedDate":"2023-10-29"},{"lineNumber":331,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":332,"author":{"gitId":"TeoHaoZhi"},"content":"---","lastModifiedDate":"2023-10-29"},{"lineNumber":333,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":334,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":335,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":336,"author":{"gitId":"Barbaracwx"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":337,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":338,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":339,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":340,"author":{"gitId":"Barbaracwx"},"content":"- Works in the field of drug distribution, such as pharmacies and doctors\u0027 offices.","lastModifiedDate":"2023-10-25"},{"lineNumber":341,"author":{"gitId":"Barbaracwx"},"content":"- Manages a large inventory of pharmaceuticals with varying details (expiration dates, manufacturers, storage","lastModifiedDate":"2023-10-25"},{"lineNumber":342,"author":{"gitId":"Barbaracwx"},"content":" conditions).","lastModifiedDate":"2023-10-25"},{"lineNumber":343,"author":{"gitId":"Barbaracwx"},"content":"- Prefers desktop applications for their work.","lastModifiedDate":"2023-10-25"},{"lineNumber":344,"author":{"gitId":"Barbaracwx"},"content":"- Proficient in fast typing.","lastModifiedDate":"2023-10-25"},{"lineNumber":345,"author":{"gitId":"Barbaracwx"},"content":"- Favors typing over mouse interactions.","lastModifiedDate":"2023-10-25"},{"lineNumber":346,"author":{"gitId":"Barbaracwx"},"content":"- Comfortable using Command Line Interface (CLI) applications for efficiency.","lastModifiedDate":"2023-10-25"},{"lineNumber":347,"author":{"gitId":"Barbaracwx"},"content":"- Requires password-protected access to sensitive patient healthcare information.","lastModifiedDate":"2023-10-25"},{"lineNumber":348,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":349,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":350,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":351,"author":{"gitId":"Barbaracwx"},"content":"**Stocker** is designed to cater to the specific needs of drug distributors by offering the following benefits:","lastModifiedDate":"2023-10-25"},{"lineNumber":352,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":353,"author":{"gitId":"Barbaracwx"},"content":"1. Quick access to real-time inventory information.","lastModifiedDate":"2023-10-25"},{"lineNumber":354,"author":{"gitId":"Barbaracwx"},"content":"2. Efficient tracking of incoming stock.","lastModifiedDate":"2023-10-25"},{"lineNumber":355,"author":{"gitId":"Barbaracwx"},"content":"3. Categorization of drugs based on various labels.","lastModifiedDate":"2023-10-25"},{"lineNumber":356,"author":{"gitId":"Barbaracwx"},"content":"4. A prioritized list of urgently needed restocks for timely replenishment.","lastModifiedDate":"2023-10-25"},{"lineNumber":357,"author":{"gitId":"Barbaracwx"},"content":"5. Assistance in generating comprehensive reports for stock turnover analysis.","lastModifiedDate":"2023-10-25"},{"lineNumber":358,"author":{"gitId":"Barbaracwx"},"content":"6. Secure access through individual user accounts to safeguard patient healthcare data.","lastModifiedDate":"2023-10-25"},{"lineNumber":359,"author":{"gitId":"Barbaracwx"},"content":"7. Enhanced user experience for experienced professionals who prefer keyboard commands and CLI interactions for seamless","lastModifiedDate":"2023-10-25"},{"lineNumber":360,"author":{"gitId":"Barbaracwx"},"content":" stock management.","lastModifiedDate":"2023-10-25"},{"lineNumber":361,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":362,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":363,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":364,"author":{"gitId":"martinschnder"},"content":"Priorities: High (must have) - \\* \\* _, Medium (nice to have) - _ _, Low (unlikely to have) - _","lastModifiedDate":"2023-10-25"},{"lineNumber":365,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":366,"author":{"gitId":"Barbaracwx"},"content":"| Priority | Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2023-10-25"},{"lineNumber":367,"author":{"gitId":"martinschnder"},"content":"| -------- | ------- | ----------------- | ---------------------------------------------------- | ----------------------------------------------------------- |","lastModifiedDate":"2023-10-25"},{"lineNumber":368,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Pharmacist | Add drugs to track what drugs are available in stock | Reduce manual errors |","lastModifiedDate":"2023-10-25"},{"lineNumber":369,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Pharmacist | Remove drugs to track what are no longer in used | Ensure compliance |","lastModifiedDate":"2023-10-25"},{"lineNumber":370,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Receptionist | View a list of products of that category | Easily obtain an overview of the products |","lastModifiedDate":"2023-10-25"},{"lineNumber":371,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | First-time user | See a list of all available actions | Better understand how to use the application |","lastModifiedDate":"2023-10-25"},{"lineNumber":372,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v1.0 | Inventory Manager | Find a specific drug currently in the system | Check up its details and quantities specifically |","lastModifiedDate":"2023-10-25"},{"lineNumber":373,"author":{"gitId":"martinschnder"},"content":"| \\* \\* \\* | v2.0 | user | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2023-10-25"},{"lineNumber":374,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":375,"author":{"gitId":"martinschnder"},"content":"_(More to be added)_","lastModifiedDate":"2023-10-25"},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":377,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":378,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":379,"author":{"gitId":"Barbaracwx"},"content":"1. Should work on any mainstream OS as long as it has Java 11 or above installed.","lastModifiedDate":"2023-10-25"},{"lineNumber":380,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":381,"author":{"gitId":"Barbaracwx"},"content":"2. Should be able to hold up to 1000 drug entries without a noticeable sluggishness in performance for typical usage.","lastModifiedDate":"2023-10-25"},{"lineNumber":382,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":383,"author":{"gitId":"Barbaracwx"},"content":"3. A user with above-average typing speed for regular English text (i.e. not code, not system admin commands) should be","lastModifiedDate":"2023-10-25"},{"lineNumber":384,"author":{"gitId":"Barbaracwx"},"content":" able to accomplish most of the tasks faster using commands than using the mouse.","lastModifiedDate":"2023-10-25"},{"lineNumber":385,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":386,"author":{"gitId":"martinschnder"},"content":"_(More to be added)_","lastModifiedDate":"2023-10-25"},{"lineNumber":387,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":388,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":389,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":390,"author":{"gitId":"martinschnder"},"content":"- _glossary item_ - Definition","lastModifiedDate":"2023-10-25"},{"lineNumber":391,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":392,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":393,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":394,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"karishma-t":51,"martinschnder":46,"azfarulmatin":31,"TeoHaoZhi":115,"-":30,"Barbaracwx":121}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"# Stocker","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker v1.o is a desktop app that will provide quick access to currently available stock,","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"track incoming stock and expiration dates, and categorize drugs based on different labels.","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"can get your inventory management tasks done faster than traditional GUI apps.","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":8,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"TeoHaoZhi":5,"-":6}},{"path":"docs/UML Diagrams/ArchitectureDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"title Architecture Diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"skinparam component {","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"BackgroundColor lightblue","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"[Parser]","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"[Commands]","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"[CommandResult]","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"[LoginSystem and Ui] as interactor","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"interface \"user\"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"user -[hidden]- Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"CommandResult -[hidden]- Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"interactor --\u003e Parser : Makes sense of input","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"Parser -\u003e Commands : Searches for inputted command","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Commands -\u003e CommandResult : Executes relevant command","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"CommandResult -\u003e interactor : Return control","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"user -[#red]-\u003e interactor : Logs in or Register","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"TeoHaoZhi":25}},{"path":"docs/UML Diagrams/FindCommandArchitectureDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"@startuml FindCommandArchitectureDiagram","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"!define ARROW_STYLE [-[#LOGIC_COLOR]-\u003e]","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"actor User as U","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"package \"Your Application\" {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":" [User Interface] as UI","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":" [FindCommand] as FindCmd","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" [Inventory] as Inv","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":" [StockEntry] as Entry","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" [CommandResult] as CmdResult","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"U -down-\u003e UI: Initiates \u0027Find\u0027 Command","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"UI -down-\u003e FindCmd: Invokes \u0027FindCommand\u0027","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":"UI -down-\u003e Inv: Accesses \u0027Inventory\u0027","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -down-\u003e Entry: Iterates Through Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":"Entry -down-\u003e Entry: Checks Each Entry","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"Entry --\u003e FindCmd: Match/No Match","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":"FindCmd --\u003e CmdResult: Prepares Result","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":"CmdResult -up-\u003e UI: Returns Result","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":"CmdResult -up-\u003e U: Displays Search Results","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"Barbaracwx":26}},{"path":"docs/UML Diagrams/FindCommandDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"@startuml FindCommandDiagram","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"hide footbox","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"actor User","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"participant \"FindCommand\" as FindCmd LOGIC_COLOR_T1","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"participant \"Inventory\" as Inventory LOGIC_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":"User -\u003e FindCmd: Execute \u0027Find\u0027 Command","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"activate FindCmd","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"User \u003c-- FindCmd: CommandResult","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -\u003e Inventory: Retrieve Stock Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"activate Inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"Inventory --\u003e FindCmd: List of Stock Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":"FindCmd -\u003e FindCmd: Process Entries","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"FindCmd --\u003e User: Display Search Results","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"Barbaracwx":22}},{"path":"docs/UML Diagrams/ListCommand.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"class ListCommand {","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":" - COMMAND_WORD: String","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":" - MESSAGE_USAGE: String","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":" - MESSAGE_SUCCESS: String","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":" + execute(): CommandResult","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"}","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"azfarulmatin":8}},{"path":"docs/UML Diagrams/StockerToLoginSystem.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"@startuml","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"\u0027https://plantuml.com/sequence-diagram","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"hide footbox","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"actor User","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":Stocker\" as Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":Ui\" as Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"Participant \":LoginSystem\" as LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"User -\u003e Stocker : Stocker()","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"activate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Stocker : run()","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"activate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Stocker :start()","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e Ui : Ui()","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate Stocker","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"activate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"Ui -\u003e Ui : showLoginMessage()","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"activate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Ui -\u003e Ui : ShowToUser()","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate Ui","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"Ui --\u003e User : LoginMessage","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker -\u003e LoginSystem :LoginSystem()","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"activate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : run()","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"activate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : loadExistingUsers()","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem: authenticateUserChoice()","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"User -\u003e LoginSystem : register or login input","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"alt Register","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003e LoginSystem : newUserCreator()","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem --\u003e User : showSuccessfulRegistrationMessage()","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":"else Login","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem -\u003eLoginSystem : loginExistingUser()","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"LoginSystem --\u003e User: showSuccessfulLoginMessage()","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"end","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"deactivate LoginSystem","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"@enduml","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"TeoHaoZhi":47}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"Stocker v1.o is a desktop app that will provide quick access to currently available stock, ","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"track incoming stock and expiration dates, and categorize drugs based on different labels. ","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker ","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"can get your inventory management tasks done faster than traditional GUI apps.","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"{Give steps to get started quickly}","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"1. Down the latest version of `Stocker` from [here](https://github.com/AY2324S1-CS2113-T17-3/tp/releases).","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"## Features ","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-Login System","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"Authentication system that allows user to register as a user or login","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"as an existing user.","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-add","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a drug into the inventory list.","lastModifiedDate":"2023-10-10"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-delete","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"Deletes a drug being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-list","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":"List all drug information that is being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-find","lastModifiedDate":"2023-10-10"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":"Finds drugs using their name or expiry date.","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-help","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":"List all currently available commands in current version, their ","lastModifiedDate":"2023-10-10"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"uses and how to format them in the command line.","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-register","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":"Register a new user into the login system.","lastModifiedDate":"2023-10-20"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-login","lastModifiedDate":"2023-10-20"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"Login an existing user into the system.","lastModifiedDate":"2023-10-20"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-save","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":"Save existing drugs from inventory list onto a txt file.","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":"File is then used to update inventory list when stocker is ran.","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature-add vendor","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a vendor into a list to be tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"### Feature- list vendors","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":"Displays the name of all vendors being tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"## Usage","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":"### `Login System`- Create new user or login existing user","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":"Login system is automatically launched at the start of the programme.","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":"**Registering a user**","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 1 : Enter register to select option to register a user.","lastModifiedDate":"2023-10-20"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e ","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 2: Enter desired username and password.","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e ","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Upon successful creation, registration success message is observed","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"Registration successful.","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":"**Login an existing user**","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 1 : Enter login to select option to login a user.","lastModifiedDate":"2023-10-20"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Step 2: Enter registered username and password.","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":"\u003e Upon successful creation, successful login message is observed.","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":"Login Successful.","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":"### `add` - Adds drug into inventory list","lastModifiedDate":"2023-10-10"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a drug to be tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":"add /n DRUG_NAME /d EXPIRY_DATE /q QUANTITY","lastModifiedDate":"2023-10-10"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":"`add /n Panadol /d 12 June 2026 /q 300","lastModifiedDate":"2023-10-10"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":117,"author":{"gitId":"Barbaracwx"},"content":"|| New drug added in the inventory: Panadol","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":"### `delete` - Deletes a drug being tracked by the system","lastModifiedDate":"2023-10-10"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":"Deletes a drug being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":"delete /n DRUG_NAM","lastModifiedDate":"2023-10-10"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":130,"author":{"gitId":"TeoHaoZhi"},"content":"`delete /n Panadol","lastModifiedDate":"2023-10-10"},{"lineNumber":131,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":132,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":134,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":135,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":136,"author":{"gitId":"Barbaracwx"},"content":"|| removed : Panadol","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"Barbaracwx"},"content":"|| There are now 0 drugs in the system","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":139,"author":{"gitId":"TeoHaoZhi"},"content":"### `list` - List all drug information that is being tracked by the system","lastModifiedDate":"2023-10-10"},{"lineNumber":140,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":141,"author":{"gitId":"TeoHaoZhi"},"content":"List all drug information that is being tracked by the system.","lastModifiedDate":"2023-10-10"},{"lineNumber":142,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":143,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":144,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":145,"author":{"gitId":"TeoHaoZhi"},"content":"list","lastModifiedDate":"2023-10-10"},{"lineNumber":146,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":147,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":148,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":149,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":"`list","lastModifiedDate":"2023-10-10"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":153,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":154,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":155,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":156,"author":{"gitId":"TeoHaoZhi"},"content":"|| 1. Name: Panadol, Expiry Date: 12 June 2026/ Quantity: 300","lastModifiedDate":"2023-10-29"},{"lineNumber":157,"author":{"gitId":"Barbaracwx"},"content":"||","lastModifiedDate":"2023-10-29"},{"lineNumber":158,"author":{"gitId":"Barbaracwx"},"content":"|| Listed all drugs in the inventory.","lastModifiedDate":"2023-10-29"},{"lineNumber":159,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":160,"author":{"gitId":"Barbaracwx"},"content":"### `stocklevel` - List all drugs by quantity level in ascending order","lastModifiedDate":"2023-10-29"},{"lineNumber":161,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":162,"author":{"gitId":"Barbaracwx"},"content":"List all drugs by quantity level in ascending order.","lastModifiedDate":"2023-10-29"},{"lineNumber":163,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":164,"author":{"gitId":"Barbaracwx"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":165,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":166,"author":{"gitId":"Barbaracwx"},"content":"stocklevel","lastModifiedDate":"2023-10-29"},{"lineNumber":167,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":168,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":169,"author":{"gitId":"Barbaracwx"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"Barbaracwx"},"content":"`stocklevel","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"Barbaracwx"},"content":"`","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":174,"author":{"gitId":"Barbaracwx"},"content":"Expected outcome:","lastModifiedDate":"2023-10-29"},{"lineNumber":175,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":176,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":177,"author":{"gitId":"Barbaracwx"},"content":"|| \t1. Name: histamine, Expiry date: 101010, Quantity: 10","lastModifiedDate":"2023-10-29"},{"lineNumber":178,"author":{"gitId":"Barbaracwx"},"content":"|| \t2. Name: paracetamol, Expiry date: 101010, Quantity: 50","lastModifiedDate":"2023-10-29"},{"lineNumber":179,"author":{"gitId":"Barbaracwx"},"content":"|| \t3. Name: panadol, Expiry date: 101010, Quantity: 120","lastModifiedDate":"2023-10-29"},{"lineNumber":180,"author":{"gitId":"Barbaracwx"},"content":"|| ","lastModifiedDate":"2023-10-29"},{"lineNumber":181,"author":{"gitId":"Barbaracwx"},"content":"|| Stock Level Report (Sorted by Quantity)","lastModifiedDate":"2023-10-29"},{"lineNumber":182,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":183,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":184,"author":{"gitId":"Barbaracwx"},"content":"### `find` - Finds drugs using their name or expiry date","lastModifiedDate":"2023-10-20"},{"lineNumber":185,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":186,"author":{"gitId":"Barbaracwx"},"content":"1. Finds drugs whose **names** contain any of the given keywords.","lastModifiedDate":"2023-10-20"},{"lineNumber":187,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":188,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":189,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":190,"author":{"gitId":"Barbaracwx"},"content":"find /n panadol","lastModifiedDate":"2023-10-20"},{"lineNumber":191,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":192,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":193,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-10"},{"lineNumber":194,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":195,"author":{"gitId":"Barbaracwx"},"content":"` find /n KEYWORD ","lastModifiedDate":"2023-10-20"},{"lineNumber":196,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":197,"author":{"gitId":"Barbaracwx"},"content":"- The search is case-insensitive, meaning that \"aspirin\" will match \"Aspirin.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":198,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":199,"author":{"gitId":"Barbaracwx"},"content":"- The order of the keywords does not matter. For example, \"Painkiller Relief\" will match \"Relief Painkiller.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":200,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":201,"author":{"gitId":"Barbaracwx"},"content":"- Only the drug name is searched.","lastModifiedDate":"2023-10-20"},{"lineNumber":202,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":203,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":204,"author":{"gitId":"Barbaracwx"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":205,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":206,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":207,"author":{"gitId":"Barbaracwx"},"content":"|| 1. Name: panadol, Expiry Date: 12 sep, Quantity: 120","lastModifiedDate":"2023-10-29"},{"lineNumber":208,"author":{"gitId":"Barbaracwx"},"content":"||","lastModifiedDate":"2023-10-29"},{"lineNumber":209,"author":{"gitId":"Barbaracwx"},"content":"|| Listed all drugs with the keyword in the inventory.","lastModifiedDate":"2023-10-29"},{"lineNumber":210,"author":{"gitId":"Barbaracwx"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":211,"author":{"gitId":"Barbaracwx"},"content":"2. Finds drugs whose **expiry dates** contain any of the given keywords.","lastModifiedDate":"2023-10-20"},{"lineNumber":212,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":213,"author":{"gitId":"Barbaracwx"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":214,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":215,"author":{"gitId":"Barbaracwx"},"content":"find /d sep","lastModifiedDate":"2023-10-20"},{"lineNumber":216,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":217,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":218,"author":{"gitId":"Barbaracwx"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":219,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":220,"author":{"gitId":"Barbaracwx"},"content":"` find /d KEYWORD","lastModifiedDate":"2023-10-20"},{"lineNumber":221,"author":{"gitId":"Barbaracwx"},"content":"`","lastModifiedDate":"2023-10-20"},{"lineNumber":222,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":223,"author":{"gitId":"Barbaracwx"},"content":"- Only the drug\u0027s expiry date is searched.","lastModifiedDate":"2023-10-20"},{"lineNumber":224,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":225,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":226,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":227,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":228,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":229,"author":{"gitId":"Barbaracwx"},"content":"1. Name: panadol, Expiry Date: 12 sep, Quantity: 120","lastModifiedDate":"2023-10-20"},{"lineNumber":230,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":231,"author":{"gitId":"Barbaracwx"},"content":"Listed all drugs with the keyword in the inventory.","lastModifiedDate":"2023-10-20"},{"lineNumber":232,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":233,"author":{"gitId":"TeoHaoZhi"},"content":"### `help` - List currently available commands in current version, their uses and how to format them in the command line","lastModifiedDate":"2023-10-10"},{"lineNumber":234,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":235,"author":{"gitId":"TeoHaoZhi"},"content":"List all currently available commands in current version, ","lastModifiedDate":"2023-10-10"},{"lineNumber":236,"author":{"gitId":"TeoHaoZhi"},"content":"their uses and how to format them in the command line","lastModifiedDate":"2023-10-10"},{"lineNumber":237,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":238,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":239,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-10"},{"lineNumber":240,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":241,"author":{"gitId":"TeoHaoZhi"},"content":"help","lastModifiedDate":"2023-10-10"},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":243,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":244,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":245,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":246,"author":{"gitId":"TeoHaoZhi"},"content":"`help","lastModifiedDate":"2023-10-10"},{"lineNumber":247,"author":{"gitId":"TeoHaoZhi"},"content":"`","lastModifiedDate":"2023-10-10"},{"lineNumber":248,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":249,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-10"},{"lineNumber":250,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":251,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":252,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":253,"author":{"gitId":"TeoHaoZhi"},"content":"|| add: Adds a new drug to the drug list. Parameters: NAME, EXPIRY DATE, QUANTITY, ","lastModifiedDate":"2023-10-15"},{"lineNumber":254,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: add /n Doliprane /d 12/06/2035 /q 52","lastModifiedDate":"2023-10-15"},{"lineNumber":255,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":256,"author":{"gitId":"TeoHaoZhi"},"content":"|| delete: Removes a drug from drug list. Parameters: Name ","lastModifiedDate":"2023-10-15"},{"lineNumber":257,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: delete \u003cDrug Name\u003e","lastModifiedDate":"2023-10-15"},{"lineNumber":258,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":259,"author":{"gitId":"TeoHaoZhi"},"content":"|| help: Shows program usage instructions. ","lastModifiedDate":"2023-10-15"},{"lineNumber":260,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: help","lastModifiedDate":"2023-10-15"},{"lineNumber":261,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":262,"author":{"gitId":"TeoHaoZhi"},"content":"|| list: List all drug information that is being tracked by the system. ","lastModifiedDate":"2023-10-15"},{"lineNumber":263,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: list","lastModifiedDate":"2023-10-15"},{"lineNumber":264,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":265,"author":{"gitId":"Barbaracwx"},"content":"|| find: Finds drug in inventory using name or expiry date","lastModifiedDate":"2023-10-20"},{"lineNumber":266,"author":{"gitId":"Barbaracwx"},"content":"|| Example: find /n panadol","lastModifiedDate":"2023-10-20"},{"lineNumber":267,"author":{"gitId":"Barbaracwx"},"content":"|| Example: find /d sep","lastModifiedDate":"2023-10-20"},{"lineNumber":268,"author":{"gitId":"TeoHaoZhi"},"content":"|| ","lastModifiedDate":"2023-10-15"},{"lineNumber":269,"author":{"gitId":"TeoHaoZhi"},"content":"|| bye: Exits the program.","lastModifiedDate":"2023-10-15"},{"lineNumber":270,"author":{"gitId":"TeoHaoZhi"},"content":"|| Example: bye","lastModifiedDate":"2023-10-15"},{"lineNumber":271,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-10"},{"lineNumber":272,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":273,"author":{"gitId":"TeoHaoZhi"},"content":"### `register` - Register a new user into the system","lastModifiedDate":"2023-10-20"},{"lineNumber":274,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":275,"author":{"gitId":"TeoHaoZhi"},"content":"Asks for user input for a username and password field which","lastModifiedDate":"2023-10-20"},{"lineNumber":276,"author":{"gitId":"TeoHaoZhi"},"content":"will be used to create a new user for the system.","lastModifiedDate":"2023-10-20"},{"lineNumber":277,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":278,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":279,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":280,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":281,"author":{"gitId":"TeoHaoZhi"},"content":"register","lastModifiedDate":"2023-10-20"},{"lineNumber":282,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":283,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":284,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":285,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":286,"author":{"gitId":"TeoHaoZhi"},"content":"`register`","lastModifiedDate":"2023-10-20"},{"lineNumber":287,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":288,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":289,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":290,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":291,"author":{"gitId":"TeoHaoZhi"},"content":"Registration Successful.","lastModifiedDate":"2023-10-20"},{"lineNumber":292,"author":{"gitId":"TeoHaoZhi"},"content":"New User Created.","lastModifiedDate":"2023-10-20"},{"lineNumber":293,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":294,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":295,"author":{"gitId":"TeoHaoZhi"},"content":"### `login` - login an existing user into the system","lastModifiedDate":"2023-10-20"},{"lineNumber":296,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":297,"author":{"gitId":"TeoHaoZhi"},"content":"Asks for user input for a username and password field which","lastModifiedDate":"2023-10-20"},{"lineNumber":298,"author":{"gitId":"TeoHaoZhi"},"content":"will be used to check if such a user exists for the system","lastModifiedDate":"2023-10-20"},{"lineNumber":299,"author":{"gitId":"TeoHaoZhi"},"content":"and log the user in.","lastModifiedDate":"2023-10-20"},{"lineNumber":300,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":301,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":302,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-20"},{"lineNumber":303,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":304,"author":{"gitId":"TeoHaoZhi"},"content":"login","lastModifiedDate":"2023-10-20"},{"lineNumber":305,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":306,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-20"},{"lineNumber":307,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":308,"author":{"gitId":"TeoHaoZhi"},"content":"`login`","lastModifiedDate":"2023-10-20"},{"lineNumber":309,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":310,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-20"},{"lineNumber":311,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":312,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":313,"author":{"gitId":"TeoHaoZhi"},"content":"Login Sucessful","lastModifiedDate":"2023-10-20"},{"lineNumber":314,"author":{"gitId":"TeoHaoZhi"},"content":"Welcome Back!","lastModifiedDate":"2023-10-20"},{"lineNumber":315,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-20"},{"lineNumber":316,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":317,"author":{"gitId":"TeoHaoZhi"},"content":"### `save` - save existing drugs onto hard drive of computer","lastModifiedDate":"2023-10-21"},{"lineNumber":318,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":319,"author":{"gitId":"TeoHaoZhi"},"content":"Saves existing drugs onto hard drive of computer. The txt file","lastModifiedDate":"2023-10-21"},{"lineNumber":320,"author":{"gitId":"TeoHaoZhi"},"content":"is then used as reference to update drug inventory when stocker ","lastModifiedDate":"2023-10-21"},{"lineNumber":321,"author":{"gitId":"TeoHaoZhi"},"content":"is booted up.","lastModifiedDate":"2023-10-21"},{"lineNumber":322,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":323,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-21"},{"lineNumber":324,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":325,"author":{"gitId":"TeoHaoZhi"},"content":"save","lastModifiedDate":"2023-10-21"},{"lineNumber":326,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":327,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-21"},{"lineNumber":328,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":329,"author":{"gitId":"TeoHaoZhi"},"content":"`save`","lastModifiedDate":"2023-10-21"},{"lineNumber":330,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":331,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-21"},{"lineNumber":332,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":333,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-21"},{"lineNumber":334,"author":{"gitId":"TeoHaoZhi"},"content":"Drugs successfully saved.","lastModifiedDate":"2023-10-21"},{"lineNumber":335,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-21"},{"lineNumber":336,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":337,"author":{"gitId":"TeoHaoZhi"},"content":"### `addVendor` - adds a vendor into list of vendors being tracked by system","lastModifiedDate":"2023-10-29"},{"lineNumber":338,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":339,"author":{"gitId":"TeoHaoZhi"},"content":"Adds a vendor to be tracked by the system. The enteries are used to form a list of summarised vendors.","lastModifiedDate":"2023-10-29"},{"lineNumber":340,"author":{"gitId":"TeoHaoZhi"},"content":"is booted up.","lastModifiedDate":"2023-10-29"},{"lineNumber":341,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":342,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":343,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":344,"author":{"gitId":"TeoHaoZhi"},"content":"addVendor DRUGNAME","lastModifiedDate":"2023-10-29"},{"lineNumber":345,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":346,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":347,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":348,"author":{"gitId":"TeoHaoZhi"},"content":"`addVendor Moderna`","lastModifiedDate":"2023-10-29"},{"lineNumber":349,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":350,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-29"},{"lineNumber":351,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":352,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":353,"author":{"gitId":"TeoHaoZhi"},"content":"New vendor added into the vendors list: Moderna","lastModifiedDate":"2023-10-29"},{"lineNumber":354,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":355,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":356,"author":{"gitId":"TeoHaoZhi"},"content":"### `listVendors` - list all vendors currently being tracked by the system","lastModifiedDate":"2023-10-29"},{"lineNumber":357,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":358,"author":{"gitId":"TeoHaoZhi"},"content":"Displays a list of all vendors currently being tracked by the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":359,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":360,"author":{"gitId":"TeoHaoZhi"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":361,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":362,"author":{"gitId":"TeoHaoZhi"},"content":"listVendors","lastModifiedDate":"2023-10-29"},{"lineNumber":363,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":364,"author":{"gitId":"TeoHaoZhi"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":365,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":366,"author":{"gitId":"TeoHaoZhi"},"content":"`listVendors`","lastModifiedDate":"2023-10-29"},{"lineNumber":367,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":368,"author":{"gitId":"TeoHaoZhi"},"content":"Expected outcome:","lastModifiedDate":"2023-10-29"},{"lineNumber":369,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":370,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":371,"author":{"gitId":"TeoHaoZhi"},"content":"|| 1. Name : Moderna","lastModifiedDate":"2023-10-29"},{"lineNumber":372,"author":{"gitId":"TeoHaoZhi"},"content":"||","lastModifiedDate":"2023-10-29"},{"lineNumber":373,"author":{"gitId":"TeoHaoZhi"},"content":"||Listed all vendors in the list.","lastModifiedDate":"2023-10-29"},{"lineNumber":374,"author":{"gitId":"TeoHaoZhi"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":375,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":377,"author":{"gitId":"TeoHaoZhi"},"content":"**Q**: Can i register with blank username and password","lastModifiedDate":"2023-10-17"},{"lineNumber":378,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":379,"author":{"gitId":"TeoHaoZhi"},"content":"**A**: No. Ensure your entries are not blank.","lastModifiedDate":"2023-10-17"},{"lineNumber":380,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":381,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":382,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":383,"author":{"gitId":"TeoHaoZhi"},"content":"* add : `add /n DRUG_NAME /d EXPIRY_DATE /q QUANTITY`","lastModifiedDate":"2023-10-10"},{"lineNumber":384,"author":{"gitId":"TeoHaoZhi"},"content":"* delete : `delete /n DRUG_NAME`","lastModifiedDate":"2023-10-10"},{"lineNumber":385,"author":{"gitId":"TeoHaoZhi"},"content":"* list : `list`","lastModifiedDate":"2023-10-10"},{"lineNumber":386,"author":{"gitId":"Barbaracwx"},"content":"* find : `find /n KEYWORD` or `find /d KEYWORD`","lastModifiedDate":"2023-10-20"},{"lineNumber":387,"author":{"gitId":"TeoHaoZhi"},"content":"* help : `help`","lastModifiedDate":"2023-10-10"},{"lineNumber":388,"author":{"gitId":"TeoHaoZhi"},"content":"* register : `register`","lastModifiedDate":"2023-10-20"},{"lineNumber":389,"author":{"gitId":"TeoHaoZhi"},"content":"* login : `login`","lastModifiedDate":"2023-10-20"},{"lineNumber":390,"author":{"gitId":"TeoHaoZhi"},"content":"* save : `save`","lastModifiedDate":"2023-10-21"},{"lineNumber":391,"author":{"gitId":"TeoHaoZhi"},"content":"* add Vendor : `addVendor`","lastModifiedDate":"2023-10-29"},{"lineNumber":392,"author":{"gitId":"TeoHaoZhi"},"content":"* list Vendor : `listVendors`","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"TeoHaoZhi":297,"-":31,"Barbaracwx":64}},{"path":"docs/team/Azfarul.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"# Azfarul Matin - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"azfarulmatin":6}},{"path":"docs/team/Barbara.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"# Barbara Chong - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"Barbaracwx":6}},{"path":"docs/team/HaoZhi.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"# Hao Zhi - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"TeoHaoZhi":6}},{"path":"docs/team/Karishma.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"karishma-t"},"content":"# Karishma - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"karishma-t"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"karishma-t":5}},{"path":"docs/team/Martin.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"# Martin Schneider - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"martinschnder":5}},{"path":"src/main/java/seedu/stocker/Stocker.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.ui.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.parser.Parser;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.Command;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.CommandResult;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.ExitCommand;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"public class Stocker {","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private Ui ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" private Inventory inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" private SalesList salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" private Cart currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" private VendorsList vendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" private Storage storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public static void main(String[] launchArgs) throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" new Stocker().run();","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs Login System.","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" public boolean startLogin() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" this.ui \u003d new Ui();","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" ui.showLoginMessage();","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" system.run();","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" return system.loginStatus;","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs the program until termination.","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" public void run() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" start();","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" runCommandLoopUntilExitCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" exit();","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" * Sets up the required objects, and prints the welcome message.","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" private void start() {","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" this.ui \u003d new Ui();","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d new Inventory();","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" this.salesList \u003d new SalesList();","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":" this.currentCart \u003d new Cart();","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" this.vendorsList \u003d new VendorsList();","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" this.storage \u003d new Storage(inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" storage.loadFileContents(\"drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" boolean checker \u003d startLogin();","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" assert checker \u003d\u003d true;","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" if(checker){","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" ui.showWelcomeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"martinschnder"},"content":" ui.showInitFailedMessage();","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" System.exit(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" * Prints the Goodbye message and exits.","lastModifiedDate":"2023-10-11"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":" private void exit() {","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":" ui.showGoodbyeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":" System.exit(0);","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" * Reads the user command and executes it, until the user issues the exit command.","lastModifiedDate":"2023-10-11"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" private void runCommandLoopUntilExitCommand() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"martinschnder"},"content":" Command command;","lastModifiedDate":"2023-10-09"},{"lineNumber":91,"author":{"gitId":"martinschnder"},"content":" do {","lastModifiedDate":"2023-10-09"},{"lineNumber":92,"author":{"gitId":"martinschnder"},"content":" String userCommandText \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":93,"author":{"gitId":"martinschnder"},"content":" command \u003d new Parser().parseCommand(userCommandText);","lastModifiedDate":"2023-10-09"},{"lineNumber":94,"author":{"gitId":"martinschnder"},"content":" CommandResult result \u003d executeCommand(command);","lastModifiedDate":"2023-10-09"},{"lineNumber":95,"author":{"gitId":"martinschnder"},"content":" ui.showResultToUser(result);","lastModifiedDate":"2023-10-09"},{"lineNumber":96,"author":{"gitId":"Barbaracwx"},"content":" assert !ExitCommand.isExit((command));","lastModifiedDate":"2023-10-19"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":" } while (!ExitCommand.isExit(command));","lastModifiedDate":"2023-10-09"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":" * Executes the command and returns the result.","lastModifiedDate":"2023-10-09"},{"lineNumber":104,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":105,"author":{"gitId":"martinschnder"},"content":" * @param command user command","lastModifiedDate":"2023-10-09"},{"lineNumber":106,"author":{"gitId":"martinschnder"},"content":" * @return result of the command","lastModifiedDate":"2023-10-09"},{"lineNumber":107,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" private CommandResult executeCommand(Command command) throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":109,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, salesList, currentCart);","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"martinschnder"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"martinschnder"},"content":" return result;","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":113,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"martinschnder":64,"TeoHaoZhi":42,"-":6,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/authentication/LoginSystem.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.authentication;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.ui.Ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileReader;","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedReader;","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" * Represents a login system used for authentication of users.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" * User information is saved within a hashtable and uploaded","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" * into txt file for future reference.","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"public class LoginSystem {","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public boolean loginStatus;","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" private Ui interactor;","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" private final HashMap\u003cString, String\u003e users;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public LoginSystem() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" users \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" this.in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" interactor \u003d new Ui();","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./users.txt\");","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" * Returns user choice of whether they wish to register a new user","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" * or if they would want to login using an existing user.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" * @return choice of user to login or register","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws StockerException if register or login is not inputted","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" public String authenticateUserChoice() throws StockerException{","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" try {","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":" while (in.hasNextLine()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":" String choice \u003d in.nextLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":" if (choice.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":" return \"register\";","lastModifiedDate":"2023-10-20"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (choice.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":" return \"login\";","lastModifiedDate":"2023-10-20"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":" throw new StockerException();","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":" } catch (StockerException e) {","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidChoiceMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":" return authenticateUserChoice();","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" return \"error\";","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" * Creates a new user with input username and password from user.","lastModifiedDate":"2023-10-14"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":" * Username and password are saved into a txt file for future","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":" * reference.","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if inappropriate output is entered.","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" public void newUserCreator() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUsernameMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" String username \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" while (username.equals(\"\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showBlankNameMessage();","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" username \u003d in.nextLine();","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" String password \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" while (password.equals(\"\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showBlankPasswordMessage();","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" password \u003d in.nextLine();","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" assert(username.equals(\"\") \u003d\u003d false);","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" assert (password.equals(\"\") \u003d\u003d false);","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":" if (users.containsKey(username)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUserAlreadyExistMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" users.put(username, password);","lastModifiedDate":"2023-10-11"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showSuccessfulRegistrationMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":" writeNewUserToFile();","lastModifiedDate":"2023-10-11"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"TeoHaoZhi"},"content":" * Login existing user by asking for username and password input","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":" * from user.","lastModifiedDate":"2023-10-14"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if inappropriate input is entered.","lastModifiedDate":"2023-10-14"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":" public void loginExistingUser() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showUsernameMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":" String usernameInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":" String passwordInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":131,"author":{"gitId":"TeoHaoZhi"},"content":" if (!users.containsKey(usernameInput)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":132,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidUsernameOrPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":134,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":135,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":136,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":137,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":138,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":139,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":140,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":141,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":142,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":143,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":144,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":145,"author":{"gitId":"TeoHaoZhi"},"content":" if (users.get(usernameInput).equals(passwordInput)) {","lastModifiedDate":"2023-10-11"},{"lineNumber":146,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showSuccessfulLoginMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":147,"author":{"gitId":"TeoHaoZhi"},"content":" loginStatus \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":148,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":149,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showInvalidUsernameOrPasswordMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":" System.out.println();","lastModifiedDate":"2023-10-11"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":" interactor.showEnterChoiceAgainMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":153,"author":{"gitId":"TeoHaoZhi"},"content":" String reselect \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":154,"author":{"gitId":"TeoHaoZhi"},"content":" if (reselect.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":155,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":156,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":157,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (reselect.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":158,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":159,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":160,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":161,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":162,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":163,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":165,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":166,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":167,"author":{"gitId":"TeoHaoZhi"},"content":" * Writes new user creation into a txt file to save for future reference","lastModifiedDate":"2023-10-14"},{"lineNumber":168,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":169,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException","lastModifiedDate":"2023-10-14"},{"lineNumber":170,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":171,"author":{"gitId":"TeoHaoZhi"},"content":" public void writeNewUserToFile() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":172,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedWriter writer \u003d new BufferedWriter(new FileWriter(\"./users.txt\", true));","lastModifiedDate":"2023-10-11"},{"lineNumber":173,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":174,"author":{"gitId":"TeoHaoZhi"},"content":" for (Map.Entry\u003cString, String\u003e entry :","lastModifiedDate":"2023-10-11"},{"lineNumber":175,"author":{"gitId":"TeoHaoZhi"},"content":" users.entrySet()) {","lastModifiedDate":"2023-10-11"},{"lineNumber":176,"author":{"gitId":"TeoHaoZhi"},"content":" // put key and value separated by a colon","lastModifiedDate":"2023-10-11"},{"lineNumber":177,"author":{"gitId":"TeoHaoZhi"},"content":" writer.write(entry.getKey() + \":\"","lastModifiedDate":"2023-10-11"},{"lineNumber":178,"author":{"gitId":"TeoHaoZhi"},"content":" + entry.getValue());","lastModifiedDate":"2023-10-11"},{"lineNumber":179,"author":{"gitId":"TeoHaoZhi"},"content":" // new line","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"TeoHaoZhi"},"content":" writer.newLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":181,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":182,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":183,"author":{"gitId":"TeoHaoZhi"},"content":" writer.flush();","lastModifiedDate":"2023-10-11"},{"lineNumber":184,"author":{"gitId":"TeoHaoZhi"},"content":" writer.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":185,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":186,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":187,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":188,"author":{"gitId":"TeoHaoZhi"},"content":" * Loads existing users from txt file into hash table","lastModifiedDate":"2023-10-14"},{"lineNumber":189,"author":{"gitId":"TeoHaoZhi"},"content":" * for login system to use for authentication when","lastModifiedDate":"2023-10-14"},{"lineNumber":190,"author":{"gitId":"TeoHaoZhi"},"content":" * user tries to login.","lastModifiedDate":"2023-10-14"},{"lineNumber":191,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":192,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if fail to read from txt file","lastModifiedDate":"2023-10-14"},{"lineNumber":193,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":194,"author":{"gitId":"TeoHaoZhi"},"content":" public void loadExistingUsers() throws IOException {","lastModifiedDate":"2023-10-11"},{"lineNumber":195,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedReader reader \u003d new BufferedReader(new FileReader(\"./users.txt\"));","lastModifiedDate":"2023-10-11"},{"lineNumber":196,"author":{"gitId":"TeoHaoZhi"},"content":" String line;","lastModifiedDate":"2023-10-11"},{"lineNumber":197,"author":{"gitId":"TeoHaoZhi"},"content":" while ((line \u003d reader.readLine()) !\u003d null) {","lastModifiedDate":"2023-10-11"},{"lineNumber":198,"author":{"gitId":"TeoHaoZhi"},"content":" String[] parts \u003d line.split(\":\", 2);","lastModifiedDate":"2023-10-11"},{"lineNumber":199,"author":{"gitId":"TeoHaoZhi"},"content":" if (parts.length \u003e\u003d 2) {","lastModifiedDate":"2023-10-11"},{"lineNumber":200,"author":{"gitId":"TeoHaoZhi"},"content":" String key \u003d parts[0];","lastModifiedDate":"2023-10-11"},{"lineNumber":201,"author":{"gitId":"TeoHaoZhi"},"content":" String value \u003d parts[1];","lastModifiedDate":"2023-10-11"},{"lineNumber":202,"author":{"gitId":"TeoHaoZhi"},"content":" users.put(key, value);","lastModifiedDate":"2023-10-11"},{"lineNumber":203,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":204,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":205,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":206,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":207,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":208,"author":{"gitId":"TeoHaoZhi"},"content":" * Runs login system by loading user information into hash table","lastModifiedDate":"2023-10-14"},{"lineNumber":209,"author":{"gitId":"TeoHaoZhi"},"content":" * and get input for user to check for authentication.","lastModifiedDate":"2023-10-14"},{"lineNumber":210,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":211,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if unable to read from txt file to","lastModifiedDate":"2023-10-14"},{"lineNumber":212,"author":{"gitId":"TeoHaoZhi"},"content":" * load users","lastModifiedDate":"2023-10-14"},{"lineNumber":213,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":214,"author":{"gitId":"TeoHaoZhi"},"content":" public void run() throws IOException, StockerException {","lastModifiedDate":"2023-10-21"},{"lineNumber":215,"author":{"gitId":"TeoHaoZhi"},"content":" loadExistingUsers();","lastModifiedDate":"2023-10-11"},{"lineNumber":216,"author":{"gitId":"TeoHaoZhi"},"content":" String choice \u003d authenticateUserChoice();","lastModifiedDate":"2023-10-11"},{"lineNumber":217,"author":{"gitId":"TeoHaoZhi"},"content":" if (choice.equals(\"register\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":218,"author":{"gitId":"TeoHaoZhi"},"content":" newUserCreator();","lastModifiedDate":"2023-10-11"},{"lineNumber":219,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":220,"author":{"gitId":"TeoHaoZhi"},"content":" } else if (choice.equals(\"login\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":221,"author":{"gitId":"TeoHaoZhi"},"content":" loginExistingUser();","lastModifiedDate":"2023-10-11"},{"lineNumber":222,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":223,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":224,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":225,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":226,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"TeoHaoZhi":226}},{"path":"src/main/java/seedu/stocker/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * Adds a drug into the inventory","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a new drug to the drug list. \"","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameters: NAME, EXPIRY DATE, QUANTITY, \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \" /n Doliprane /d 12/06/2035 /q 52\";","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New drug added in the inventory: %1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" private final Drug toAdd;","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" private final long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" public AddCommand(String name, String expiryDate, Long quantity) {","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.toAdd \u003d new Drug(name, expiryDate);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" public Drug getDrug() {","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return this.toAdd;","lastModifiedDate":"2023-10-09"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(toAdd.getName(), toAdd, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, toAdd.getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":33,"TeoHaoZhi":2,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/AddToCartCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * Adds a certain quantity of one drug into the current cart","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"public class AddToCartCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"addtocart\";","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD ","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" + \": Adds a new drug to the current cart. \"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \"Parameters: NAME, QUANTITY,\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" + \" /n Doliprane /q 2\";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New drug added in the current cart: %1$s\";","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" private final String drugName;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" private final long quantity;","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public AddToCartCommand(String name, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.drugName \u003d name;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" StockEntry matchingEntry \u003d inventory.getStockEntries().stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" .filter(entry -\u003e entry","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" .getDrug().getName()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" .equalsIgnoreCase(this.drugName) \u0026\u0026 ","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" entry.getQuantity() \u003e this.quantity)","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" .findAny()","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" .orElse(null);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" if (matchingEntry !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" currentCart.addEntry(this.drugName, this.quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, matchingEntry.getDrug().getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"This drug is not in stock. \");","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":40,"TeoHaoZhi":1,"Barbaracwx":4}},{"path":"src/main/java/seedu/stocker/commands/AddVendorCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.Vendor;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":" * Adds a vendor into the inventory","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"public class AddVendorCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"addVendor\";","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a new vendor to the vendors list. \"","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameter: NAME\" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + \" Moderna\";","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New vendor added in the vendors list: %1$s\";","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" private final Vendor toAdd;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public AddVendorCommand(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" this.toAdd \u003d new Vendor(name);","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" VendorsList.addNewVendor(toAdd);","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd.getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":31}},{"path":"src/main/java/seedu/stocker/commands/CheckOutCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Remove a drug from inventory and add it into the sales list","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"public class CheckOutCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"checkout\";","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Checks out current cart. \"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Parameters:\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"The current cart has been checked out. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public CheckOutCommand() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" currentCart.checkOut(salesList, inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS));","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":22,"TeoHaoZhi":1,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" protected Inventory inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" protected SalesList salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" protected Cart currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" protected Command() {","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" public void setData(Inventory inventory, SalesList salesList, Cart currentCart) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d inventory;","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" this.salesList \u003d salesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.currentCart \u003d currentCart;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" public abstract CommandResult execute() throws IOException, StockerException;","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":24,"TeoHaoZhi":5}},{"path":"src/main/java/seedu/stocker/commands/CommandResult.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"// import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Optional;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" * Represents the result of a command execution.","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"public class CommandResult\u003cT\u003e {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" * The feedback message to be shown to the user. Contains a description of the execution result","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" public final String feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":" * The list of drugs that was produced by the command","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private final List\u003cT\u003e relevantElements;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public CommandResult(String feedbackToUser) {","lastModifiedDate":"2023-10-09"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" relevantElements \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" public CommandResult(String feedbackToUser, List\u003cT\u003e relevantElements) {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" this.relevantElements \u003d relevantElements;","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" * Returns a list of drugs that was produced by the command, if any.","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" public Optional\u003cList\u003cT\u003e\u003e getRelevantElements() {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" return Optional.ofNullable(relevantElements);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" public String getFeedbackToUserFindTest() {","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" if (relevantElements !\u003d null) {","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" StringBuilder feedback \u003d new StringBuilder();","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" for (int i \u003d 0; i \u003c relevantElements.size(); i++) {","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(i + 1).append(\". \").append(relevantElements.get(i));","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(System.lineSeparator());","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(System.lineSeparator());","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Barbaracwx"},"content":" feedback.append(feedbackToUser);","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"Barbaracwx"},"content":" return feedback.toString();","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"Barbaracwx"},"content":" return feedbackToUser;","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":34,"Barbaracwx":21}},{"path":"src/main/java/seedu/stocker/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.DrugNotFoundException;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"public class DeleteCommand extends Command{","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Removes a drug from drug list. \"","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Parameters: Name \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \" \u003cDrug Name\u003e\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Drug removed from inventory: %1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_FAILURE \u003d \"Drug not find in the inventory. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" private final String keyToDelete;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"karishma-t"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"karishma-t"},"content":" * Constructs a DeleteCommand with the specified drug name.","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"karishma-t"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"karishma-t"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" public DeleteCommand(String key) {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" this.keyToDelete \u003d key.trim().toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"karishma-t"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"karishma-t"},"content":" * Executes the \u0027delete\u0027 command, removing a drug from the inventory list by name.","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"karishma-t"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"karishma-t"},"content":" * @return A CommandResult indicating the result of the deletion operation.","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"karishma-t"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":" StockEntry deletedEntry \u003d inventory.deleteDrug(this.keyToDelete);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_SUCCESS, deletedEntry.getDrug().getName()));","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" } catch (DrugNotFoundException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_FAILURE);","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"karishma-t"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"karishma-t":14,"martinschnder":9,"TeoHaoZhi":19,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Terminates the program.","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"bye\";","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Exits the program.\"+ System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_EXIT_ACKNOWEDGEMENT \u003d \"Exiting Stocker as requested ...\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_EXIT_ACKNOWEDGEMENT);","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" public static boolean isExit(Command command) {","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" return command instanceof ExitCommand; // instanceof returns false if it is null","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":19,"TeoHaoZhi":2,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" * Represents a command to find drugs in the inventory that match a given keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" * Usage message for the \u0027find\u0027 command.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" /n\" + \": Finds drug in inventory using name.\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" \"Example: \" + COMMAND_WORD + \" /n panadol\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" COMMAND_WORD + \" /d\" + \": Finds drug in inventory using date.\" +","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-20"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" \"Example: \" + COMMAND_WORD + \" /d panadol\" ;","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" * Success message displayed after successfully finding drugs in the inventory.","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" private final String keyword;","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" private final String criterion;","lastModifiedDate":"2023-10-20"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" * Creates a FindCommand with the specified keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" * @param keyword The keyword to search for in the inventory.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" public FindCommand(String keyword, String criterion) {","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":" this.keyword \u003d keyword.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" this.criterion \u003d criterion;","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" private static boolean matches(String criterion, String keyword, StockEntry entry) {","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" if (criterion.equals(\"/n\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" return entry.getDrug().getName().toLowerCase().contains(keyword);","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" return entry.getDrug().getExpiryDate().toLowerCase().contains(keyword);","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"Barbaracwx"},"content":" * Executes the \u0027find\u0027 command, searching for drugs that match the keyword.","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"Barbaracwx"},"content":" * @return A CommandResult containing the outcome of the command execution.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"Barbaracwx"},"content":" if (keyword \u003d\u003d null || keyword.trim().isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e entries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e foundEntries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" for (StockEntry entry : entries) {","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" if (matches(this.criterion, this.keyword, entry)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" foundEntries.add(entry);","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, foundEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":15,"TeoHaoZhi":12,"Barbaracwx":52}},{"path":"src/main/java/seedu/stocker/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Shows help instructions.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"help\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows program usage instructions. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" System.lineSeparator() + AddCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + DeleteCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + HelpCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ListCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" + System.lineSeparator() + ShowStockLevelCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + FindCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + AddToCartCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + CheckOutCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator() + ViewCartCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + LoginCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-20"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + RegisterCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-20"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + SaveCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + AddVendorCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ListVendorCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator() + ExitCommand.MESSAGE_USAGE","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" );","lastModifiedDate":"2023-10-09"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":21,"TeoHaoZhi":25,"Barbaracwx":3}},{"path":"src/main/java/seedu/stocker/commands/IncorrectCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Represents an incorrect command. Upon execution, produces some feedback to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class IncorrectCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public final String feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public IncorrectCommand(String feedbackToUser) {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.feedbackToUser \u003d feedbackToUser;","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(feedbackToUser);","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":17,"TeoHaoZhi":1,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":5,"author":{"gitId":"azfarulmatin"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":" * Represents a command to list all drugs in the inventory.","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":" * This command retrieves the list of drugs from the inventory and provides it as part of the command result.","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"azfarulmatin"},"content":" * If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all drug information that is being \"","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"tracked by the system. \" + System.lineSeparator()","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"azfarulmatin"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all drugs in the inventory.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"azfarulmatin"},"content":" * Executes the list command.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":" * @return A CommandResult containing the success message and the list of drugs.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"azfarulmatin"},"content":" // Assertion: Check if the inventory is properly initialised","lastModifiedDate":"2023-10-20"},{"lineNumber":30,"author":{"gitId":"azfarulmatin"},"content":" assert inventory !\u003d null : \"Inventory should be initialised before executing ListCommand.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":31,"author":{"gitId":"azfarulmatin"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e stockEntries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"azfarulmatin"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" if (stockEntries.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"azfarulmatin"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"azfarulmatin"},"content":" } else {","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"azfarulmatin"},"content":" // Return a CommandResult with the success message and the list of drugs","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, stockEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":3,"azfarulmatin":25,"TeoHaoZhi":13,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/commands/ListVendorCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.Vendor;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.vendors.VendorsList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Generates a list of vendors tracked by system","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class ListVendorCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"listVendors\";","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all vendor information that is being \"","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + \"tracked by the system.\" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all vendors in the list.\";","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" * Executes the list command.","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" * @return A CommandResult containing the success message and the list of drugs.","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" List\u003cVendor\u003e vendorEntries \u003d VendorsList.getVendorEntries();","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" if (vendorEntries.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" // Return a CommandResult with the success message and the list of drugs","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, vendorEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":40}},{"path":"src/main/java/seedu/stocker/commands/LoginCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-20"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Login existing user into system.","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class LoginCommand extends Command {","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"login\";","lastModifiedDate":"2023-10-20"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Login new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Welcome back!\" ;","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException, StockerException {","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" system.loadExistingUsers();","lastModifiedDate":"2023-10-20"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" system.loginExistingUser();","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-20"}],"authorContributionMap":{"TeoHaoZhi":28,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/RegisterCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-20"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.authentication.LoginSystem;","lastModifiedDate":"2023-10-20"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.exceptions.StockerException;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-20"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" * Registers new user into login system.","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"public class RegisterCommand extends Command {","lastModifiedDate":"2023-10-20"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"register\";","lastModifiedDate":"2023-10-20"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Register new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-20"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-20"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New User Created.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException, StockerException {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" LoginSystem system \u003d new LoginSystem();","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" system.loadExistingUsers();","lastModifiedDate":"2023-10-20"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" system.newUserCreator();","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-20"}],"authorContributionMap":{"TeoHaoZhi":26,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/SaveCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" * Backups existing drug list inventory into txt file to be uploaded later.","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"public class SaveCommand extends Command{","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String COMMAND_WORD \u003d \"save\";","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Saves existing druglist that is loaded \"","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" +\"into inventory when system is booted up.\"","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + System.lineSeparator()","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Drugs successfully saved.\";","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" List\u003cStockEntry\u003e entries\u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" Storage storageManager \u003d new Storage(inventory);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" storageManager.writeToFile(\"drugs.txt\", \"\");","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" for(int i \u003d 0; i \u003c entries.size(); i +\u003d 1){","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" storageManager.appendToFile(\"drugs.txt\",entries.get(i).toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"martinschnder":5,"TeoHaoZhi":33,"Barbaracwx":1}},{"path":"src/main/java/seedu/stocker/commands/SetThresholdCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"public class SetThresholdCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":" public static final String COMMAND_WORD \u003d \"setthreshold\";","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" + \": Set the threshold quantity for a drug. \"","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":" + \"(default 100)\" + System.lineSeparator()","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: \" + COMMAND_WORD + \" /n Doliprane /tq 50\";","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Threshold quantity set for %1$s: %2$d\";","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" private final String drugName;","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" private final long threshold;","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" public SetThresholdCommand(String name, long threshold) {","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" this.drugName \u003d name;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" this.threshold \u003d threshold;","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" public SetThresholdCommand(String name) {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" this.drugName \u003d name;","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" this.threshold \u003d 100; // Default threshold value","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":" @Override","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" public CommandResult execute(){","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"Barbaracwx"},"content":" StockEntry stockEntry \u003d inventory.getStockEntry(drugName);","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" if (stockEntry !\u003d null) {","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" stockEntry.setThresholdQuantity(threshold);","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, drugName, threshold));","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult(\"Drug not found.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"Barbaracwx":42}},{"path":"src/main/java/seedu/stocker/commands/ShowStockLevelCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.StockEntry;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import java.util.Comparator;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":" * Represents a command to display a report of stock levels sorted by quantity in ascending order.","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"public class ShowStockLevelCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" public static final String COMMAND_WORD \u003d \"stocklevel\";","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": List all drugs by quantity level \"","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" + \"tracked by the system in ascending order. \" + System.lineSeparator()","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Stock Level Report (Sorted by Quantity)\";","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" * Executes the \"stocklevel\" command. Displays a report of stock levels sorted by quantity in ascending order.","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" * @return A CommandResult containing the success message and a list of stock entries sorted by quantity.","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" // Assertion: Check if the inventory is properly initialized","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":" assert inventory !\u003d null : \"Inventory should be initialized before executing ShowStockLevelCommand.\";","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" // Retrieve the list of drugs from the inventory","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"Barbaracwx"},"content":" List\u003cStockEntry\u003e stockEntries \u003d inventory.getStockEntries();","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" // Check if the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" if (stockEntries.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" // Return a CommandResult indicating that the inventory is empty","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(\"The inventory is empty.\");","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" // Sort the stockEntries by quantity in ascending order","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" stockEntries.sort(Comparator.comparingLong(StockEntry::getQuantity));","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" // Create a new list to store the sorted stockEntries","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" List\u003cStockEntry\u003e arrangedListbyQuantity \u003d new ArrayList\u003c\u003e(stockEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_SUCCESS, arrangedListbyQuantity);","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":1,"Barbaracwx":46}},{"path":"src/main/java/seedu/stocker/commands/ViewCartCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" * Represents a command to list all drugs in the current cart.","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" * This command retrieves the list of drugs from the current cart and provides it as part of the command result.","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" * If the inventory is empty, it informs the user that the inventory has no drugs.","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"public class ViewCartCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" public static final String COMMAND_WORD \u003d \"viewcart\";","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" + \": View the current cart items.\" + System.lineSeparator()","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" + \"Example: \" + COMMAND_WORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all the content of your cart. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_FAILURE \u003d \"Your cart is empty. \";","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" * Execute the ViewCartCommand","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" public CommandResult execute() {","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" if (currentCart.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" return new CommandResult\u003c\u003e(MESSAGE_FAILURE);","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return new CommandResult(MESSAGE_SUCCESS, currentCart.getCurrentCart());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":29,"TeoHaoZhi":1,"Barbaracwx":2}},{"path":"src/main/java/seedu/stocker/common/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.common;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Container for user visible messages.","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class Messages {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_WELCOME \u003d \"Welcome to your Stocker!\";","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_GOODBYE \u003d \"Good bye!\";","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_LOGIN_WELCOME \u003d \"Welcome! \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Key in register or login based on your needs \\n\"","lastModifiedDate":"2023-10-20"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"1.Register user \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + \"2.Login\";","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USERNAME_INPUT \u003d \"Enter your username:\";","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_PASSWORD_INPUT \u003d \"Enter Your Password:\";","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESSFUL_REGISTRATION \u003d \"Registration successful.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_SUCCESSFUL_LOGIN \u003d \"Login successful.\";","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_INVALID_CHOICE \u003d \"Invalid Input, enter register or login only!\";","lastModifiedDate":"2023-10-20"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_USER_ALREADY_EXIST \u003d \"User already exists. Please make user with \"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + \"different name or login instead\";","lastModifiedDate":"2023-10-20"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_INVALID_USERNAME_OR_PASSWORD \u003d \"Invalid username or password. Please try again.\";","lastModifiedDate":"2023-10-20"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_NO_BLANK_NAME_ALLOWED \u003d \"No blank name allowed. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Enter your desired username again\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" public static final String MESSAGE_NO_BLANK_PASSWORD_ALLOWED \u003d \"No blank password allowed. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Enter your desired password again\";","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" public static final String MESSAGE_INIT_FAILED \u003d \"Failed to initialise Stocker application. Exiting...\";","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":13,"TeoHaoZhi":16}},{"path":"src/main/java/seedu/stocker/drugs/Cart.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class Cart {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" private ArrayList\u003cCartEntry\u003e entries;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" public Cart() {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.entries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public void addEntry(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" this.entries.add(new CartEntry(key, quantity));","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public List\u003cCartEntry\u003e getCurrentCart() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" return this.entries;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" public boolean isEmpty() {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" return entries.isEmpty();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" public void checkOut(SalesList salesList, Inventory inventory) {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" salesList.addSale(this);","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" for (CartEntry entry : entries) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" inventory.removeFromStock(entry.getKey(), entry.getQuantity());","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" this.entries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":32}},{"path":"src/main/java/seedu/stocker/drugs/CartEntry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"public class CartEntry {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" private String key;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":" private long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public CartEntry(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" this.key \u003d key;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public String getKey() {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" return this.key;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" public long getQuantity() {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" return this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" * Returns a string representation of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the key and quantity date of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" public String toString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" return \"Key: \" + this.key","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" + \", Quantity: \" + this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":31}},{"path":"src/main/java/seedu/stocker/drugs/Drug.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class Drug {","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":" public String name;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":" String expiryDate;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" public Drug(String name, String expiryDate) {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" this.expiryDate \u003d expiryDate;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"azfarulmatin"},"content":" * Gets the name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" * @return The name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"azfarulmatin"},"content":" public String getName() {","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"azfarulmatin"},"content":" return name;","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"azfarulmatin"},"content":" * Sets the name of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":" * @param name The new name to set for the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"azfarulmatin"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"azfarulmatin"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"azfarulmatin"},"content":" * Gets the expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"azfarulmatin"},"content":" * @return The expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"azfarulmatin"},"content":" public String getExpiryDate() {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"azfarulmatin"},"content":" return expiryDate;","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"azfarulmatin"},"content":" * Sets the expiry date of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"azfarulmatin"},"content":" * @param expiryDate The new expiry date to set for the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"azfarulmatin"},"content":" public void setExpiryDate(String expiryDate) {","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"azfarulmatin"},"content":" this.expiryDate \u003d expiryDate;","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"azfarulmatin"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"azfarulmatin"},"content":" * Returns a string representation of the drug.","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"azfarulmatin"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the name and expiry date of the drug.","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"azfarulmatin"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"azfarulmatin"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"azfarulmatin"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" return \"Name: \" + name + \", Expiry Date: \" + expiryDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":5,"azfarulmatin":43,"TeoHaoZhi":11}},{"path":"src/main/java/seedu/stocker/drugs/Inventory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.DrugNotFoundException;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"public class Inventory {","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" public HashMap\u003cString, StockEntry\u003e stock;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public Inventory() {","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" this.stock \u003d new HashMap\u003cString, StockEntry\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public void addNewDrug(String key, Drug drug, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" this.stock.put(key, new StockEntry(drug, quantity));","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" public void removeFromStock(String key, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" this.stock.get(key).decrQuantity(quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":25,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" public List\u003cStockEntry\u003e getStockEntries() {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":" return this.stock.values().stream()","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":" .collect(Collectors.toCollection(ArrayList::new));","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"martinschnder"},"content":" public StockEntry deleteDrug(String key) throws DrugNotFoundException {","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" if (this.stock.containsKey(key)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" return stock.remove(key);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" throw new DrugNotFoundException(\"\");","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" public StockEntry getStockEntry(String drugName) {","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" for (StockEntry stockEntry : stock.values()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" if (stockEntry.getDrug().getName().equalsIgnoreCase(drugName)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" return stockEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" return null; // Drug not found in inventory","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":35,"azfarulmatin":3,"Barbaracwx":10}},{"path":"src/main/java/seedu/stocker/drugs/SalesList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class SalesList {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" private ArrayList\u003cCart\u003e validatedCarts;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public SalesList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.validatedCarts \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void addSale(Cart cart) {","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" this.validatedCarts.add(cart);","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" public List\u003cCart\u003e getAllSales() {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" return this.validatedCarts;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":22}},{"path":"src/main/java/seedu/stocker/drugs/StockEntry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.drugs;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"public class StockEntry {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":" private final Drug drug;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" private long quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":" private long thresholdQuantity;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":" public StockEntry(Drug drug, long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" this.drug \u003d drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" public Drug getDrug() {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" return this.drug;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" public long getQuantity() {","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" return this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public void setQuantity(long quantity) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.quantity \u003d quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" public void setThresholdQuantity(long thresholdQuantity) {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" this.thresholdQuantity \u003d thresholdQuantity;","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" public long getThresholdQuantity() {","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"Barbaracwx"},"content":" return this.thresholdQuantity;","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" public void incrQuantity(long delta) {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" this.quantity +\u003d delta;","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" public void decrQuantity(long delta) {","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" assert(this.quantity \u003e delta);","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" this.quantity -\u003d delta;","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":" * Returns a string representation of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" * @return A string containing the key and quantity date of the stock entry.","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" public String toString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" return \"Name: \" + this.drug.getName()","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" + \", Expiry date: \" + this.drug.getExpiryDate()","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" + \", Quantity: \" + this.quantity;","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":45,"Barbaracwx":10}},{"path":"src/main/java/seedu/stocker/exceptions/DrugNotFoundException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Signals that the drug has not been found in a specific list.","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class DrugNotFoundException extends Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" public DrugNotFoundException(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" super(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":10}},{"path":"src/main/java/seedu/stocker/exceptions/InvalidDrugFormatException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":" * Signals that the laod function cannot read the serialized drug.","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"public class InvalidDrugFormatException extends Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":" public InvalidDrugFormatException(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":" super(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"martinschnder":10}},{"path":"src/main/java/seedu/stocker/exceptions/StockerException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.exceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class StockerException extends Exception{","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"TeoHaoZhi":4}},{"path":"src/main/java/seedu/stocker/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.parser;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.AddCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.Command;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.DeleteCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.ExitCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.FindCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.HelpCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.IncorrectCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ListCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.LoginCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.RegisterCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.SaveCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.AddVendorCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ShowStockLevelCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.ViewCartCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.AddToCartCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.CheckOutCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.commands.ListVendorCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.commands.SetThresholdCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-09"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":28,"author":{"gitId":"martinschnder"},"content":"public class Parser {","lastModifiedDate":"2023-10-09"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" public Parser() {","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":" * Parses user input into command for execution.","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"martinschnder"},"content":" * @param userInput full user input string","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"martinschnder"},"content":" * @return the command based on the user input","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" public Command parseCommand(String userInput) throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" String[] words \u003d userInput.trim().split(\" \", 2); // split the input into command and arguments","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":" if (words.length \u003d\u003d 0) {","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":42,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" final String commandWord \u003d words[0];","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":" final String arguments \u003d userInput.replaceFirst(commandWord, \"\").trim();","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"martinschnder"},"content":" switch (commandWord) {","lastModifiedDate":"2023-10-09"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" case AddCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" return prepareAddCommand(arguments);","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":" case FindCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":" return prepareFindCommand(arguments);","lastModifiedDate":"2023-10-20"},{"lineNumber":54,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" case AddToCartCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" return prepareAddToCartCommand(arguments);","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"karishma-t"},"content":" case DeleteCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"karishma-t"},"content":" return new DeleteCommand(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" case CheckOutCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":" return new CheckOutCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" case ExitCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"martinschnder"},"content":" return new ExitCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"martinschnder"},"content":" case HelpCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-09"},{"lineNumber":68,"author":{"gitId":"martinschnder"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":70,"author":{"gitId":"azfarulmatin"},"content":" case ListCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-14"},{"lineNumber":71,"author":{"gitId":"azfarulmatin"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":72,"author":{"gitId":"azfarulmatin"},"content":" ","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" case ViewCartCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":" return new ViewCartCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" case RegisterCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-20"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" return new RegisterCommand();","lastModifiedDate":"2023-10-20"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" case LoginCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-20"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" return new LoginCommand();","lastModifiedDate":"2023-10-20"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-20"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" case SaveCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":" return new SaveCommand();","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":" ","lastModifiedDate":"2023-10-21"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" case AddVendorCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" return prepareAddVendorCommand(arguments);","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"Barbaracwx"},"content":" case ShowStockLevelCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"Barbaracwx"},"content":" return new ShowStockLevelCommand();","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" case ListVendorCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-28"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" return new ListVendorCommand();","lastModifiedDate":"2023-10-28"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"Barbaracwx"},"content":" case SetThresholdCommand.COMMAND_WORD:","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"Barbaracwx"},"content":" return prepareSetThresholdCommand(arguments);","lastModifiedDate":"2023-10-29"},{"lineNumber":96,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"martinschnder"},"content":" default:","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":99,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":100,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":101,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":102,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":103,"author":{"gitId":"martinschnder"},"content":" * Parses arguments in the context of the add drug command.","lastModifiedDate":"2023-10-09"},{"lineNumber":104,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":105,"author":{"gitId":"martinschnder"},"content":" * @param args full command args string","lastModifiedDate":"2023-10-09"},{"lineNumber":106,"author":{"gitId":"martinschnder"},"content":" * @return the prepared command","lastModifiedDate":"2023-10-09"},{"lineNumber":107,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":108,"author":{"gitId":"martinschnder"},"content":" private Command prepareAddCommand(String args) {","lastModifiedDate":"2023-10-09"},{"lineNumber":109,"author":{"gitId":"martinschnder"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"/n (.*) /d (.*) /q (.*)\");","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(args);","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 3) {","lastModifiedDate":"2023-10-09"},{"lineNumber":113,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-09"},{"lineNumber":114,"author":{"gitId":"martinschnder"},"content":" String expiryDate \u003d matcher.group(2);","lastModifiedDate":"2023-10-09"},{"lineNumber":115,"author":{"gitId":"martinschnder"},"content":" Long quantity \u003d Long.parseLong(matcher.group(3));","lastModifiedDate":"2023-10-09"},{"lineNumber":116,"author":{"gitId":"martinschnder"},"content":" return new AddCommand(name, expiryDate, quantity);","lastModifiedDate":"2023-10-09"},{"lineNumber":117,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":118,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-09"},{"lineNumber":119,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":120,"author":{"gitId":"martinschnder"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"martinschnder"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":123,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"martinschnder"},"content":" * Parses arguments in the context of the add drug to cart command.","lastModifiedDate":"2023-10-23"},{"lineNumber":127,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"martinschnder"},"content":" * @param args full command args string","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"martinschnder"},"content":" * @return the prepared command","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"martinschnder"},"content":" private Command prepareAddToCartCommand(String args) {","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"/n (.*) /q (.*)\");","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(args);","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 2) {","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"Barbaracwx"},"content":" long quantity \u003d Long.parseLong(matcher.group(2));","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"martinschnder"},"content":" return new AddToCartCommand(name, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddToCartCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":142,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":143,"author":{"gitId":"Barbaracwx"},"content":" private Command prepareFindCommand(String args) {","lastModifiedDate":"2023-10-20"},{"lineNumber":144,"author":{"gitId":"Barbaracwx"},"content":" String[] findArgs \u003d args.split(\" \", 2);","lastModifiedDate":"2023-10-20"},{"lineNumber":145,"author":{"gitId":"Barbaracwx"},"content":" if (findArgs.length \u003d\u003d 2) {","lastModifiedDate":"2023-10-20"},{"lineNumber":146,"author":{"gitId":"Barbaracwx"},"content":" String criterion \u003d findArgs[0];","lastModifiedDate":"2023-10-20"},{"lineNumber":147,"author":{"gitId":"Barbaracwx"},"content":" String keyword \u003d findArgs[1];","lastModifiedDate":"2023-10-20"},{"lineNumber":148,"author":{"gitId":"Barbaracwx"},"content":" if (criterion.equals(\"/n\") || criterion.equals(\"/d\")) {","lastModifiedDate":"2023-10-20"},{"lineNumber":149,"author":{"gitId":"Barbaracwx"},"content":" return new FindCommand(keyword, criterion);","lastModifiedDate":"2023-10-20"},{"lineNumber":150,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-20"},{"lineNumber":151,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-20"},{"lineNumber":152,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":153,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-20"},{"lineNumber":154,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-20"},{"lineNumber":155,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":156,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-20"},{"lineNumber":157,"author":{"gitId":"TeoHaoZhi"},"content":" private Command prepareAddVendorCommand (String args) throws IOException {","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"TeoHaoZhi"},"content":" String[] vendorArgs \u003d args.split(\" \",1);","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"TeoHaoZhi"},"content":" String vendorName \u003d vendorArgs[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"TeoHaoZhi"},"content":" try {","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"TeoHaoZhi"},"content":" if (vendorName.equals(null) || vendorName.equals(\"\") || vendorName.equals(\" \")) {","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"TeoHaoZhi"},"content":" throw new IOException();","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" } catch(Exception invalidInput){","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"TeoHaoZhi"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,AddVendorCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"TeoHaoZhi"},"content":" return new AddVendorCommand(vendorName);","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"Barbaracwx"},"content":" private Command prepareSetThresholdCommand(String args) {","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"Barbaracwx"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"Barbaracwx"},"content":" Pattern pattern \u003d Pattern.compile(\"/n (.*) /tq (.*)\");","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"Barbaracwx"},"content":" Matcher matcher \u003d pattern.matcher(args);","lastModifiedDate":"2023-10-29"},{"lineNumber":174,"author":{"gitId":"Barbaracwx"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 2) {","lastModifiedDate":"2023-10-29"},{"lineNumber":175,"author":{"gitId":"Barbaracwx"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":176,"author":{"gitId":"Barbaracwx"},"content":" Long threshold \u003d Long.parseLong(matcher.group(2));","lastModifiedDate":"2023-10-29"},{"lineNumber":177,"author":{"gitId":"Barbaracwx"},"content":" return new SetThresholdCommand(name, threshold);","lastModifiedDate":"2023-10-29"},{"lineNumber":178,"author":{"gitId":"Barbaracwx"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":179,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2023-10-29"},{"lineNumber":180,"author":{"gitId":"Barbaracwx"},"content":" SetThresholdCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-29"},{"lineNumber":181,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":182,"author":{"gitId":"Barbaracwx"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":183,"author":{"gitId":"Barbaracwx"},"content":" return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2023-10-29"},{"lineNumber":184,"author":{"gitId":"Barbaracwx"},"content":" SetThresholdCommand.MESSAGE_USAGE));","lastModifiedDate":"2023-10-29"},{"lineNumber":185,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":186,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":187,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":188,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"karishma-t":4,"martinschnder":85,"azfarulmatin":4,"TeoHaoZhi":39,"Barbaracwx":56}},{"path":"src/main/java/seedu/stocker/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.storage;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.exceptions.InvalidDrugFormatException;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.BufferedWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"/**","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" * Represents an object to handle writing to txt files and appending to them.","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"public class Storage {","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" private Inventory inventory;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" public Storage(Inventory inventory) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" this.inventory \u003d inventory;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" * Writes to the first line of a txt file","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" * can be used to clear a txt file as well.","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath relative path of file to write to","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" * @param textToAdd what to write to the file","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if invalid input is entered","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" public void writeToFile(String filePath, String textToAdd) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" FileWriter fw \u003d new FileWriter(filePath);","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" fw.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" * Appends given text to next line of txt file.","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath relative path of file to write to","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"TeoHaoZhi"},"content":" * @param textToAppend what to write to the file","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if invalid input is given","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" public void appendToFile(String filePath, String textToAppend) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" BufferedWriter bf \u003d new BufferedWriter(new FileWriter(filePath,true));","lastModifiedDate":"2023-10-21"},{"lineNumber":49,"author":{"gitId":"TeoHaoZhi"},"content":" bf.write(textToAppend);","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"TeoHaoZhi"},"content":" bf.newLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"TeoHaoZhi"},"content":" bf.close();","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"TeoHaoZhi"},"content":" * Loads drugs from txt file into inventory system.","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":" * @param filePath Relative path to file containing list of drugs to be loaded.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"TeoHaoZhi"},"content":" * @throws IOException if file is not found","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" public void loadFileContents(String filePath) throws IOException, InvalidDrugFormatException {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" File holder \u003d new File(\"./drugs.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":" if (!holder.exists()) {","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" holder.createNewFile();","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" File f \u003d new File(filePath);","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" Scanner reader \u003d new Scanner(f);","lastModifiedDate":"2023-10-21"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"martinschnder"},"content":" Pattern pattern \u003d Pattern.compile(\"Name: (.*), Expiry date: (.*), Quantity: (.*)\");","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" while(reader.hasNextLine()){","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" Matcher matcher \u003d pattern.matcher(reader.nextLine());","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" if (matcher.matches() \u0026\u0026 matcher.groupCount() \u003d\u003d 3) {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"martinschnder"},"content":" String name \u003d matcher.group(1);","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":" String expiryDate \u003d matcher.group(2);","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"martinschnder"},"content":" Long quantity \u003d Long.parseLong(matcher.group(3));","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"martinschnder"},"content":" Drug drug \u003d new Drug(name, expiryDate);","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(name, drug, quantity);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"martinschnder"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"martinschnder"},"content":" throw new InvalidDrugFormatException(\"\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":85,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"martinschnder":26,"TeoHaoZhi":59}},{"path":"src/main/java/seedu/stocker/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.io.InputStream;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Optional;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.commands.CommandResult;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_USERNAME_INPUT;","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_USER_ALREADY_EXIST;","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_LOGIN_WELCOME;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_SUCCESSFUL_LOGIN;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_NO_BLANK_NAME_ALLOWED;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_NO_BLANK_PASSWORD_ALLOWED;","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_PASSWORD_INPUT;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_WELCOME;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_CHOICE;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_GOODBYE;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_USERNAME_OR_PASSWORD;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"import static seedu.stocker.common.Messages.MESSAGE_SUCCESSFUL_REGISTRATION;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INIT_FAILED;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":"public class Ui {","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * Offset required to convert between 1-indexing and 0-indexing.","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" public static final int DISPLAYED_INDEX_OFFSET \u003d 1;","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" * A decorative prefix added to the beginning of lines printed by Jerry","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"martinschnder"},"content":" private static final String LINE_PREFIX \u003d \"|| \";","lastModifiedDate":"2023-10-09"},{"lineNumber":38,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"martinschnder"},"content":" private static final String DIVIDER \u003d \"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\";","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"TeoHaoZhi"},"content":" * A platform independent line separator.","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"martinschnder"},"content":" private static final String LS \u003d System.lineSeparator();","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" * Format of indexed list item","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" private static final String MESSAGE_INDEXED_LIST_ITEM \u003d \"\\t%1$d. %2$s\";","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" private final Scanner in;","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" private final PrintStream out;","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"TeoHaoZhi"},"content":" public Ui() {","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" this(System.in, System.out);","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":57,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" public Ui(InputStream in, PrintStream out) {","lastModifiedDate":"2023-10-09"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" this.in \u003d new Scanner(in);","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" this.out \u003d out;","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"martinschnder"},"content":" * Prompts for the command and reads the text entered by the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"martinschnder"},"content":" * Ignores empty, pure whitespace, and comment lines.","lastModifiedDate":"2023-10-09"},{"lineNumber":66,"author":{"gitId":"martinschnder"},"content":" * Echos the command back to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-14"},{"lineNumber":68,"author":{"gitId":"martinschnder"},"content":" * @return command (full line) entered by the user","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"martinschnder"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"martinschnder"},"content":" out.print(LINE_PREFIX + \"Enter command: \");","lastModifiedDate":"2023-10-09"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" String fullUserInput \u003d in.nextLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":73,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" return fullUserInput;","lastModifiedDate":"2023-10-14"},{"lineNumber":75,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":" * Shows message(s) to the user","lastModifiedDate":"2023-10-14"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"martinschnder"},"content":" public void showToUser(String... message) {","lastModifiedDate":"2023-10-09"},{"lineNumber":81,"author":{"gitId":"martinschnder"},"content":" for (String m : message) {","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"martinschnder"},"content":" out.println(LINE_PREFIX + m.replace(\"\\n\", LS + LINE_PREFIX));","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" public void showLoginMessage() {","lastModifiedDate":"2023-10-12"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(DIVIDER, MESSAGE_LOGIN_WELCOME, DIVIDER);","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":" public void showUsernameMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_USERNAME_INPUT);","lastModifiedDate":"2023-10-14"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":" public void showPasswordMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_PASSWORD_INPUT);","lastModifiedDate":"2023-10-14"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":" public void showSuccessfulRegistrationMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":99,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_SUCCESSFUL_REGISTRATION);","lastModifiedDate":"2023-10-14"},{"lineNumber":100,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":101,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":102,"author":{"gitId":"TeoHaoZhi"},"content":" public void showSuccessfulLoginMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":103,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_SUCCESSFUL_LOGIN);","lastModifiedDate":"2023-10-14"},{"lineNumber":104,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":105,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":106,"author":{"gitId":"TeoHaoZhi"},"content":" public void showInvalidChoiceMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":107,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_INVALID_CHOICE);","lastModifiedDate":"2023-10-14"},{"lineNumber":108,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":109,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":110,"author":{"gitId":"TeoHaoZhi"},"content":" public void showUserAlreadyExistMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":111,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_USER_ALREADY_EXIST);","lastModifiedDate":"2023-10-14"},{"lineNumber":112,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":113,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":114,"author":{"gitId":"TeoHaoZhi"},"content":" public void showEnterChoiceAgainMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":115,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_LOGIN_WELCOME);","lastModifiedDate":"2023-10-14"},{"lineNumber":116,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":117,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":118,"author":{"gitId":"TeoHaoZhi"},"content":" public void showInvalidUsernameOrPasswordMessage() {","lastModifiedDate":"2023-10-14"},{"lineNumber":119,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_INVALID_USERNAME_OR_PASSWORD);","lastModifiedDate":"2023-10-14"},{"lineNumber":120,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":121,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":122,"author":{"gitId":"TeoHaoZhi"},"content":" public void showBlankNameMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_NO_BLANK_NAME_ALLOWED);","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"TeoHaoZhi"},"content":" public void showBlankPasswordMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"TeoHaoZhi"},"content":" showToUser(MESSAGE_NO_BLANK_PASSWORD_ALLOWED);","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":130,"author":{"gitId":"martinschnder"},"content":" public void showWelcomeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":131,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_WELCOME, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":132,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":133,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":134,"author":{"gitId":"martinschnder"},"content":" public void showGoodbyeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":135,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_GOODBYE, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":136,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":137,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":138,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":139,"author":{"gitId":"martinschnder"},"content":" * Shows the result of a command execution to the user. Includes additional formatting to demarcate different","lastModifiedDate":"2023-10-09"},{"lineNumber":140,"author":{"gitId":"martinschnder"},"content":" * command execution segments.","lastModifiedDate":"2023-10-09"},{"lineNumber":141,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":142,"author":{"gitId":"martinschnder"},"content":" public \u003cT\u003evoid showResultToUser(CommandResult\u003cT\u003e result) {","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"martinschnder"},"content":" final Optional\u003cList\u003cT\u003e\u003e resultElements \u003d result.getRelevantElements();","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"martinschnder"},"content":" if (resultElements.isPresent()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"martinschnder"},"content":" showElementsListView(resultElements.get());","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":147,"author":{"gitId":"martinschnder"},"content":" showToUser(result.feedbackToUser, DIVIDER);","lastModifiedDate":"2023-10-09"},{"lineNumber":148,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":149,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":150,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":151,"author":{"gitId":"TeoHaoZhi"},"content":" * Shows a list of strings to the user, formatted as an indexed list.","lastModifiedDate":"2023-10-14"},{"lineNumber":152,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":153,"author":{"gitId":"martinschnder"},"content":" private void showToUserAsIndexedList(List\u003cString\u003e list) {","lastModifiedDate":"2023-10-09"},{"lineNumber":154,"author":{"gitId":"martinschnder"},"content":" showToUser(getIndexedListForViewing(list));","lastModifiedDate":"2023-10-09"},{"lineNumber":155,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":156,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":157,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":158,"author":{"gitId":"martinschnder"},"content":" * Shows a list of drugs to the user, formatted as an indexed list.","lastModifiedDate":"2023-10-09"},{"lineNumber":159,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":160,"author":{"gitId":"martinschnder"},"content":" private \u003cT\u003evoid showElementsListView(List\u003cT\u003e elements) {","lastModifiedDate":"2023-10-23"},{"lineNumber":161,"author":{"gitId":"martinschnder"},"content":" final List\u003cString\u003e formattedElements \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":162,"author":{"gitId":"martinschnder"},"content":" for (int i \u003d 0; i \u003c elements.size(); i++) {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"martinschnder"},"content":" formattedElements.add(elements.get(i).toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":165,"author":{"gitId":"martinschnder"},"content":" showToUserAsIndexedList(formattedElements);","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":167,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":168,"author":{"gitId":"martinschnder"},"content":" public void showInitFailedMessage() {","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"martinschnder"},"content":" showToUser(MESSAGE_INIT_FAILED, DIVIDER, DIVIDER);","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-14"},{"lineNumber":173,"author":{"gitId":"TeoHaoZhi"},"content":" * Formats a list of strings as a viewable indexed list.","lastModifiedDate":"2023-10-14"},{"lineNumber":174,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-14"},{"lineNumber":175,"author":{"gitId":"martinschnder"},"content":" public static String getIndexedListForViewing(List\u003cString\u003e listItems) {","lastModifiedDate":"2023-10-10"},{"lineNumber":176,"author":{"gitId":"martinschnder"},"content":" final StringBuilder formatted \u003d new StringBuilder();","lastModifiedDate":"2023-10-09"},{"lineNumber":177,"author":{"gitId":"martinschnder"},"content":" int displayIndex \u003d DISPLAYED_INDEX_OFFSET;","lastModifiedDate":"2023-10-09"},{"lineNumber":178,"author":{"gitId":"martinschnder"},"content":" for (String listItem : listItems) {","lastModifiedDate":"2023-10-09"},{"lineNumber":179,"author":{"gitId":"martinschnder"},"content":" formatted.append(getIndexedListItem(displayIndex, listItem)).append(LS);","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"martinschnder"},"content":" displayIndex++;","lastModifiedDate":"2023-10-09"},{"lineNumber":181,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":182,"author":{"gitId":"martinschnder"},"content":" return formatted.toString();","lastModifiedDate":"2023-10-09"},{"lineNumber":183,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":184,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":185,"author":{"gitId":"martinschnder"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":186,"author":{"gitId":"martinschnder"},"content":" * Formats a string as a viewable indexed list item.","lastModifiedDate":"2023-10-09"},{"lineNumber":187,"author":{"gitId":"martinschnder"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":188,"author":{"gitId":"martinschnder"},"content":" * @param visibleIndex visible index for this listing","lastModifiedDate":"2023-10-09"},{"lineNumber":189,"author":{"gitId":"martinschnder"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":190,"author":{"gitId":"martinschnder"},"content":" private static String getIndexedListItem(int visibleIndex, String listItem) {","lastModifiedDate":"2023-10-09"},{"lineNumber":191,"author":{"gitId":"martinschnder"},"content":" return String.format(MESSAGE_INDEXED_LIST_ITEM, visibleIndex, listItem);","lastModifiedDate":"2023-10-09"},{"lineNumber":192,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":193,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":194,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":97,"TeoHaoZhi":97}},{"path":"src/main/java/seedu/stocker/vendors/Vendor.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.vendors;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"public class Vendor {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":" public String name;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":" public Vendor(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" * Gets the name of the vendor.","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" * @return The name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" public String getName() {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" return name;","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" * Sets the name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" * @param name The new name to set for the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" * Returns a string representation of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" * @return A string containing the name of the vendor.","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"TeoHaoZhi"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"TeoHaoZhi"},"content":" public String toString() {","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"TeoHaoZhi"},"content":" return \"Name: \" + name;","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":38}},{"path":"src/main/java/seedu/stocker/vendors/VendorsList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.vendors;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"public class VendorsList {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" public static ArrayList\u003cVendor\u003e vendorArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":" public VendorsList(){","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" vendorArrayList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" * Adds new vendor to vendor list","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" * @param vendor","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" public static void addNewVendor(Vendor vendor){","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" vendorArrayList.add(vendor);","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" * Gets details of all vendors","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" * @return","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" public static List\u003cVendor\u003e getVendorEntries() {","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" return vendorArrayList.stream()","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" .collect(Collectors.toCollection(ArrayList::new));","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"TeoHaoZhi":32}},{"path":"src/test/java/seedu/stocker/StockerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"class StockerTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"TeoHaoZhi":2,"-":10}},{"path":"src/test/java/seedu/stocker/commands/AddCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":"class AddCommandTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" AddCommand command \u003d new AddCommand(\"Paracetamol\", \"12/05/2024\", 12L); ","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" command.setData(new Inventory(), new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"New drug added in the inventory: Paracetamol\";","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" assertEquals(command.execute().feedbackToUser, new CommandResult(expectedOutput).feedbackToUser);","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" assertEquals(command.execute().getRelevantElements(), new CommandResult(expectedOutput).getRelevantElements());","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"martinschnder":21}},{"path":"src/test/java/seedu/stocker/commands/AddToCartCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"martinschnder"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"martinschnder"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"class AddToCartCommandTest {","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"martinschnder"},"content":" ","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" AddCommand command \u003d new AddCommand(\"Paracetamol\", \"12/05/2024\", 12L); ","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" Cart cart \u003d new Cart();","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" assertEquals(0, cart.getCurrentCart().size());","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" SalesList salesList \u003d new SalesList();","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, salesList, cart);","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" command.execute();","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"martinschnder"},"content":" AddToCartCommand command2 \u003d new AddToCartCommand(\"paracetamol\", 2L);","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" command2.setData(inventory, salesList, cart);","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"martinschnder"},"content":" command2.execute();","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"martinschnder"},"content":" assertEquals(command2.execute().feedbackToUser, \"New drug added in the current cart: Paracetamol\");","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"martinschnder"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"martinschnder":27}},{"path":"src/test/java/seedu/stocker/commands/DeleteCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"karishma-t"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"karishma-t"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"karishma-t"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"karishma-t"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"karishma-t"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"karishma-t"},"content":"class DeleteCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"karishma-t"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"karishma-t"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"karishma-t"},"content":" // Create an inventory and add a drug to it","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"karishma-t"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"martinschnder"},"content":" Drug doliprane \u003d new Drug(\"Doliprane\", \"12/06/2035\");","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" inventory.addNewDrug(\"doliprane\", doliprane, 52L);","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"karishma-t"},"content":" // Create a DeleteCommand for the drug","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"karishma-t"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(\"Doliprane\");","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"martinschnder"},"content":" deleteCommand.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"karishma-t"},"content":" // Test the execution of the DeleteCommand","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"Drug removed from inventory: Doliprane\";","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"karishma-t"},"content":" assertEquals(deleteCommand.execute().feedbackToUser, expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"karishma-t"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"karishma-t"},"content":" // Ensure that the drug is no longer in the inventory","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"martinschnder"},"content":" assertEquals(0, inventory.getStockEntries().size());","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"karishma-t"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"karishma-t"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"karishma-t":25,"martinschnder":7}},{"path":"src/test/java/seedu/stocker/commands/FindCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":"import static seedu.stocker.common.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" * JUnit test class for the FindCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":"class FindCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a keyword for drug names.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestByName() {","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a keyword","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"Pa\", \"/n\");","lastModifiedDate":"2023-10-20"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" Drug drug2 \u003d new Drug(\"Panadol\", \"04/07/2030\");","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"Panadol\", drug2, 20L);","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"martinschnder"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d \"1. Name: Panadol, Expiry date: 04/07/2030, Quantity: 20\" + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with the modified inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a keyword for drug expiry dates.","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestByExpiryDate() {","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a keyword for expiry date","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"01/03/2027\", \"/d\");","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"Barbaracwx"},"content":" Drug drug1 \u003d new Drug(\"Paracetamol\", \"01/03/2027\");","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"Paracetamol\", drug1, 12L);","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"Barbaracwx"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output for drugs with matching expiry date","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d \"1. Name: Paracetamol, Expiry date: 01/03/2027, Quantity: 12\" + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"Barbaracwx"},"content":" \"Listed all drugs with the keyword in the inventory.\";","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with the modified inventory","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"Barbaracwx"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"Barbaracwx"},"content":" * Tests the execution of the FindCommand with a null keyword, expecting an invalid format message.","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"Barbaracwx"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"Barbaracwx"},"content":" public void executeTestWithNullKeyword() {","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"Barbaracwx"},"content":" // Create an instance of FindCommand with a null keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Barbaracwx"},"content":" FindCommand command \u003d new FindCommand(\"\", \"/n\");","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Barbaracwx"},"content":" // Set the modified inventory for the command","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"Barbaracwx"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Barbaracwx"},"content":" // Define expected output for invalid format","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE);","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"Barbaracwx"},"content":" CommandResult actualResult \u003d command.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"Barbaracwx"},"content":" // Test the command\u0027s execute method with a null keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, actualResult.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"martinschnder":3,"Barbaracwx":91}},{"path":"src/test/java/seedu/stocker/commands/HelpCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"TeoHaoZhi"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"TeoHaoZhi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"class HelpCommandTest {","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":" HelpCommand command \u003d new HelpCommand();","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":" String expectedOutput \u003d System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"TeoHaoZhi"},"content":" + \"add: Adds a new drug to the drug list. Parameters: NAME, EXPIRY DATE, QUANTITY, \"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: add /n Doliprane /d 12/06/2035 /q 52\"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":" + \"delete: Removes a drug from drug list. Parameters: Name \"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: delete \u003cDrug Name\u003e\"","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"TeoHaoZhi"},"content":" + \"help: Shows program usage instructions. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: help\"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"TeoHaoZhi"},"content":" + \"list: List all drug information that is being tracked by the system. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: list\"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" + \"stocklevel: List all drugs by quantity level tracked by the system in ascending order. \"","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: stocklevel\"","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"TeoHaoZhi"},"content":" + \"find /n: Finds drug in inventory using name.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":39,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: find /n panadol\"","lastModifiedDate":"2023-10-20"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":43,"author":{"gitId":"TeoHaoZhi"},"content":" + \"find /d: Finds drug in inventory using date.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":45,"author":{"gitId":"Barbaracwx"},"content":" + \"Example: find /d panadol\"","lastModifiedDate":"2023-10-20"},{"lineNumber":46,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"martinschnder"},"content":" + \"addtocart: Adds a new drug to the current cart. Parameters: NAME, QUANTITY,\"","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"martinschnder"},"content":" + \"Example: addtocart /n Doliprane /q 2\"","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"martinschnder"},"content":" + \"checkout: Checks out current cart. Parameters:\"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"martinschnder"},"content":" + \"Example: checkout\"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"martinschnder"},"content":" + \"viewcart: View the current cart items.\"","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"martinschnder"},"content":" + \"Example: viewcart\"","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"martinschnder"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"TeoHaoZhi"},"content":" + \"login: Login new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":64,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":65,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: login\"","lastModifiedDate":"2023-10-20"},{"lineNumber":66,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":67,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":68,"author":{"gitId":"TeoHaoZhi"},"content":" + \"register: Register new user into system.\"","lastModifiedDate":"2023-10-20"},{"lineNumber":69,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":70,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: register\"","lastModifiedDate":"2023-10-20"},{"lineNumber":71,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":72,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-20"},{"lineNumber":73,"author":{"gitId":"TeoHaoZhi"},"content":" + \"save: Saves existing druglist that is loaded into inventory when system is booted up.\"","lastModifiedDate":"2023-10-21"},{"lineNumber":74,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":75,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: save\"","lastModifiedDate":"2023-10-21"},{"lineNumber":76,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":77,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-21"},{"lineNumber":78,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"TeoHaoZhi"},"content":" + \"addVendor: Adds a new vendor to the vendors list. Parameter: NAME\"","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: addVendor Moderna\"","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"TeoHaoZhi"},"content":" + \"listVendors: List all vendor information that is being tracked by the system.\"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: listVendors\"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"TeoHaoZhi"},"content":" + \"bye: Exits the program.\"","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"TeoHaoZhi"},"content":" + System.getProperty(\"line.separator\")","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"TeoHaoZhi"},"content":" + \"Example: bye\";","lastModifiedDate":"2023-10-11"},{"lineNumber":94,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":95,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"TeoHaoZhi"},"content":" assertEquals(new CommandResult(expectedOutput).feedbackToUser, command.execute().feedbackToUser);","lastModifiedDate":"2023-10-11"},{"lineNumber":97,"author":{"gitId":"TeoHaoZhi"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":98,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"martinschnder":15,"TeoHaoZhi":73,"Barbaracwx":10}},{"path":"src/test/java/seedu/stocker/commands/ListCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"azfarulmatin"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"azfarulmatin"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"azfarulmatin"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"azfarulmatin"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"azfarulmatin"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"//test for list","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"azfarulmatin"},"content":"class ListCommandTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"azfarulmatin"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"azfarulmatin"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"azfarulmatin"},"content":" ListCommand command \u003d new ListCommand();","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" command.setData(new Inventory(), new SalesList(), new Cart());","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"azfarulmatin"},"content":" String expectedOutput \u003d \"The inventory is empty.\";","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"azfarulmatin"},"content":" assertEquals( new CommandResult(expectedOutput).feedbackToUser,command.execute().feedbackToUser);","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"azfarulmatin"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"azfarulmatin"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"martinschnder":3,"azfarulmatin":15,"Barbaracwx":1}},{"path":"src/test/java/seedu/stocker/commands/StockLevelCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"Barbaracwx"},"content":"package seedu.stocker.commands;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"Barbaracwx"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Drug;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Inventory;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.SalesList;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"Barbaracwx"},"content":"import seedu.stocker.drugs.Cart;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"Barbaracwx"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"Barbaracwx"},"content":"//test for list","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"Barbaracwx"},"content":"class StockLevelCommandTest {","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"Barbaracwx"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"Barbaracwx"},"content":" public void executeTest() {","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"Barbaracwx"},"content":" // Create a new inventory","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"Barbaracwx"},"content":" Inventory inventory \u003d new Inventory();","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"Barbaracwx"},"content":" Drug drug1 \u003d new Drug(\"Panadol\", \"04/07/2030\");","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"Panadol\", drug1, 120);","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"Barbaracwx"},"content":" Drug drug2 \u003d new Drug(\"paracetamol\", \"01/07/2020\");","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"paracetamol\", drug2, 50);","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"Barbaracwx"},"content":" Drug drug3 \u003d new Drug(\"histamine\", \"09/05/2070\");","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"Barbaracwx"},"content":" inventory.addNewDrug(\"histamine\", drug3, 10);","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"Barbaracwx"},"content":" ShowStockLevelCommand command \u003d new ShowStockLevelCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"Barbaracwx"},"content":" command.setData(inventory, new SalesList(), new Cart());","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"Barbaracwx"},"content":" // Execute the command","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"Barbaracwx"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"Barbaracwx"},"content":" String expectedOutput \u003d \"1. Name: histamine, Expiry date: 09/05/2070, Quantity: 10\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"Barbaracwx"},"content":" \"2. Name: paracetamol, Expiry date: 01/07/2020, Quantity: 50\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"Barbaracwx"},"content":" \"3. Name: Panadol, Expiry date: 04/07/2030, Quantity: 120\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"Barbaracwx"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"Barbaracwx"},"content":" \"Stock Level Report (Sorted by Quantity)\";","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"Barbaracwx"},"content":" assertEquals(expectedOutput, result.getFeedbackToUserFindTest());","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"Barbaracwx"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"Barbaracwx"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"Barbaracwx"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"Barbaracwx":44}},{"path":"src/test/java/seedu/stocker/ui/UiTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"martinschnder"},"content":"package seedu.stocker.ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"TeoHaoZhi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"martinschnder"},"content":"import java.util.List;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"martinschnder"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"TeoHaoZhi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"TeoHaoZhi"},"content":"class UiTest {","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"martinschnder"},"content":" @Test","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"martinschnder"},"content":" public void getIndexedListForViewing_success() {","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"martinschnder"},"content":" String expectedOutput \u003d \"\\t1. Paracetamol\" + System.lineSeparator()","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"martinschnder"},"content":" + \"\\t2. Ibuprofene\" + System.lineSeparator()","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"martinschnder"},"content":" + \"\\t3. Doliprane\" + System.lineSeparator();","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"TeoHaoZhi"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"martinschnder"},"content":" List\u003cString\u003e input \u003d Arrays.asList(\"Paracetamol\", \"Ibuprofene\", \"Doliprane\");","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"martinschnder"},"content":" assertEquals(expectedOutput, new Ui().getIndexedListForViewing(input));","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"martinschnder"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"TeoHaoZhi"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"martinschnder":11,"TeoHaoZhi":11}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"TeoHaoZhi"},"content":"FC ACTUAL.TXT ACTUAL.TXT \u003eNUL \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"TeoHaoZhi":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"diff EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"TeoHaoZhi"},"content":"if [ ACTUAL.TXT \u003d\u003d ACTUAL.TXT ]","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"TeoHaoZhi":1,"-":22}}] diff --git a/AY2324S1-CS2113-T17-3_tp_master/commits.json b/AY2324S1-CS2113-T17-3_tp_master/commits.json index 6755e49..b6e3ebb 100644 --- a/AY2324S1-CS2113-T17-3_tp_master/commits.json +++ b/AY2324S1-CS2113-T17-3_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"karishma-t":[{"date":"2023-10-05","commitResults":[{"hash":"9b179211347fe7a0942693aea92a880a72243999","isMergeCommit":false,"messageTitle":"Add files for Karishma about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":4}}},{"hash":"ec15853438ef4adb88f2bbcc87f367804d35788d","isMergeCommit":false,"messageTitle":"Conflict resolution","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"5c174ca4cdfe79c6b173c68db27721f92aa0f615","isMergeCommit":false,"messageTitle":"Add delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":13}}},{"hash":"4c7d28ae3f51a16116cf790aabeb170d9ffaad80","isMergeCommit":false,"messageTitle":"Add junit test for Delete command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":30,"deletions":0}}},{"hash":"ed041352034696e09d01385f720d3f3a72037c62","isMergeCommit":false,"messageTitle":"Modify to pass checkstyle tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-26","commitResults":[{"hash":"521a48339b7e42ceb652e3e1d147a6c5b485792b","isMergeCommit":false,"messageTitle":"Modify DG for delete","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":53,"deletions":0}}}]}],"martinschnder":[{"date":"2023-10-07","commitResults":[{"hash":"d13e4519f0e878a3e9be46a05a57ee90c57539c8","isMergeCommit":false,"messageTitle":"Add martin portofolio and picture and update about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":1}}},{"hash":"2dbd0893fe8f3dac09ed84bb33c414c0e90c74e2","isMergeCommit":true,"messageTitle":"Merge pull request #12 from martinschnder/martin-AboutUs","messageBody":"Add martin portofolio and picture and update about us","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"eca592d2600d2253010eebbf55c4217a971ca79b","isMergeCommit":false,"messageTitle":"Updated build.gradle to match new main class name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"f9bf0f4dcbf0dc02f210e21283f8f18ddf745d2a","isMergeCommit":false,"messageTitle":"Reorganize files in various packages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":9},"other":{"insertions":2,"deletions":2}}},{"hash":"dd4cb2baf5df643afbefe71a963a78e7489a79b2","isMergeCommit":false,"messageTitle":"Create abstract command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0}}},{"hash":"0a4ae29a7ca56b747974f29fc720e496c0cebaa3","isMergeCommit":false,"messageTitle":"Add the addclass and rename the druglist class to inventory","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":101,"deletions":19}}},{"hash":"9891fe1ce7e876b766da0e19a647588a3845d02d","isMergeCommit":false,"messageTitle":"Delete old file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":14}}},{"hash":"c76880c8d3ba9f7555f17105e6689822950877aa","isMergeCommit":false,"messageTitle":"Implement ExitCommand and AddCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":316,"deletions":18}}}]},{"date":"2023-10-10","commitResults":[{"hash":"dce79f9038b5eade80126270475b9775283d2fd2","isMergeCommit":false,"messageTitle":"Add ui and addcommand testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":29,"deletions":1}}}]},{"date":"2023-10-11","commitResults":[{"hash":"8910d7979fdebe5386871de9ea2cda42c5161370","isMergeCommit":false,"messageTitle":"Change the line separator character","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"d0a83e9fe5ed5a7cc13594979f0803fa8e9a2374","isMergeCommit":false,"messageTitle":"Change the line separator character in the UI class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"55d760266b318ad23fbab35a6d1857c73c063d17","isMergeCommit":true,"messageTitle":"Merge pull request #34 from martinschnder/addDrug-unit-tests","messageBody":"Add ui and addcommand testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"7646870a909320f59cefb562285e62abc23ef833","isMergeCommit":false,"messageTitle":"Modify inventory structure and add all the command needed to make a sale (addtocart, viewcart, checkout)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":402,"deletions":131},"test-code":{"insertions":23,"deletions":15}}},{"hash":"1134e5d481615a014073af9031ca71061ff42878","isMergeCommit":false,"messageTitle":"Fix load function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":15}}},{"hash":"4e4ef4698675691973d77ae7481e1ee117537acf","isMergeCommit":false,"messageTitle":"Add better exception handling","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":18}}},{"hash":"a075bd1720fd4eac5e8c090a897225d5d2057e6d","isMergeCommit":false,"messageTitle":"Update helpcommand with new commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":4},"test-code":{"insertions":43,"deletions":28}}}]},{"date":"2023-10-24","commitResults":[{"hash":"0a64a48a68acc1accbbfec26dd81f3df9574df9c","isMergeCommit":false,"messageTitle":"Add tests for AddToCart command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":27,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"b4d2647664ddb9696b52554ddbe328b730297a98","isMergeCommit":false,"messageTitle":"Add main data structures in developerGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":46,"deletions":21}}},{"hash":"18929947f4248686faad3b70fbff3687c9c19c3b","isMergeCommit":true,"messageTitle":"Merge pull request #84 from martinschnder/developerGuide","messageBody":"Add main data structures in developerGuide","fileTypesAndContributionMap":{}}]}],"azfarulmatin":[{"date":"2023-10-07","commitResults":[{"hash":"6c8ee942babd12a205caa1b7e098fcb6340f76a9","isMergeCommit":false,"messageTitle":"Update Azfarul About us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"05e7ef8ec96488ea4719dfc0372532fe8e5694de","isMergeCommit":true,"messageTitle":"Merge pull request #19 from azfarulmatin/master","messageBody":"Update Azfarul About us","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"d5afb6bfea43555f6f259a086b672acaefd20e59","isMergeCommit":false,"messageTitle":"Add List function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":29}}},{"hash":"57a05c0bd5b98cc8b3bafc5eb9a158684e7aa058","isMergeCommit":true,"messageTitle":"Merge pull request #44 from azfarulmatin/AzfarulMatin-ListCommand","messageBody":"Add List function","fileTypesAndContributionMap":{}},{"hash":"4a24ed0a7c4ba4280e8279f225d94eca57adc5eb","isMergeCommit":false,"messageTitle":"Fix checkstyle and junit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15}}},{"hash":"a1860305e34b8c74ade793866b25205f953c8319","isMergeCommit":true,"messageTitle":"Merge pull request #45 from azfarulmatin/AzfarulMatin-ListCommand","messageBody":"Fix checkstyle and junit test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"1dda9d2754e2a02578da9238442c6d10f7e66d6f","isMergeCommit":false,"messageTitle":"Add JUnit Test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":16,"deletions":0}}},{"hash":"440fa5dc27d5fd869d27429012fdbe5aeeae7619","isMergeCommit":true,"messageTitle":"Merge pull request #46 from azfarulmatin/AzfarulMatin-JUnitTestListCommand","messageBody":"Add JUnit Test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"3887203ffba5c298294ab19aea34a4d3ed459f58","isMergeCommit":false,"messageTitle":"Add assertions for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"09522dd36305e098a7b90627e22eb45576b25579","isMergeCommit":true,"messageTitle":"Merge pull request #65 from azfarulmatin/master","messageBody":"Add assertions for ListCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"48b64546002893200c17724ba054f54c1593848a","isMergeCommit":false,"messageTitle":"Update ListCommand in Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":0}}},{"hash":"c9f60b4f7e954b7f51ac2623133f116e513fd8d7","isMergeCommit":true,"messageTitle":"Merge pull request #87 from azfarulmatin/AzfarulMatin-DeveloperGuide","messageBody":"Update ListCommand in Developer Guide","fileTypesAndContributionMap":{}}]}],"TeoHaoZhi":[{"date":"2023-10-05","commitResults":[{"hash":"f2bef309abc1a31812e5cb92d52cc3edc1ea44c6","isMergeCommit":false,"messageTitle":"Update UserGuide.md to add theme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":0}}},{"hash":"80b42e7c9d1a437ae8bed5f38e44c218f440f47c","isMergeCommit":true,"messageTitle":"Merge pull request #2 from Barbaracwx/Barbaracwx-AboutUs","messageBody":"Added Barbara.md","fileTypesAndContributionMap":{}},{"hash":"aa9ba0c6a59865a89b52a6f53b7df1df57bb99de","isMergeCommit":false,"messageTitle":"Add files for Hao Zhi\u0027s about us page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"78381da48ea0ab8048ffca83fc47af7dd59e458b","isMergeCommit":true,"messageTitle":"Merge branch \u0027HaoZhi-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c0c3018bd7af6a34e46ede0867b55d0a498285ce","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5034d288227d95c1a28ecc2359f1ea357dd3b437","isMergeCommit":true,"messageTitle":"Merge pull request #3 from TeoHaoZhi/master","messageBody":"Add HaoZhi\u0027s about us files","fileTypesAndContributionMap":{}},{"hash":"88803a7aec4b841305b2a7716850e466193ec107","isMergeCommit":false,"messageTitle":"Clean up UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-06","commitResults":[{"hash":"220ea22f86c3d933219eefa1ae6e0c2fabea1d44","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into karishma-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"800151596e695fdfd13c417def35fd80dc78fed4","isMergeCommit":true,"messageTitle":"Merge pull request #10 from karishma-t/karishma-AboutUs","messageBody":"Add Karishma about us","fileTypesAndContributionMap":{}},{"hash":"4a53af6054886017e9cf732a597960c970f202d4","isMergeCommit":false,"messageTitle":"Fix about us portfolio bug","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"eb792a86d1eb0fd6ea4e2bca18a1ed4e10c07661","isMergeCommit":true,"messageTitle":"Merge pull request #11 from TeoHaoZhi/master","messageBody":"Fix about us portfolio bug","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"090f7fd2112203bcd0f818c6a79ab83c1945118e","isMergeCommit":false,"messageTitle":"Rename classes","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":4,"deletions":4}}},{"hash":"cd37b8a6e9414c1fa24b68559ff23066fde03931","isMergeCommit":true,"messageTitle":"Merge pull request #23 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Rename classes","fileTypesAndContributionMap":{}},{"hash":"293aa145c39d8d91f975a08e7f0c8f491234cd7e","isMergeCommit":false,"messageTitle":"Add dummy classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":0}}},{"hash":"3d5504d42b2532eadb56b49ff210b09cdd50284c","isMergeCommit":true,"messageTitle":"Merge pull request #24 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add dummy classes","fileTypesAndContributionMap":{}},{"hash":"d842866453c774e4e7cb523fc0f6d99109564fbb","isMergeCommit":false,"messageTitle":"Add attributes to drug class","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1},"test-code":{"insertions":46,"deletions":20}}},{"hash":"7988e7aab82f83af8ed057426371bc9f8066e5c2","isMergeCommit":true,"messageTitle":"Merge pull request #25 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add attributes to drug class","fileTypesAndContributionMap":{}},{"hash":"1746b905d7c8f9941ce95abe0c601ed7a555d341","isMergeCommit":false,"messageTitle":"Add help feature to UI class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":1}}},{"hash":"227af0572b033254d6546284a0ee2f875a71c3a9","isMergeCommit":true,"messageTitle":"Merge pull request #26 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add help feature to UI class","fileTypesAndContributionMap":{}},{"hash":"7299b86db5d860ab190c91abd4c6962273b196cd","isMergeCommit":false,"messageTitle":"Add exit point for programme","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":11},"other":{"insertions":0,"deletions":0},"test-code":{"insertions":0,"deletions":49}}},{"hash":"de4799c7421e4b4195b2576cd2425462d6a6fa0e","isMergeCommit":true,"messageTitle":"Merge pull request #27 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add exit point for programme","fileTypesAndContributionMap":{}},{"hash":"354c79d2f7cbb08fb7700ca95ef4ca362f2c172d","isMergeCommit":false,"messageTitle":"Refactor printing for help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":24}}},{"hash":"8ab6c94c4d553c98bdc4616b2841d95fea09e2e7","isMergeCommit":true,"messageTitle":"Merge pull request #28 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Refactor printing for help command","fileTypesAndContributionMap":{}},{"hash":"5bf20560cb92c584383123cf1ba209e1943da17b","isMergeCommit":false,"messageTitle":"Add Junit test for help feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":5},"test-code":{"insertions":47,"deletions":0}}},{"hash":"0cce6790d3939b1aa5f6309f8c81e87f8490dceb","isMergeCommit":true,"messageTitle":"Merge pull request #29 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Add Junit test for help feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"44f897c607a7bf71459ce63ef7a22368d8374d2c","isMergeCommit":true,"messageTitle":"Merge pull request #30 from martinschnder/branch-AddCommand","messageBody":"Branch add command","fileTypesAndContributionMap":{}},{"hash":"38f4573bdbf922271274ff418303a83c5ba9778e","isMergeCommit":false,"messageTitle":"Add more class templates","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":22}}},{"hash":"7ab218bb640ddf7a60822ecd133989bcd0d2a220","isMergeCommit":true,"messageTitle":"Merge pull request #31 from TeoHaoZhi/HaoZhi-ListCommandHelp","messageBody":"Add more class templates","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"e366c56327163c3ebdcc63a2889b90ea43218e50","isMergeCommit":false,"messageTitle":"Update userguide markdown file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":154,"deletions":12}}},{"hash":"67f9f7118ed7fe8c06884e7757e87e6c634fa6d8","isMergeCommit":true,"messageTitle":"Merge pull request #32 from TeoHaoZhi/HaoZhi-UserGuideUpdateV1.0","messageBody":"Update userguide markdown file","fileTypesAndContributionMap":{}},{"hash":"b6fd34963d346c40de9d71cb9ea43699a14d4b8d","isMergeCommit":false,"messageTitle":"Update README","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":2}}},{"hash":"a3f768d82e7036ec93e0543e7c2db1847279aa1c","isMergeCommit":true,"messageTitle":"Merge pull request #33 from TeoHaoZhi/HaoZhi-ReadMe","messageBody":"Update README","fileTypesAndContributionMap":{}},{"hash":"dc4311ad9d1840486a71ba7958140542108c093a","isMergeCommit":false,"messageTitle":"Add Junit test for help command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":29,"deletions":0}}},{"hash":"324c68f05643be382892df3fec2ec0d7ea16d361","isMergeCommit":false,"messageTitle":"Fix checkstyle violation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":5}}},{"hash":"7a54cf286c00c3cf7864d2bc4859e14c0e4c9a4d","isMergeCommit":true,"messageTitle":"Merge pull request #35 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Add Junit test for help command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"bac5f0f114fe6974123b6090f5bfc2ad035bbf64","isMergeCommit":false,"messageTitle":"Edit Junit test for help","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":13,"deletions":13}}},{"hash":"e5380e513c5f79d6570dca09171f3f1fc58402d2","isMergeCommit":true,"messageTitle":"Merge pull request #36 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Edit Junit test for help","fileTypesAndContributionMap":{}},{"hash":"350fcc060811c2f4e25cb36254f2bd7845ea9338","isMergeCommit":false,"messageTitle":"Add methods to write to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":0}}},{"hash":"a46e5821d0bcebdf8cc07433cfb197f7fd91490b","isMergeCommit":false,"messageTitle":"Update method to append to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"d25c1fefd9e13e3320c18ff49032c4dfc91e93a4","isMergeCommit":false,"messageTitle":"Add login system class to handle login features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":124,"deletions":0}}},{"hash":"366c60438a5b4307401d2af9368d4c60d28dc73f","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"be08c4a84413626b9f7bcc47b0264320f8ecb7bd","isMergeCommit":true,"messageTitle":"Merge pull request #37 from TeoHaoZhi/HaoZhi-LoginFeatureAttempt1","messageBody":"Add login system class","fileTypesAndContributionMap":{}},{"hash":"d2aef4c2cf81d80323363559b85cd7dcc5aad9d1","isMergeCommit":false,"messageTitle":"Fix infinite while loop","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"5847e7d3f2046d0a5d03b96582f032e83b8d2443","isMergeCommit":false,"messageTitle":"Fix bug of overwriting txt file instead of adding to it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":4}}},{"hash":"f4fec5773b73e56a551fc2f99440e3b21f9646b1","isMergeCommit":false,"messageTitle":"Fix bugs in login system class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":89,"deletions":17}}},{"hash":"c35451f09fa1f1f1423fa4e8ad3d75679d362e2b","isMergeCommit":false,"messageTitle":"FIx Bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":20}}},{"hash":"7617592e5273ba22fa90061e426827bbed215362","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":6}}}]},{"date":"2023-10-12","commitResults":[{"hash":"ab49cf95fb9ceab78bfb2b6c312dbd694de75ff9","isMergeCommit":false,"messageTitle":"FIx bug causing failing CI test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":27}}},{"hash":"5323884d9709dde52cf9cd1670bc8f9274e3ad90","isMergeCommit":true,"messageTitle":"Merge pull request #38 from TeoHaoZhi/HaoZhi-LoginFeatureAttempt1","messageBody":"Login attempt bug fix 1","fileTypesAndContributionMap":{}},{"hash":"5b76d7f4809b669df3bcaab0d3c8c352d856d267","isMergeCommit":false,"messageTitle":"Fix printing formatting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":17}}}]},{"date":"2023-10-14","commitResults":[{"hash":"10259ca61e695c8802fec0130f28e74e79e8e7a5","isMergeCommit":false,"messageTitle":"Add assertion for login system","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"988ee96196908057baaa52e3c90e60bf2eda330c","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"6aaeb409f9ed28c1096b87feda862eff1758f9c5","isMergeCommit":false,"messageTitle":"Edit runtest.sh file to disable it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"e917a9b035a3b985e45f43336a0e3e88a1438d6f","isMergeCommit":false,"messageTitle":"Fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3},"test-code":{"insertions":1,"deletions":1}}},{"hash":"28336545c9ca20145bd634e797f0ac345650ab7e","isMergeCommit":false,"messageTitle":"Edit runtest.bat to disable IO test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"389f5999bc5fcee00d3e38aa2b8e6693fcbad44d","isMergeCommit":true,"messageTitle":"Merge pull request #40 from TeoHaoZhi/HaoZhi-BugfixLogin","messageBody":"Add assertion for login system","fileTypesAndContributionMap":{}},{"hash":"fd5869a315e63b3e4c9daa003af97dcd133a587e","isMergeCommit":false,"messageTitle":"Added messages to let UI handle printing of messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":19}}},{"hash":"38a69c177d2e593158303f95f1e3f2a5e2134ab5","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":70,"deletions":22}}},{"hash":"a4be93035d88733cf3f1953bda32ace09527017b","isMergeCommit":true,"messageTitle":"Merge pull request #41 from TeoHaoZhi/LoginMessagesFix","messageBody":"Added messages to let UI handle printing of messages","fileTypesAndContributionMap":{}},{"hash":"3528ac948b94285edb8196292d9955d1559b06dc","isMergeCommit":false,"messageTitle":"Update javadoc for login system class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":3}}},{"hash":"724368c8a4964dddcb0e716f7d37672d523d20f3","isMergeCommit":true,"messageTitle":"Merge pull request #42 from TeoHaoZhi/HaoZhi-JavaDocLoginSystem","messageBody":"Update javadoc for login system class","fileTypesAndContributionMap":{}},{"hash":"c9782f17e67050c1dd5b05b5ff7b3dba093e6780","isMergeCommit":false,"messageTitle":"Added java doc for file storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":3}}},{"hash":"01e37de8ce32537e7df7854fa385be003f07ea71","isMergeCommit":true,"messageTitle":"Merge pull request #43 from TeoHaoZhi/Javadoc","messageBody":"Added java doc for file storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"8573f29dd50f626312f717999098767234e5ab67","isMergeCommit":false,"messageTitle":"Add userguide on login system","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":59,"deletions":20}}},{"hash":"df15ef01089d4ccc1210bc929a19a5bc0c69095a","isMergeCommit":false,"messageTitle":"Fix Junit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":12},"test-code":{"insertions":47,"deletions":30}}},{"hash":"f68a2eea9a7c6a51fc7ed0980c82bbe61486a20c","isMergeCommit":true,"messageTitle":"Merge pull request #47 from TeoHaoZhi/HaoZhi-MarkDown","messageBody":"Edit userguide","fileTypesAndContributionMap":{}},{"hash":"1ec8b571b25dada302c74e04f3398697ab08a189","isMergeCommit":false,"messageTitle":"Fix bug of blank input for username and password","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":8}}},{"hash":"6f77ee60f5ed10366ecfbcc8a3d26b20f5c9d528","isMergeCommit":true,"messageTitle":"Merge pull request #48 from TeoHaoZhi/LoginSystemBlankinput","messageBody":"Fix bug of blank input for username and password","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"b6cb73dbbfd6780178d32c3949b2fd24f046e11e","isMergeCommit":true,"messageTitle":"Merge pull request #50 from Barbaracwx/branch-FindCommandNew","messageBody":"Branch find command new","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"2d9902628161064ffcd7105230dd6fa765b188ca","isMergeCommit":false,"messageTitle":"Update user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":5}}},{"hash":"e01effd8dc540db39d938e72fa2dc7d0f0cb72b5","isMergeCommit":true,"messageTitle":"Merge pull request #54 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update user guide","fileTypesAndContributionMap":{}},{"hash":"f53e9e97737095dc7367aba076d5f5f98d120061","isMergeCommit":true,"messageTitle":"Merge pull request #55 from Barbaracwx/branch-TestCodeFindCommand","messageBody":"Added j unit test","fileTypesAndContributionMap":{}},{"hash":"14271486fb1978d5c85475b176ff6f34c0160998","isMergeCommit":true,"messageTitle":"Merge pull request #52 from karishma-t/karishma-DeleteCommand","messageBody":"Add delete command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7d3d19836e43e535ca879db7a2f24e84fb2ade61","isMergeCommit":true,"messageTitle":"Merge pull request #57 from Barbaracwx/master","messageBody":"changed findCommand to add ui class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"29f5aec77019ca6585b88faf87f1c5a812cb8663","isMergeCommit":true,"messageTitle":"Merge pull request #60 from Barbaracwx/branch-assertionStatement","messageBody":"added assertion statement","fileTypesAndContributionMap":{}},{"hash":"9c0f2d2c8ce561200f6b7c15c96d645ef87c2357","isMergeCommit":true,"messageTitle":"Merge pull request #61 from Barbaracwx/branch-CodeTest","messageBody":"edited FindCommandTest cases","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"0d83e630f1be68cc6ee693a7e8e8efd07703d072","isMergeCommit":true,"messageTitle":"Merge pull request #64 from Barbaracwx/branch-FindCommandName","messageBody":"add find command using both name and date","fileTypesAndContributionMap":{}},{"hash":"a5ce4e7ef58f1828ca4061d12735e197f8b1d03e","isMergeCommit":true,"messageTitle":"Merge pull request #66 from Barbaracwx/branch-UserGuide","messageBody":"changed user guide according to new find function","fileTypesAndContributionMap":{}},{"hash":"b24a4051f1319ef08dcf942aa00fd5002f86b3f3","isMergeCommit":false,"messageTitle":"Add register and login commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":28}}},{"hash":"d48892620bf2425f4d20f7bf67f119d866e7aba6","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":6},"test-code":{"insertions":12,"deletions":2}}},{"hash":"41b3713088803f0fa62c1701e642c1a7f82f3de0","isMergeCommit":true,"messageTitle":"Merge pull request #68 from TeoHaoZhi/HaoZhi-RegisterClass","messageBody":"Add register command and login command","fileTypesAndContributionMap":{}},{"hash":"7cc709dbb251572295f802094e1290f43d252837","isMergeCommit":false,"messageTitle":"Update userguide to reflect register and login feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":54,"deletions":2}}},{"hash":"2d8343571d10857aae93337064ae0f04eac9105b","isMergeCommit":true,"messageTitle":"Merge pull request #69 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update userguide to reflect register and login feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"0bf3c4287787d2f9b4bea2ea4dd9c5fdb0da70da","isMergeCommit":false,"messageTitle":"Add save feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":6},"test-code":{"insertions":5,"deletions":0}}},{"hash":"b18733d8b51c292afa238a16e6cb240638acb2e3","isMergeCommit":true,"messageTitle":"Merge pull request #71 from TeoHaoZhi/HaoZhi-SaveFeature","messageBody":"Add save feature","fileTypesAndContributionMap":{}},{"hash":"f3cc4e3e29ffde5997c1ebbea5db55f590d3e8ff","isMergeCommit":false,"messageTitle":"Update Userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":27,"deletions":1}}},{"hash":"5f4541a2603dfded61643c40c14e898d37ae263d","isMergeCommit":true,"messageTitle":"Merge pull request #72 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update Userguide","fileTypesAndContributionMap":{}},{"hash":"5d82131cb223c10000d72b98f149435e68aba0e8","isMergeCommit":false,"messageTitle":"Update Developer guide","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"docs":{"insertions":46,"deletions":0}}},{"hash":"b791625622c1516b144b9178b6a788114f82cfa8","isMergeCommit":true,"messageTitle":"Merge pull request #73 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer guide","fileTypesAndContributionMap":{}},{"hash":"0699a596754f2b7bcc9f8b9c8be51117e12076c8","isMergeCommit":false,"messageTitle":"Update DeveloperGuide to include login system component","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":69,"deletions":3}}},{"hash":"718424751b2e26e41abb1a6a086f72f8d92057cb","isMergeCommit":true,"messageTitle":"Merge pull request #74 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update DeveloperGuide to include login system component","fileTypesAndContributionMap":{}},{"hash":"b28bae84c2fa402631c454cf16c43958e15246f8","isMergeCommit":false,"messageTitle":"Add exception handling for authenticateUserChoice method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":64},"test-code":{"insertions":0,"deletions":32}}},{"hash":"09293249c3f92cca9610c6b6ba142746f72f48bc","isMergeCommit":false,"messageTitle":"Add Java Docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"caf33c93038f985dd0c421a78c1fc6ef14488a58","isMergeCommit":false,"messageTitle":"Add Java docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"7f6e4dff2b472cb0a5c1c4ce0ecee507b448bc43","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":2}}},{"hash":"f1c6fa86da1e89edb3bb0802ead8b106089ea597","isMergeCommit":true,"messageTitle":"Merge pull request #75 from TeoHaoZhi/HaoZhi-Exceptions","messageBody":"Add execeptions and java docs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"9fea2f7bfa79c6c199ae33ed4f31dd788db2db55","isMergeCommit":true,"messageTitle":"Merge pull request #76 from martinschnder/sellCommand","messageBody":"Modify inventory structure and add all the command needed to make a sale","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"343ee190fb97f978ea49283551f6b591dd74267d","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":1}}},{"hash":"667c4a20e434525f5a1a9f4039e3c5656142ab8b","isMergeCommit":true,"messageTitle":"Merge pull request #78 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"0a9460e3de3e58fce483e11d6e315f2a2a66ea09","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"d6550e227a02e5ad46ede2649311aef426157414","isMergeCommit":true,"messageTitle":"Merge pull request #79 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"c92c67f4c1c94bc78dc52f58b399463f79446b6d","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":2}}},{"hash":"703a81938475b50a9ace0d9f0cdf0cb8af2b34f7","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":0}}},{"hash":"0baae65260c6fd8d638c021533b2542c4303c532","isMergeCommit":true,"messageTitle":"Merge pull request #81 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"68c9a0f44cb5a6028a69c5594fc19067342b1bab","isMergeCommit":true,"messageTitle":"Merge pull request #80 from Barbaracwx/branch-DeveloperGuide","messageBody":"updated Developer\u0027s Guide","fileTypesAndContributionMap":{}},{"hash":"6adc3cfd32ab71f4d124fc8771bd03d92a8c4cc9","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":3}}},{"hash":"33e5b4e4146befa4911d42d109c138db7dea126c","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"f6dc78291cee2f7449a9d394b0ddd239d5741a5a","isMergeCommit":true,"messageTitle":"Merge pull request #82 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"505f9c3c012219f07d38e5f2d03df9b2c8279921","isMergeCommit":true,"messageTitle":"Merge pull request #83 from Barbaracwx/branch-developersguideNew","messageBody":"updated developer\u0027s guide","fileTypesAndContributionMap":{}},{"hash":"674724af608464b0234c47546677d88ec094dba1","isMergeCommit":true,"messageTitle":"Merge pull request #85 from Barbaracwx/master","messageBody":"added uml diagrams","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"21d68cfa0f59bf19906c45126f282343b31d5e46","isMergeCommit":true,"messageTitle":"Merge pull request #89 from Barbaracwx/findcommandtest","messageBody":"Findcommandtest","fileTypesAndContributionMap":{}},{"hash":"1a0eacc8cf28b010d683eb8d3a33a54ec95817d1","isMergeCommit":true,"messageTitle":"Merge pull request #91 from karishma-t/karishma-Developer-Guide","messageBody":"Modify DG for delete","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"e3356ce5fbcc07cc6748c03ac24376471d6d0a67","isMergeCommit":false,"messageTitle":"Update UML","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":20}}},{"hash":"71b41675d7a09a3cb8d6dd173ec740a1a998ce8d","isMergeCommit":true,"messageTitle":"Merge pull request #93 from TeoHaoZhi/UML","messageBody":"Update UML","fileTypesAndContributionMap":{}},{"hash":"e14d45429110d0454025237a1fb5c3259767bfa8","isMergeCommit":false,"messageTitle":"Add addVendor Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":116,"deletions":16}}},{"hash":"b284882a9d1d2fd1a2ab200a0535cf84893fbe81","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":14}}},{"hash":"e4693841e4871364b409a2e567344d3b2d1c6d20","isMergeCommit":true,"messageTitle":"Merge pull request #95 from Barbaracwx/branch-StockLevel","messageBody":"added new stock level command","fileTypesAndContributionMap":{}},{"hash":"ec3e45d82c30f673e4397e7ff92f81036c1ee804","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Vendors","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"16c103da5094704ef33f3bcce063383e7d27b627","isMergeCommit":true,"messageTitle":"Merge pull request #94 from TeoHaoZhi/Vendors","messageBody":"Add addVendor Feature","fileTypesAndContributionMap":{}},{"hash":"7771c5e3be64819ed47f08353d536e8597dd27b9","isMergeCommit":false,"messageTitle":"Fix addVendor bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"59675fad58796c4a82fbbeebc773a67e88b1f63c","isMergeCommit":true,"messageTitle":"Merge pull request #98 from TeoHaoZhi/Vendors","messageBody":"Fix addVendor bug","fileTypesAndContributionMap":{}},{"hash":"dd8be75f2dcad5340c4c1c01f8bc3b07d81ec7a6","isMergeCommit":false,"messageTitle":"Fix abstraction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":31}}},{"hash":"8003e19cfac858b4a412d0893f0fea135324c2d9","isMergeCommit":true,"messageTitle":"Merge pull request #99 from TeoHaoZhi/FixAbstraction","messageBody":"Fix abstraction","fileTypesAndContributionMap":{}},{"hash":"0d5a92c12ad67bc214a2b6cf1577ed6e04088fe9","isMergeCommit":false,"messageTitle":"Add VendorList Feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":1},"test-code":{"insertions":61,"deletions":47}}},{"hash":"ade809a860d139a306dde45776fa856e5b1ebf30","isMergeCommit":true,"messageTitle":"Merge pull request #101 from TeoHaoZhi/VendorListFeature","messageBody":"Add VendorList Feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"6cc361564e253b755fbd64da229ec2b717368599","isMergeCommit":false,"messageTitle":"Update Java Docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":2}}},{"hash":"7544968cd74382ab68734fe61607008395dd4610","isMergeCommit":true,"messageTitle":"Merge pull request #102 from TeoHaoZhi/Javadoc","messageBody":"Update Java Docs","fileTypesAndContributionMap":{}},{"hash":"c6381578a9674e214188ccce351a9f40b917e5be","isMergeCommit":false,"messageTitle":"Update User guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":51,"deletions":2}}},{"hash":"fef7feda7f40d84f6f849e6dd19c1a2f9f44f461","isMergeCommit":true,"messageTitle":"Merge pull request #103 from TeoHaoZhi/UserGuide","messageBody":"Update User guide and UML diagram","fileTypesAndContributionMap":{}}]}],"Barbaracwx":[{"date":"2023-10-05","commitResults":[{"hash":"91e8e21dc2263c8657a5df7cb911512e24f1bf43","isMergeCommit":false,"messageTitle":"Added Barbara.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"ad260c19eda658e1aa9478315b4eb25553e0b865","isMergeCommit":true,"messageTitle":"Merge branch \u0027Barbaracwx-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"4e4b091ddc0b16dd22533420b4b27b848a03b825","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"180b32eebac4e0d2436dabe817edb0cba055abd9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"84b79a21099e3b74dc3e06f5eba86dff72264aba","isMergeCommit":false,"messageTitle":"Add Find Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":15}}},{"hash":"86beea836dfe6c2c103e3f4d3fdb76fc7d9d0a35","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-findCommand\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"7d4f40b7f2bed79141a458898b06fca9f8c62587","isMergeCommit":false,"messageTitle":"add new find function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15}}}]},{"date":"2023-10-17","commitResults":[{"hash":"ddcac51425f93cb187d620c962346d2b3d9751e2","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c51866c18f620a0e7d5156750805158e33e2e100","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-3/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95245940faaa042c2d33722b8d8d0560849a3bb6","isMergeCommit":false,"messageTitle":"Added j unit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":23,"deletions":0}}},{"hash":"4ff1edf92e602aa27f78e0c3d3a41d6c79330085","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3791585a90b35d360f8a80b8f48d5b2f9116505e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"06e11cafceac7c118b71d331893b25db1f57c313","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c2fa2315a0de008062a8b5cf5841c290b1a243ea","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-3/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"2b72a18f3da1599eaf69f5d70a5773b82e6a3748","isMergeCommit":false,"messageTitle":"change find command class to add ui class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":11},"test-code":{"insertions":16,"deletions":6}}},{"hash":"397da38e3c33d4dd15025228a9c9c85e7ffb7a11","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"5f6c065cadd0495287d2833fc544ae57491a64f0","isMergeCommit":false,"messageTitle":"added assertion statement","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"44e4e274eed15e597cb23df11f610716ebd52ccf","isMergeCommit":false,"messageTitle":"edited FindCommandTest cases","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":1},"test-code":{"insertions":10,"deletions":2}}}]},{"date":"2023-10-20","commitResults":[{"hash":"b06f328e50f72cc60b07d213aa938ba3f60e0309","isMergeCommit":false,"messageTitle":"add find command using both name and date","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":11},"test-code":{"insertions":8,"deletions":3}}},{"hash":"56171fad030833f03447323c39661904f90662ff","isMergeCommit":false,"messageTitle":"changed user guide according to new find function","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":15}}}]},{"date":"2023-10-25","commitResults":[{"hash":"03d6f232ad01fbb68be912b33d89572d9c519e89","isMergeCommit":false,"messageTitle":"updated Developer\u0027s Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":21}}},{"hash":"c235d47ce2aa21b70716cada4e37cc434e015d30","isMergeCommit":false,"messageTitle":"updated developer\u0027s guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":83,"deletions":1}}},{"hash":"5c3ae6371909ff03735045d6178edd07b35230f8","isMergeCommit":false,"messageTitle":"added uml diagrams","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":52,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"8fd0581bb131c46c9d2c4dcb3c609de4d35d5939","isMergeCommit":false,"messageTitle":"added more find command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":14},"test-code":{"insertions":51,"deletions":12}}},{"hash":"080c98c29d89a1138a24193e168dfb7768f4f1a8","isMergeCommit":false,"messageTitle":"added more find command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":16},"test-code":{"insertions":16,"deletions":3}}}]},{"date":"2023-10-28","commitResults":[{"hash":"bc7d8f25061432371b62776859d16689283ed7f8","isMergeCommit":false,"messageTitle":"added new stock level command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":113,"deletions":45},"test-code":{"insertions":5,"deletions":0}}}]}]},"authorFileTypeContributionMap":{"karishma-t":{"docs":58,"functional-code":18,"test-code":25},"martinschnder":{"docs":52,"functional-code":747,"test-code":87,"other":2},"azfarulmatin":{"docs":48,"functional-code":75,"test-code":15},"TeoHaoZhi":{"docs":445,"functional-code":805,"test-code":86,"other":3},"Barbaracwx":{"docs":204,"functional-code":175,"test-code":102}},"authorContributionVariance":{"karishma-t":286.78458,"martinschnder":20519.947,"azfarulmatin":811.8474,"TeoHaoZhi":16457.14,"Barbaracwx":2539.532},"authorDisplayNameMap":{"karishma-t":"CS2113-T17-3 KARI..ARAN","martinschnder":"CS2113-T17-3 SCHN..ILLE","azfarulmatin":"CS2113-T17-3 AZFA..ANDI","TeoHaoZhi":"CS2113-T17-3 TEO .. ZHI","Barbaracwx":"CS2113-T17-3 CHON..BARA"}} +{"authorDailyContributionsMap":{"karishma-t":[{"date":"2023-10-05","commitResults":[{"hash":"9b179211347fe7a0942693aea92a880a72243999","isMergeCommit":false,"messageTitle":"Add files for Karishma about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":4}}},{"hash":"ec15853438ef4adb88f2bbcc87f367804d35788d","isMergeCommit":false,"messageTitle":"Conflict resolution","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"5c174ca4cdfe79c6b173c68db27721f92aa0f615","isMergeCommit":false,"messageTitle":"Add delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":13}}},{"hash":"4c7d28ae3f51a16116cf790aabeb170d9ffaad80","isMergeCommit":false,"messageTitle":"Add junit test for Delete command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":30,"deletions":0}}},{"hash":"ed041352034696e09d01385f720d3f3a72037c62","isMergeCommit":false,"messageTitle":"Modify to pass checkstyle tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-26","commitResults":[{"hash":"521a48339b7e42ceb652e3e1d147a6c5b485792b","isMergeCommit":false,"messageTitle":"Modify DG for delete","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":53,"deletions":0}}}]}],"martinschnder":[{"date":"2023-10-07","commitResults":[{"hash":"d13e4519f0e878a3e9be46a05a57ee90c57539c8","isMergeCommit":false,"messageTitle":"Add martin portofolio and picture and update about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":1}}},{"hash":"2dbd0893fe8f3dac09ed84bb33c414c0e90c74e2","isMergeCommit":true,"messageTitle":"Merge pull request #12 from martinschnder/martin-AboutUs","messageBody":"Add martin portofolio and picture and update about us","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"eca592d2600d2253010eebbf55c4217a971ca79b","isMergeCommit":false,"messageTitle":"Updated build.gradle to match new main class name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"f9bf0f4dcbf0dc02f210e21283f8f18ddf745d2a","isMergeCommit":false,"messageTitle":"Reorganize files in various packages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":9},"other":{"insertions":2,"deletions":2}}},{"hash":"dd4cb2baf5df643afbefe71a963a78e7489a79b2","isMergeCommit":false,"messageTitle":"Create abstract command class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0}}},{"hash":"0a4ae29a7ca56b747974f29fc720e496c0cebaa3","isMergeCommit":false,"messageTitle":"Add the addclass and rename the druglist class to inventory","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":101,"deletions":19}}},{"hash":"9891fe1ce7e876b766da0e19a647588a3845d02d","isMergeCommit":false,"messageTitle":"Delete old file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":14}}},{"hash":"c76880c8d3ba9f7555f17105e6689822950877aa","isMergeCommit":false,"messageTitle":"Implement ExitCommand and AddCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":316,"deletions":18}}}]},{"date":"2023-10-10","commitResults":[{"hash":"dce79f9038b5eade80126270475b9775283d2fd2","isMergeCommit":false,"messageTitle":"Add ui and addcommand testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":29,"deletions":1}}}]},{"date":"2023-10-11","commitResults":[{"hash":"8910d7979fdebe5386871de9ea2cda42c5161370","isMergeCommit":false,"messageTitle":"Change the line separator character","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"d0a83e9fe5ed5a7cc13594979f0803fa8e9a2374","isMergeCommit":false,"messageTitle":"Change the line separator character in the UI class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"55d760266b318ad23fbab35a6d1857c73c063d17","isMergeCommit":true,"messageTitle":"Merge pull request #34 from martinschnder/addDrug-unit-tests","messageBody":"Add ui and addcommand testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"7646870a909320f59cefb562285e62abc23ef833","isMergeCommit":false,"messageTitle":"Modify inventory structure and add all the command needed to make a sale (addtocart, viewcart, checkout)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":402,"deletions":131},"test-code":{"insertions":23,"deletions":15}}},{"hash":"1134e5d481615a014073af9031ca71061ff42878","isMergeCommit":false,"messageTitle":"Fix load function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":15}}},{"hash":"4e4ef4698675691973d77ae7481e1ee117537acf","isMergeCommit":false,"messageTitle":"Add better exception handling","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":18}}},{"hash":"a075bd1720fd4eac5e8c090a897225d5d2057e6d","isMergeCommit":false,"messageTitle":"Update helpcommand with new commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":4},"test-code":{"insertions":43,"deletions":28}}}]},{"date":"2023-10-24","commitResults":[{"hash":"0a64a48a68acc1accbbfec26dd81f3df9574df9c","isMergeCommit":false,"messageTitle":"Add tests for AddToCart command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":27,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"b4d2647664ddb9696b52554ddbe328b730297a98","isMergeCommit":false,"messageTitle":"Add main data structures in developerGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":46,"deletions":21}}},{"hash":"18929947f4248686faad3b70fbff3687c9c19c3b","isMergeCommit":true,"messageTitle":"Merge pull request #84 from martinschnder/developerGuide","messageBody":"Add main data structures in developerGuide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"49bfbffa868b148a46b27908dabf16ebfd74cd63","isMergeCommit":true,"messageTitle":"Merge pull request #92 from Barbaracwx/findcommandtest","messageBody":"added sequence diagram","fileTypesAndContributionMap":{}},{"hash":"50d338b34b24893e5dca5485f21f08ff4ca6e60c","isMergeCommit":true,"messageTitle":"Merge pull request #113 from Barbaracwx/branch-alert","messageBody":"updated set threshold command","fileTypesAndContributionMap":{}}]}],"azfarulmatin":[{"date":"2023-10-07","commitResults":[{"hash":"6c8ee942babd12a205caa1b7e098fcb6340f76a9","isMergeCommit":false,"messageTitle":"Update Azfarul About us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"05e7ef8ec96488ea4719dfc0372532fe8e5694de","isMergeCommit":true,"messageTitle":"Merge pull request #19 from azfarulmatin/master","messageBody":"Update Azfarul About us","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"d5afb6bfea43555f6f259a086b672acaefd20e59","isMergeCommit":false,"messageTitle":"Add List function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":29}}},{"hash":"57a05c0bd5b98cc8b3bafc5eb9a158684e7aa058","isMergeCommit":true,"messageTitle":"Merge pull request #44 from azfarulmatin/AzfarulMatin-ListCommand","messageBody":"Add List function","fileTypesAndContributionMap":{}},{"hash":"4a24ed0a7c4ba4280e8279f225d94eca57adc5eb","isMergeCommit":false,"messageTitle":"Fix checkstyle and junit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15}}},{"hash":"a1860305e34b8c74ade793866b25205f953c8319","isMergeCommit":true,"messageTitle":"Merge pull request #45 from azfarulmatin/AzfarulMatin-ListCommand","messageBody":"Fix checkstyle and junit test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"1dda9d2754e2a02578da9238442c6d10f7e66d6f","isMergeCommit":false,"messageTitle":"Add JUnit Test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":16,"deletions":0}}},{"hash":"440fa5dc27d5fd869d27429012fdbe5aeeae7619","isMergeCommit":true,"messageTitle":"Merge pull request #46 from azfarulmatin/AzfarulMatin-JUnitTestListCommand","messageBody":"Add JUnit Test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"3887203ffba5c298294ab19aea34a4d3ed459f58","isMergeCommit":false,"messageTitle":"Add assertions for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"09522dd36305e098a7b90627e22eb45576b25579","isMergeCommit":true,"messageTitle":"Merge pull request #65 from azfarulmatin/master","messageBody":"Add assertions for ListCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"48b64546002893200c17724ba054f54c1593848a","isMergeCommit":false,"messageTitle":"Update ListCommand in Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":40,"deletions":0}}},{"hash":"c9f60b4f7e954b7f51ac2623133f116e513fd8d7","isMergeCommit":true,"messageTitle":"Merge pull request #87 from azfarulmatin/AzfarulMatin-DeveloperGuide","messageBody":"Update ListCommand in Developer Guide","fileTypesAndContributionMap":{}}]}],"TeoHaoZhi":[{"date":"2023-10-05","commitResults":[{"hash":"f2bef309abc1a31812e5cb92d52cc3edc1ea44c6","isMergeCommit":false,"messageTitle":"Update UserGuide.md to add theme","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":0}}},{"hash":"80b42e7c9d1a437ae8bed5f38e44c218f440f47c","isMergeCommit":true,"messageTitle":"Merge pull request #2 from Barbaracwx/Barbaracwx-AboutUs","messageBody":"Added Barbara.md","fileTypesAndContributionMap":{}},{"hash":"aa9ba0c6a59865a89b52a6f53b7df1df57bb99de","isMergeCommit":false,"messageTitle":"Add files for Hao Zhi\u0027s about us page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"78381da48ea0ab8048ffca83fc47af7dd59e458b","isMergeCommit":true,"messageTitle":"Merge branch \u0027HaoZhi-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c0c3018bd7af6a34e46ede0867b55d0a498285ce","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5034d288227d95c1a28ecc2359f1ea357dd3b437","isMergeCommit":true,"messageTitle":"Merge pull request #3 from TeoHaoZhi/master","messageBody":"Add HaoZhi\u0027s about us files","fileTypesAndContributionMap":{}},{"hash":"88803a7aec4b841305b2a7716850e466193ec107","isMergeCommit":false,"messageTitle":"Clean up UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-06","commitResults":[{"hash":"220ea22f86c3d933219eefa1ae6e0c2fabea1d44","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into karishma-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"800151596e695fdfd13c417def35fd80dc78fed4","isMergeCommit":true,"messageTitle":"Merge pull request #10 from karishma-t/karishma-AboutUs","messageBody":"Add Karishma about us","fileTypesAndContributionMap":{}},{"hash":"4a53af6054886017e9cf732a597960c970f202d4","isMergeCommit":false,"messageTitle":"Fix about us portfolio bug","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"eb792a86d1eb0fd6ea4e2bca18a1ed4e10c07661","isMergeCommit":true,"messageTitle":"Merge pull request #11 from TeoHaoZhi/master","messageBody":"Fix about us portfolio bug","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"090f7fd2112203bcd0f818c6a79ab83c1945118e","isMergeCommit":false,"messageTitle":"Rename classes","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":4,"deletions":4}}},{"hash":"cd37b8a6e9414c1fa24b68559ff23066fde03931","isMergeCommit":true,"messageTitle":"Merge pull request #23 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Rename classes","fileTypesAndContributionMap":{}},{"hash":"293aa145c39d8d91f975a08e7f0c8f491234cd7e","isMergeCommit":false,"messageTitle":"Add dummy classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":0}}},{"hash":"3d5504d42b2532eadb56b49ff210b09cdd50284c","isMergeCommit":true,"messageTitle":"Merge pull request #24 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add dummy classes","fileTypesAndContributionMap":{}},{"hash":"d842866453c774e4e7cb523fc0f6d99109564fbb","isMergeCommit":false,"messageTitle":"Add attributes to drug class","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1},"test-code":{"insertions":46,"deletions":20}}},{"hash":"7988e7aab82f83af8ed057426371bc9f8066e5c2","isMergeCommit":true,"messageTitle":"Merge pull request #25 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add attributes to drug class","fileTypesAndContributionMap":{}},{"hash":"1746b905d7c8f9941ce95abe0c601ed7a555d341","isMergeCommit":false,"messageTitle":"Add help feature to UI class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":1}}},{"hash":"227af0572b033254d6546284a0ee2f875a71c3a9","isMergeCommit":true,"messageTitle":"Merge pull request #26 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add help feature to UI class","fileTypesAndContributionMap":{}},{"hash":"7299b86db5d860ab190c91abd4c6962273b196cd","isMergeCommit":false,"messageTitle":"Add exit point for programme","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":11},"other":{"insertions":0,"deletions":0},"test-code":{"insertions":0,"deletions":49}}},{"hash":"de4799c7421e4b4195b2576cd2425462d6a6fa0e","isMergeCommit":true,"messageTitle":"Merge pull request #27 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Add exit point for programme","fileTypesAndContributionMap":{}},{"hash":"354c79d2f7cbb08fb7700ca95ef4ca362f2c172d","isMergeCommit":false,"messageTitle":"Refactor printing for help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":24}}},{"hash":"8ab6c94c4d553c98bdc4616b2841d95fea09e2e7","isMergeCommit":true,"messageTitle":"Merge pull request #28 from TeoHaoZhi/HaoZhi-TemplateAttempt2","messageBody":"Refactor printing for help command","fileTypesAndContributionMap":{}},{"hash":"5bf20560cb92c584383123cf1ba209e1943da17b","isMergeCommit":false,"messageTitle":"Add Junit test for help feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":5},"test-code":{"insertions":47,"deletions":0}}},{"hash":"0cce6790d3939b1aa5f6309f8c81e87f8490dceb","isMergeCommit":true,"messageTitle":"Merge pull request #29 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Add Junit test for help feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"44f897c607a7bf71459ce63ef7a22368d8374d2c","isMergeCommit":true,"messageTitle":"Merge pull request #30 from martinschnder/branch-AddCommand","messageBody":"Branch add command","fileTypesAndContributionMap":{}},{"hash":"38f4573bdbf922271274ff418303a83c5ba9778e","isMergeCommit":false,"messageTitle":"Add more class templates","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":22}}},{"hash":"7ab218bb640ddf7a60822ecd133989bcd0d2a220","isMergeCommit":true,"messageTitle":"Merge pull request #31 from TeoHaoZhi/HaoZhi-ListCommandHelp","messageBody":"Add more class templates","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"e366c56327163c3ebdcc63a2889b90ea43218e50","isMergeCommit":false,"messageTitle":"Update userguide markdown file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":154,"deletions":12}}},{"hash":"67f9f7118ed7fe8c06884e7757e87e6c634fa6d8","isMergeCommit":true,"messageTitle":"Merge pull request #32 from TeoHaoZhi/HaoZhi-UserGuideUpdateV1.0","messageBody":"Update userguide markdown file","fileTypesAndContributionMap":{}},{"hash":"b6fd34963d346c40de9d71cb9ea43699a14d4b8d","isMergeCommit":false,"messageTitle":"Update README","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":2}}},{"hash":"a3f768d82e7036ec93e0543e7c2db1847279aa1c","isMergeCommit":true,"messageTitle":"Merge pull request #33 from TeoHaoZhi/HaoZhi-ReadMe","messageBody":"Update README","fileTypesAndContributionMap":{}},{"hash":"dc4311ad9d1840486a71ba7958140542108c093a","isMergeCommit":false,"messageTitle":"Add Junit test for help command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":29,"deletions":0}}},{"hash":"324c68f05643be382892df3fec2ec0d7ea16d361","isMergeCommit":false,"messageTitle":"Fix checkstyle violation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":5}}},{"hash":"7a54cf286c00c3cf7864d2bc4859e14c0e4c9a4d","isMergeCommit":true,"messageTitle":"Merge pull request #35 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Add Junit test for help command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"bac5f0f114fe6974123b6090f5bfc2ad035bbf64","isMergeCommit":false,"messageTitle":"Edit Junit test for help","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":13,"deletions":13}}},{"hash":"e5380e513c5f79d6570dca09171f3f1fc58402d2","isMergeCommit":true,"messageTitle":"Merge pull request #36 from TeoHaoZhi/HaoZhi-JUnitTestForHelpFeature","messageBody":"Edit Junit test for help","fileTypesAndContributionMap":{}},{"hash":"350fcc060811c2f4e25cb36254f2bd7845ea9338","isMergeCommit":false,"messageTitle":"Add methods to write to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":0}}},{"hash":"a46e5821d0bcebdf8cc07433cfb197f7fd91490b","isMergeCommit":false,"messageTitle":"Update method to append to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"d25c1fefd9e13e3320c18ff49032c4dfc91e93a4","isMergeCommit":false,"messageTitle":"Add login system class to handle login features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":124,"deletions":0}}},{"hash":"366c60438a5b4307401d2af9368d4c60d28dc73f","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"be08c4a84413626b9f7bcc47b0264320f8ecb7bd","isMergeCommit":true,"messageTitle":"Merge pull request #37 from TeoHaoZhi/HaoZhi-LoginFeatureAttempt1","messageBody":"Add login system class","fileTypesAndContributionMap":{}},{"hash":"d2aef4c2cf81d80323363559b85cd7dcc5aad9d1","isMergeCommit":false,"messageTitle":"Fix infinite while loop","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"5847e7d3f2046d0a5d03b96582f032e83b8d2443","isMergeCommit":false,"messageTitle":"Fix bug of overwriting txt file instead of adding to it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":4}}},{"hash":"f4fec5773b73e56a551fc2f99440e3b21f9646b1","isMergeCommit":false,"messageTitle":"Fix bugs in login system class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":89,"deletions":17}}},{"hash":"c35451f09fa1f1f1423fa4e8ad3d75679d362e2b","isMergeCommit":false,"messageTitle":"FIx Bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":20}}},{"hash":"7617592e5273ba22fa90061e426827bbed215362","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":6}}}]},{"date":"2023-10-12","commitResults":[{"hash":"ab49cf95fb9ceab78bfb2b6c312dbd694de75ff9","isMergeCommit":false,"messageTitle":"FIx bug causing failing CI test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":27}}},{"hash":"5323884d9709dde52cf9cd1670bc8f9274e3ad90","isMergeCommit":true,"messageTitle":"Merge pull request #38 from TeoHaoZhi/HaoZhi-LoginFeatureAttempt1","messageBody":"Login attempt bug fix 1","fileTypesAndContributionMap":{}},{"hash":"5b76d7f4809b669df3bcaab0d3c8c352d856d267","isMergeCommit":false,"messageTitle":"Fix printing formatting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":17}}}]},{"date":"2023-10-14","commitResults":[{"hash":"10259ca61e695c8802fec0130f28e74e79e8e7a5","isMergeCommit":false,"messageTitle":"Add assertion for login system","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"988ee96196908057baaa52e3c90e60bf2eda330c","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"6aaeb409f9ed28c1096b87feda862eff1758f9c5","isMergeCommit":false,"messageTitle":"Edit runtest.sh file to disable it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"e917a9b035a3b985e45f43336a0e3e88a1438d6f","isMergeCommit":false,"messageTitle":"Fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3},"test-code":{"insertions":1,"deletions":1}}},{"hash":"28336545c9ca20145bd634e797f0ac345650ab7e","isMergeCommit":false,"messageTitle":"Edit runtest.bat to disable IO test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"389f5999bc5fcee00d3e38aa2b8e6693fcbad44d","isMergeCommit":true,"messageTitle":"Merge pull request #40 from TeoHaoZhi/HaoZhi-BugfixLogin","messageBody":"Add assertion for login system","fileTypesAndContributionMap":{}},{"hash":"fd5869a315e63b3e4c9daa003af97dcd133a587e","isMergeCommit":false,"messageTitle":"Added messages to let UI handle printing of messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":19}}},{"hash":"38a69c177d2e593158303f95f1e3f2a5e2134ab5","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":70,"deletions":22}}},{"hash":"a4be93035d88733cf3f1953bda32ace09527017b","isMergeCommit":true,"messageTitle":"Merge pull request #41 from TeoHaoZhi/LoginMessagesFix","messageBody":"Added messages to let UI handle printing of messages","fileTypesAndContributionMap":{}},{"hash":"3528ac948b94285edb8196292d9955d1559b06dc","isMergeCommit":false,"messageTitle":"Update javadoc for login system class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":3}}},{"hash":"724368c8a4964dddcb0e716f7d37672d523d20f3","isMergeCommit":true,"messageTitle":"Merge pull request #42 from TeoHaoZhi/HaoZhi-JavaDocLoginSystem","messageBody":"Update javadoc for login system class","fileTypesAndContributionMap":{}},{"hash":"c9782f17e67050c1dd5b05b5ff7b3dba093e6780","isMergeCommit":false,"messageTitle":"Added java doc for file storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":3}}},{"hash":"01e37de8ce32537e7df7854fa385be003f07ea71","isMergeCommit":true,"messageTitle":"Merge pull request #43 from TeoHaoZhi/Javadoc","messageBody":"Added java doc for file storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"8573f29dd50f626312f717999098767234e5ab67","isMergeCommit":false,"messageTitle":"Add userguide on login system","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":59,"deletions":20}}},{"hash":"df15ef01089d4ccc1210bc929a19a5bc0c69095a","isMergeCommit":false,"messageTitle":"Fix Junit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":12},"test-code":{"insertions":47,"deletions":30}}},{"hash":"f68a2eea9a7c6a51fc7ed0980c82bbe61486a20c","isMergeCommit":true,"messageTitle":"Merge pull request #47 from TeoHaoZhi/HaoZhi-MarkDown","messageBody":"Edit userguide","fileTypesAndContributionMap":{}},{"hash":"1ec8b571b25dada302c74e04f3398697ab08a189","isMergeCommit":false,"messageTitle":"Fix bug of blank input for username and password","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":8}}},{"hash":"6f77ee60f5ed10366ecfbcc8a3d26b20f5c9d528","isMergeCommit":true,"messageTitle":"Merge pull request #48 from TeoHaoZhi/LoginSystemBlankinput","messageBody":"Fix bug of blank input for username and password","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"b6cb73dbbfd6780178d32c3949b2fd24f046e11e","isMergeCommit":true,"messageTitle":"Merge pull request #50 from Barbaracwx/branch-FindCommandNew","messageBody":"Branch find command new","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"2d9902628161064ffcd7105230dd6fa765b188ca","isMergeCommit":false,"messageTitle":"Update user guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":5}}},{"hash":"e01effd8dc540db39d938e72fa2dc7d0f0cb72b5","isMergeCommit":true,"messageTitle":"Merge pull request #54 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update user guide","fileTypesAndContributionMap":{}},{"hash":"f53e9e97737095dc7367aba076d5f5f98d120061","isMergeCommit":true,"messageTitle":"Merge pull request #55 from Barbaracwx/branch-TestCodeFindCommand","messageBody":"Added j unit test","fileTypesAndContributionMap":{}},{"hash":"14271486fb1978d5c85475b176ff6f34c0160998","isMergeCommit":true,"messageTitle":"Merge pull request #52 from karishma-t/karishma-DeleteCommand","messageBody":"Add delete command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7d3d19836e43e535ca879db7a2f24e84fb2ade61","isMergeCommit":true,"messageTitle":"Merge pull request #57 from Barbaracwx/master","messageBody":"changed findCommand to add ui class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"29f5aec77019ca6585b88faf87f1c5a812cb8663","isMergeCommit":true,"messageTitle":"Merge pull request #60 from Barbaracwx/branch-assertionStatement","messageBody":"added assertion statement","fileTypesAndContributionMap":{}},{"hash":"9c0f2d2c8ce561200f6b7c15c96d645ef87c2357","isMergeCommit":true,"messageTitle":"Merge pull request #61 from Barbaracwx/branch-CodeTest","messageBody":"edited FindCommandTest cases","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"0d83e630f1be68cc6ee693a7e8e8efd07703d072","isMergeCommit":true,"messageTitle":"Merge pull request #64 from Barbaracwx/branch-FindCommandName","messageBody":"add find command using both name and date","fileTypesAndContributionMap":{}},{"hash":"a5ce4e7ef58f1828ca4061d12735e197f8b1d03e","isMergeCommit":true,"messageTitle":"Merge pull request #66 from Barbaracwx/branch-UserGuide","messageBody":"changed user guide according to new find function","fileTypesAndContributionMap":{}},{"hash":"b24a4051f1319ef08dcf942aa00fd5002f86b3f3","isMergeCommit":false,"messageTitle":"Add register and login commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":28}}},{"hash":"d48892620bf2425f4d20f7bf67f119d866e7aba6","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":6},"test-code":{"insertions":12,"deletions":2}}},{"hash":"41b3713088803f0fa62c1701e642c1a7f82f3de0","isMergeCommit":true,"messageTitle":"Merge pull request #68 from TeoHaoZhi/HaoZhi-RegisterClass","messageBody":"Add register command and login command","fileTypesAndContributionMap":{}},{"hash":"7cc709dbb251572295f802094e1290f43d252837","isMergeCommit":false,"messageTitle":"Update userguide to reflect register and login feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":54,"deletions":2}}},{"hash":"2d8343571d10857aae93337064ae0f04eac9105b","isMergeCommit":true,"messageTitle":"Merge pull request #69 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update userguide to reflect register and login feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"0bf3c4287787d2f9b4bea2ea4dd9c5fdb0da70da","isMergeCommit":false,"messageTitle":"Add save feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":6},"test-code":{"insertions":5,"deletions":0}}},{"hash":"b18733d8b51c292afa238a16e6cb240638acb2e3","isMergeCommit":true,"messageTitle":"Merge pull request #71 from TeoHaoZhi/HaoZhi-SaveFeature","messageBody":"Add save feature","fileTypesAndContributionMap":{}},{"hash":"f3cc4e3e29ffde5997c1ebbea5db55f590d3e8ff","isMergeCommit":false,"messageTitle":"Update Userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":27,"deletions":1}}},{"hash":"5f4541a2603dfded61643c40c14e898d37ae263d","isMergeCommit":true,"messageTitle":"Merge pull request #72 from TeoHaoZhi/HaoZhi-UpdateUserGuide","messageBody":"Update Userguide","fileTypesAndContributionMap":{}},{"hash":"5d82131cb223c10000d72b98f149435e68aba0e8","isMergeCommit":false,"messageTitle":"Update Developer guide","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"docs":{"insertions":46,"deletions":0}}},{"hash":"b791625622c1516b144b9178b6a788114f82cfa8","isMergeCommit":true,"messageTitle":"Merge pull request #73 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer guide","fileTypesAndContributionMap":{}},{"hash":"0699a596754f2b7bcc9f8b9c8be51117e12076c8","isMergeCommit":false,"messageTitle":"Update DeveloperGuide to include login system component","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":69,"deletions":3}}},{"hash":"718424751b2e26e41abb1a6a086f72f8d92057cb","isMergeCommit":true,"messageTitle":"Merge pull request #74 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update DeveloperGuide to include login system component","fileTypesAndContributionMap":{}},{"hash":"b28bae84c2fa402631c454cf16c43958e15246f8","isMergeCommit":false,"messageTitle":"Add exception handling for authenticateUserChoice method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":64},"test-code":{"insertions":0,"deletions":32}}},{"hash":"09293249c3f92cca9610c6b6ba142746f72f48bc","isMergeCommit":false,"messageTitle":"Add Java Docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"caf33c93038f985dd0c421a78c1fc6ef14488a58","isMergeCommit":false,"messageTitle":"Add Java docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":3}}},{"hash":"7f6e4dff2b472cb0a5c1c4ce0ecee507b448bc43","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":2}}},{"hash":"f1c6fa86da1e89edb3bb0802ead8b106089ea597","isMergeCommit":true,"messageTitle":"Merge pull request #75 from TeoHaoZhi/HaoZhi-Exceptions","messageBody":"Add execeptions and java docs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"9fea2f7bfa79c6c199ae33ed4f31dd788db2db55","isMergeCommit":true,"messageTitle":"Merge pull request #76 from martinschnder/sellCommand","messageBody":"Modify inventory structure and add all the command needed to make a sale","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"343ee190fb97f978ea49283551f6b591dd74267d","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":1}}},{"hash":"667c4a20e434525f5a1a9f4039e3c5656142ab8b","isMergeCommit":true,"messageTitle":"Merge pull request #78 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"0a9460e3de3e58fce483e11d6e315f2a2a66ea09","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"d6550e227a02e5ad46ede2649311aef426157414","isMergeCommit":true,"messageTitle":"Merge pull request #79 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"c92c67f4c1c94bc78dc52f58b399463f79446b6d","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":2}}},{"hash":"703a81938475b50a9ace0d9f0cdf0cb8af2b34f7","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":0}}},{"hash":"0baae65260c6fd8d638c021533b2542c4303c532","isMergeCommit":true,"messageTitle":"Merge pull request #81 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"68c9a0f44cb5a6028a69c5594fc19067342b1bab","isMergeCommit":true,"messageTitle":"Merge pull request #80 from Barbaracwx/branch-DeveloperGuide","messageBody":"updated Developer\u0027s Guide","fileTypesAndContributionMap":{}},{"hash":"6adc3cfd32ab71f4d124fc8771bd03d92a8c4cc9","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":3}}},{"hash":"33e5b4e4146befa4911d42d109c138db7dea126c","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"f6dc78291cee2f7449a9d394b0ddd239d5741a5a","isMergeCommit":true,"messageTitle":"Merge pull request #82 from TeoHaoZhi/HaoZhi-DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"505f9c3c012219f07d38e5f2d03df9b2c8279921","isMergeCommit":true,"messageTitle":"Merge pull request #83 from Barbaracwx/branch-developersguideNew","messageBody":"updated developer\u0027s guide","fileTypesAndContributionMap":{}},{"hash":"674724af608464b0234c47546677d88ec094dba1","isMergeCommit":true,"messageTitle":"Merge pull request #85 from Barbaracwx/master","messageBody":"added uml diagrams","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"21d68cfa0f59bf19906c45126f282343b31d5e46","isMergeCommit":true,"messageTitle":"Merge pull request #89 from Barbaracwx/findcommandtest","messageBody":"Findcommandtest","fileTypesAndContributionMap":{}},{"hash":"1a0eacc8cf28b010d683eb8d3a33a54ec95817d1","isMergeCommit":true,"messageTitle":"Merge pull request #91 from karishma-t/karishma-Developer-Guide","messageBody":"Modify DG for delete","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"e3356ce5fbcc07cc6748c03ac24376471d6d0a67","isMergeCommit":false,"messageTitle":"Update UML","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":20}}},{"hash":"71b41675d7a09a3cb8d6dd173ec740a1a998ce8d","isMergeCommit":true,"messageTitle":"Merge pull request #93 from TeoHaoZhi/UML","messageBody":"Update UML","fileTypesAndContributionMap":{}},{"hash":"e14d45429110d0454025237a1fb5c3259767bfa8","isMergeCommit":false,"messageTitle":"Add addVendor Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":116,"deletions":16}}},{"hash":"b284882a9d1d2fd1a2ab200a0535cf84893fbe81","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":14}}},{"hash":"e4693841e4871364b409a2e567344d3b2d1c6d20","isMergeCommit":true,"messageTitle":"Merge pull request #95 from Barbaracwx/branch-StockLevel","messageBody":"added new stock level command","fileTypesAndContributionMap":{}},{"hash":"ec3e45d82c30f673e4397e7ff92f81036c1ee804","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Vendors","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"16c103da5094704ef33f3bcce063383e7d27b627","isMergeCommit":true,"messageTitle":"Merge pull request #94 from TeoHaoZhi/Vendors","messageBody":"Add addVendor Feature","fileTypesAndContributionMap":{}},{"hash":"7771c5e3be64819ed47f08353d536e8597dd27b9","isMergeCommit":false,"messageTitle":"Fix addVendor bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"59675fad58796c4a82fbbeebc773a67e88b1f63c","isMergeCommit":true,"messageTitle":"Merge pull request #98 from TeoHaoZhi/Vendors","messageBody":"Fix addVendor bug","fileTypesAndContributionMap":{}},{"hash":"dd8be75f2dcad5340c4c1c01f8bc3b07d81ec7a6","isMergeCommit":false,"messageTitle":"Fix abstraction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":31}}},{"hash":"8003e19cfac858b4a412d0893f0fea135324c2d9","isMergeCommit":true,"messageTitle":"Merge pull request #99 from TeoHaoZhi/FixAbstraction","messageBody":"Fix abstraction","fileTypesAndContributionMap":{}},{"hash":"0d5a92c12ad67bc214a2b6cf1577ed6e04088fe9","isMergeCommit":false,"messageTitle":"Add VendorList Feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":1},"test-code":{"insertions":61,"deletions":47}}},{"hash":"ade809a860d139a306dde45776fa856e5b1ebf30","isMergeCommit":true,"messageTitle":"Merge pull request #101 from TeoHaoZhi/VendorListFeature","messageBody":"Add VendorList Feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"6cc361564e253b755fbd64da229ec2b717368599","isMergeCommit":false,"messageTitle":"Update Java Docs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":2}}},{"hash":"7544968cd74382ab68734fe61607008395dd4610","isMergeCommit":true,"messageTitle":"Merge pull request #102 from TeoHaoZhi/Javadoc","messageBody":"Update Java Docs","fileTypesAndContributionMap":{}},{"hash":"c6381578a9674e214188ccce351a9f40b917e5be","isMergeCommit":false,"messageTitle":"Update User guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":51,"deletions":2}}},{"hash":"fef7feda7f40d84f6f849e6dd19c1a2f9f44f461","isMergeCommit":true,"messageTitle":"Merge pull request #103 from TeoHaoZhi/UserGuide","messageBody":"Update User guide and UML diagram","fileTypesAndContributionMap":{}},{"hash":"f794fa615e63df9591f96720f081f57b1e167b13","isMergeCommit":false,"messageTitle":"Update Developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":15,"deletions":1}}},{"hash":"035e8005eabf106c4bae9247d28d93e9844c947a","isMergeCommit":true,"messageTitle":"Merge pull request #104 from TeoHaoZhi/DeveloperGuide","messageBody":"Update Developer guide","fileTypesAndContributionMap":{}},{"hash":"4d74b146a0b288d69094b0a9651b8bfb6a83d29a","isMergeCommit":false,"messageTitle":"Update Developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":0}}},{"hash":"449e91de789b9a45040398b06f64e79ba7746940","isMergeCommit":true,"messageTitle":"Merge pull request #106 from TeoHaoZhi/DeveloperGuide","messageBody":"Update Developer guide","fileTypesAndContributionMap":{}},{"hash":"9097e5b1de1d8e8f285f9963c23a981291f40d7c","isMergeCommit":true,"messageTitle":"Merge pull request #107 from Barbaracwx/branch-UGnew","messageBody":"updated UG with stock level command","fileTypesAndContributionMap":{}},{"hash":"16c27768dd4411ee65ada23e2ced21503514493f","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":1}}},{"hash":"6486fe783c57563e9785ee0d2094b56b74ba2af3","isMergeCommit":true,"messageTitle":"Merge pull request #108 from TeoHaoZhi/DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"fe61f782aaefc5bdd638ba5d44f2426f6d49475c","isMergeCommit":false,"messageTitle":"Update Developer Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":0}}},{"hash":"a0c49e6186db8768dba66f3514bdf382e81e5255","isMergeCommit":true,"messageTitle":"Merge pull request #109 from TeoHaoZhi/DeveloperGuide","messageBody":"Update Developer Guide","fileTypesAndContributionMap":{}},{"hash":"e2c7c8aa62125a76dae3ae4eb1dee3b22e5ced5f","isMergeCommit":true,"messageTitle":"Merge pull request #110 from Barbaracwx/branch-stocklevelcommandtest","messageBody":"added stock level command test","fileTypesAndContributionMap":{}}]}],"Barbaracwx":[{"date":"2023-10-05","commitResults":[{"hash":"91e8e21dc2263c8657a5df7cb911512e24f1bf43","isMergeCommit":false,"messageTitle":"Added Barbara.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"ad260c19eda658e1aa9478315b4eb25553e0b865","isMergeCommit":true,"messageTitle":"Merge branch \u0027Barbaracwx-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"4e4b091ddc0b16dd22533420b4b27b848a03b825","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"180b32eebac4e0d2436dabe817edb0cba055abd9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"84b79a21099e3b74dc3e06f5eba86dff72264aba","isMergeCommit":false,"messageTitle":"Add Find Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":15}}},{"hash":"86beea836dfe6c2c103e3f4d3fdb76fc7d9d0a35","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-findCommand\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"7d4f40b7f2bed79141a458898b06fca9f8c62587","isMergeCommit":false,"messageTitle":"add new find function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":15}}}]},{"date":"2023-10-17","commitResults":[{"hash":"ddcac51425f93cb187d620c962346d2b3d9751e2","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c51866c18f620a0e7d5156750805158e33e2e100","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-3/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95245940faaa042c2d33722b8d8d0560849a3bb6","isMergeCommit":false,"messageTitle":"Added j unit test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":23,"deletions":0}}},{"hash":"4ff1edf92e602aa27f78e0c3d3a41d6c79330085","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3791585a90b35d360f8a80b8f48d5b2f9116505e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"06e11cafceac7c118b71d331893b25db1f57c313","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-3:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c2fa2315a0de008062a8b5cf5841c290b1a243ea","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-3/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"2b72a18f3da1599eaf69f5d70a5773b82e6a3748","isMergeCommit":false,"messageTitle":"change find command class to add ui class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":11},"test-code":{"insertions":16,"deletions":6}}},{"hash":"397da38e3c33d4dd15025228a9c9c85e7ffb7a11","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Barbaracwx/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"5f6c065cadd0495287d2833fc544ae57491a64f0","isMergeCommit":false,"messageTitle":"added assertion statement","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"44e4e274eed15e597cb23df11f610716ebd52ccf","isMergeCommit":false,"messageTitle":"edited FindCommandTest cases","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":1},"test-code":{"insertions":10,"deletions":2}}}]},{"date":"2023-10-20","commitResults":[{"hash":"b06f328e50f72cc60b07d213aa938ba3f60e0309","isMergeCommit":false,"messageTitle":"add find command using both name and date","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":11},"test-code":{"insertions":8,"deletions":3}}},{"hash":"56171fad030833f03447323c39661904f90662ff","isMergeCommit":false,"messageTitle":"changed user guide according to new find function","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":15}}}]},{"date":"2023-10-25","commitResults":[{"hash":"03d6f232ad01fbb68be912b33d89572d9c519e89","isMergeCommit":false,"messageTitle":"updated Developer\u0027s Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":21}}},{"hash":"c235d47ce2aa21b70716cada4e37cc434e015d30","isMergeCommit":false,"messageTitle":"updated developer\u0027s guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":83,"deletions":1}}},{"hash":"5c3ae6371909ff03735045d6178edd07b35230f8","isMergeCommit":false,"messageTitle":"added uml diagrams","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":52,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"8fd0581bb131c46c9d2c4dcb3c609de4d35d5939","isMergeCommit":false,"messageTitle":"added more find command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":14},"test-code":{"insertions":51,"deletions":12}}},{"hash":"080c98c29d89a1138a24193e168dfb7768f4f1a8","isMergeCommit":false,"messageTitle":"added more find command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":16},"test-code":{"insertions":16,"deletions":3}}},{"hash":"14e5eee09b7bd035c3430e7ee741990cfef3a356","isMergeCommit":false,"messageTitle":"changed find command sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":1}}},{"hash":"0a9986d8b0c6ebbd10c964743992b64efdf0ac00","isMergeCommit":false,"messageTitle":"changed sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-28","commitResults":[{"hash":"bc7d8f25061432371b62776859d16689283ed7f8","isMergeCommit":false,"messageTitle":"added new stock level command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":113,"deletions":45},"test-code":{"insertions":5,"deletions":0}}}]},{"date":"2023-10-29","commitResults":[{"hash":"92805b4d14bae7dbb680a8bc830f22ea6cb3eadd","isMergeCommit":false,"messageTitle":"updated UG with stock level command","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":32,"deletions":8}}},{"hash":"3fa4734a468c6253b0e769b116d0d74e77b3fc9c","isMergeCommit":false,"messageTitle":"added stock level command test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":44,"deletions":0}}},{"hash":"8295f445488c08263a248ab1ab6c753bffdace76","isMergeCommit":false,"messageTitle":"add set threshold quantity","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":6}}},{"hash":"d7f07141cbb795161500b7f24bcf459d326de38f","isMergeCommit":false,"messageTitle":"updated set threshold command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"15f92bfa2157af06e4ee0fc567597e7207f39e31","isMergeCommit":false,"messageTitle":"updated new set threshold method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":5}}},{"hash":"1d2b93386b284102aaae2d5efbe8395cd05b0194","isMergeCommit":false,"messageTitle":"updated set threshold method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"70c3ba37a5e49c211b5ff7a581de476ac43fe0f3","isMergeCommit":false,"messageTitle":"add new set threshold method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]}]},"authorFileTypeContributionMap":{"karishma-t":{"docs":57,"functional-code":18,"test-code":25},"martinschnder":{"docs":52,"functional-code":746,"test-code":87,"other":2},"azfarulmatin":{"docs":47,"functional-code":75,"test-code":15},"TeoHaoZhi":{"docs":500,"functional-code":805,"test-code":86,"other":3},"Barbaracwx":{"docs":239,"functional-code":260,"test-code":146}},"authorContributionVariance":{"karishma-t":286.78458,"martinschnder":20519.947,"azfarulmatin":811.8474,"TeoHaoZhi":16543.656,"Barbaracwx":3407.7598},"authorDisplayNameMap":{"karishma-t":"CS2113-T17-3 KARI..ARAN","martinschnder":"CS2113-T17-3 SCHN..ILLE","azfarulmatin":"CS2113-T17-3 AZFA..ANDI","TeoHaoZhi":"CS2113-T17-3 TEO .. ZHI","Barbaracwx":"CS2113-T17-3 CHON..BARA"}} diff --git a/AY2324S1-CS2113-T17-4_tp_master/authorship.json b/AY2324S1-CS2113-T17-4_tp_master/authorship.json index c449963..6947937 100644 --- a/AY2324S1-CS2113-T17-4_tp_master/authorship.json +++ b/AY2324S1-CS2113-T17-4_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Duke project template","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below: i love 2113 ","lastModifiedDate":"2023-10-05"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"SebasFok":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"rohitcube"},"content":" implementation \u0027com.googlecode.json-simple:json-simple:1.1.1\u0027","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run {","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"janelleenqi":1,"rohitcube":1,"-":46}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"|--------------------------------|:-----------------------:|:-----------------------------------------:|:-------------------------------------------------:|","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"| ![](photos/disney_selfie.png) | Sebastian Fok Shin Hung | [Github](https://github.com/SebasFok/) | [Portfolio](team/sebastianfok.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"| ![](photos/j.png) | Liow Enqi Janelle | [Github](https://github.com/janelleenqi/) | [Portfolio](team/liowenqijanelle.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"| ![](photos/rohit_pic.png) | Rohit R | [Github](https://github.com/rohitcube) | [Portfolio](team/johndoe.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":"| ![](photos/ryanPic.JPG) | Ryan Loh | [Github](https://github.com/ryanlohyr) | [Portfolio](https://ryanlohyr.github.io/ryanloh/) |","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":"| ![](photos/isaiah_profile.png) | Isaiah Cerven | [Github](https://github.com/CerIsaiah/) | [Portfolio](team/isaiah.md) |","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"SebasFok":7,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"## Design \u0026 implementation, Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"## Features","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":"- Pace","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"- Left","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":"- Major","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":"# Implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":"## [Proposed] Pacing and MC Calculation","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"The proposed \"Pacing and MC Calculation\" mechanism is implemented to help users track their academic progress and remaining Modular Credits (MCs) required for graduation. This feature is facilitated by the PacingManager, which stores user data and provides functions for calculating the recommended pacing and remaining MCs. The following operations are available:","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":"- PacingManager#calculateRemainingMCs() — Calculates the remaining MCs required for graduation.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":"- PacingManager#calculateRecommendedPace() — Recommends the pacing for upcoming semesters.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":"These operations are exposed in the Pacing interface as Pacing#calculateRemainingMCs() and Pacing#calculateRecommendedPace() respectively.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":"### Usage Examples","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":"Here are a few examples of how the \"Pacing and MC Calculation\" feature behaves:","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":"#### Example 1: Calculate Remaining MCs","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":"Command: `pace Y2/S1` (assuming that the user has completed 60 MCs from Y1S1 to Y2S1)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":"Response:","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":"`You currently have 100 MCs left until graduation.`","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":"#### Example 2: Calculate Remaining MCs (No Semester Specified)","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":"Command: `pace`","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":"Response:","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":"`You currently have 100 MCs left until graduation.`","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"## [Proposed] List Modules Left Feature","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":"The proposed left mechanism is implemented to help users keep tracks of modules left for their major. It is facilitated by `modulesLeft`, `modulesMajor` and `modulesTaken`. Additionally, it implements the following operations:","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":"- `modulesLeft#getDifference(modulesMajor, modulesTaken)` – Keeps the list of modules in `modulesMajor` but not in `modulesTaken` in `modulesLeft`.","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":"- `modulesLeft#getMainModuleList()` – Returns the list of modules in `modulesLeft`.","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":"This operation is exposed in the `ModulePlannerController` interface as `ModulePlannerController#listModulesLeft()`.","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":"### Usage Examples","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":"Here are a few examples of how the List Modules Left Feature behaves:","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":"#### Example 1: ","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":"`modulesMajor#getMainModuleList()` gives modules `CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230`.","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":"`modulesTaken#getMainModuleList()` gives modules `CS1231S MA1511`","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":"Command: `left`","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":"Response:","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":"`CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230`","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"SebasFok"},"content":"## [Proposed] Input Major Feature","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"SebasFok"},"content":"The proposed input major feature is facilitated by `Student`. It tries to store the major specified in userInput txt ","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"SebasFok"},"content":"file such that it can be used across sessions. It will print different responses based on whether the storing of the ","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"SebasFok"},"content":"Major was successful. Additionally, it implements the following operation:","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"SebasFok"},"content":"- `Student#setMajor(Major major)` – Saves the selected major in its memory.","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"SebasFok"},"content":"This operation is exposed in the `Student` interface as `Student#updateMajor(String userInput)`.","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"SebasFok"},"content":"### Usage Examples","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"SebasFok"},"content":"Here are a few examples of how the Input Major Feature behaves:","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"SebasFok"},"content":"#### Example 1:","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"SebasFok"},"content":"If \"CS\" is a valid major: `Student#updateMajor(\"major CS\")` calls `Student#setMajor(\"CS\")`, which sets the Major in the ","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"SebasFok"},"content":"student object as `CS` and returns a string `newMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"SebasFok"},"content":"Command: `major CS`","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"SebasFok"},"content":"Response: `Major CS selected!`","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"SebasFok"},"content":"#### Example 2:","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"SebasFok"},"content":"If \"abc\" is an invalid major: `Student#updateMajor(\"major abc\")` calls `Student#setMajor(\"abc\")`, which generates an","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"SebasFok"},"content":"IllegalArgumentException, which is caught and returns a string `invalidMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"SebasFok"},"content":"Command: `major abc`","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"SebasFok"},"content":"Response: `Please select a major from this list: [list of currently available Majors]`","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"SebasFok"},"content":"#### Example 3:","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"SebasFok"},"content":"If no major was specified: `Student#updateMajor(\"major\")` returns a string `currentMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"SebasFok"},"content":"Command: `major`","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"SebasFok"},"content":"Response: `Current major is [current major in student object].`","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":105,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":107,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":109,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":111,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":115,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":116,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":117,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":118,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":120,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":122,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":124,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":126,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":128,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":129,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":130,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"SebasFok":37,"ryanlohyr":20,"janelleenqi":35,"-":38}},{"path":"docs/team/isaiah.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"CerIsaiah"},"content":"# Isaiah - Project Portfolio Page","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"CerIsaiah"},"content":"## Overview","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"CerIsaiah"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"CerIsaiah":6}},{"path":"docs/team/liowenqijanelle.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"janelleenqi"},"content":"# Liow Enqi Janelle - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"janelleenqi":6}},{"path":"docs/team/sebastianfok.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"SebasFok"},"content":"# Sebastian Fok - Project Portfolio Page","lastModifiedDate":"2023-10-06"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"## Overview","lastModifiedDate":"2023-10-06"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"SebasFok":6}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.controllers.ModulePlannerController;","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":4,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":" * Main entry-point for the java.duke.Duke application.","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":" //main should have basically no code except start","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" controller.start();","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"ryanlohyr":5,"-":8}},{"path":"src/main/java/seedu/duke/controllers/ModulePlannerController.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.controllers;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.CompletePreqs;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Major;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Student;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.Api;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.views.CommandLineView;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.utils.Parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.views.ErrorHandler;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"CerIsaiah"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"import static seedu.duke.models.logic.Api.getModulePrereqBasedOnCourse;","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":"public class ModulePlannerController {","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" private CommandLineView view;","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" private Parser parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"SebasFok"},"content":" private Student student;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesMajor;","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesTaken;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesLeft;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e modsWithPreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"CerIsaiah"},"content":" private CompletePreqs addModulePreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" public ModulePlannerController() {","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" this.view \u003d new CommandLineView();","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" this.parser \u003d new Parser();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"SebasFok"},"content":" this.student \u003d new Student();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"CerIsaiah"},"content":" //This modules list of taken and classes left can be in a storage class later on.","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" this.modulesMajor \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"CerIsaiah"},"content":" this.modulesTaken \u003d new ModuleList(\"CS1231S MA1511\");","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":" this.modulesLeft \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"CerIsaiah"},"content":" modsWithPreqs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"CerIsaiah"},"content":" //Pass in Hashmap of mods with Preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"CerIsaiah"},"content":" this.addModulePreqs \u003d new CompletePreqs(addModsWithPreqs(modsWithPreqs));","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"CerIsaiah"},"content":" //Pass in the list of mods completed.","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.initializeCompletedMods(modulesTaken);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" * Starts the interactive command-line interface for the academic module management system.","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" * This method displays a welcome message, reads user input, and processes various commands.","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" * While the user input is not \"bye,\" the method processes the input and responds accordingly.","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" * The commands are case-insensitive, and the response is displayed in the view.","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" public void start() {","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" view.displayWelcome();","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" Scanner in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":" String userInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" while (!userInput.equals(\"bye\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" String[] words \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"CerIsaiah"},"content":" String initialWord \u003d words[0].toLowerCase();","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":" switch (initialWord) {","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" case \"hi\": {","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"can put the commands here\");","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" case \"hello\": {","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"yup\");","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":" case \"info\": {","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"info\");","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"ryanlohyr"},"content":" JSONObject moduleInfoObject \u003d Api.getFullModuleInfo(\"CS2113\");","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"ryanlohyr"},"content":" assert(moduleInfoObject !\u003d null);","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" String moduleInfo \u003d (String) moduleInfoObject.get(\"description\");","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(moduleInfo);","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" case \"left\": {","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":" ArrayList\u003cString\u003e modules \u003d listModulesLeft();","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(\"Modules left:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"janelleenqi"},"content":" for (String module : modules) {","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(module);","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"janelleenqi"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"ryanlohyr"},"content":" case \"pace\": {","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"ryanlohyr"},"content":" //assumed that everyone graduates at y4s2","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" //waiting for retrieving logic","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"ryanlohyr"},"content":" int modulesCreditsCompleted \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"ryanlohyr"},"content":" int totalCreditsToGraduate \u003d 160;","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d totalCreditsToGraduate - modulesCreditsCompleted;","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"ryanlohyr"},"content":" computePace(words, creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"ryanlohyr"},"content":" case \"prereq\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"ryanlohyr"},"content":" if(!Parser.isValidInput(\"prereq\",words)){","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"ryanlohyr"},"content":" ErrorHandler.invalidInput();","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":108,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":109,"author":{"gitId":"ryanlohyr"},"content":" String keyword \u003d words[1];","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(getModulePrereqBasedOnCourse(keyword.toUpperCase(), \"CEG\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"SebasFok"},"content":" case \"major\": {","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"SebasFok"},"content":" String printMessageCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"SebasFok"},"content":" switch (printMessageCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"SebasFok"},"content":" case \"currentMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Current major is \" + student.getMajor() + \".\");","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"SebasFok"},"content":" case \"newMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Major \" + student.getMajor() + \" selected!\");","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"SebasFok"},"content":" case \"invalidMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Please select a major from this list: \" + Arrays.toString(Major.values()));","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"SebasFok"},"content":" // Empty default branch as printMessageCommand cannot take any other value","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"SebasFok"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"CerIsaiah"},"content":" case \"complete\": {","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"CerIsaiah"},"content":" if (addModulePreqs.checkModInput(words, modulesMajor)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"CerIsaiah"},"content":" String moduleCompleted \u003d words[1];","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.getUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.printUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":138,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"ryanlohyr"},"content":" default: {","lastModifiedDate":"2023-10-12"},{"lineNumber":141,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"Hello \" + userInput);","lastModifiedDate":"2023-10-12"},{"lineNumber":142,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":143,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":144,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":145,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":146,"author":{"gitId":"ryanlohyr"},"content":" userInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":147,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":148,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":149,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":150,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":151,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":152,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"ryanlohyr"},"content":" * Computes and returns the list of modules that are left in the ModuleList modulesMajor","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"ryanlohyr"},"content":" * after subtracting the modules in the ModuleList modulesTaken.","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":157,"author":{"gitId":"ryanlohyr"},"content":" * @return An ArrayList of module codes representing the modules left after the subtraction.","lastModifiedDate":"2023-10-17"},{"lineNumber":158,"author":{"gitId":"ryanlohyr"},"content":" * @throws InvalidObjectException If either modulesMajor or modulesTaken is null.","lastModifiedDate":"2023-10-17"},{"lineNumber":159,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":160,"author":{"gitId":"ryanlohyr"},"content":" public ArrayList\u003cString\u003e listModulesLeft() {","lastModifiedDate":"2023-10-17"},{"lineNumber":161,"author":{"gitId":"ryanlohyr"},"content":" //modulesMajor.txt - modulesTaken.txt","lastModifiedDate":"2023-10-17"},{"lineNumber":162,"author":{"gitId":"ryanlohyr"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":163,"author":{"gitId":"ryanlohyr"},"content":" modulesLeft.getDifference(modulesMajor, modulesTaken);","lastModifiedDate":"2023-10-17"},{"lineNumber":164,"author":{"gitId":"ryanlohyr"},"content":" return modulesLeft.getMainModuleList();","lastModifiedDate":"2023-10-17"},{"lineNumber":165,"author":{"gitId":"ryanlohyr"},"content":" } catch (InvalidObjectException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":166,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Error: \" + e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":167,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":168,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-17"},{"lineNumber":169,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":170,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":171,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":172,"author":{"gitId":"ryanlohyr"},"content":" * Computes the recommended pace for completing a degree based on the provided academic year","lastModifiedDate":"2023-10-15"},{"lineNumber":173,"author":{"gitId":"ryanlohyr"},"content":" * and credits left until graduation.","lastModifiedDate":"2023-10-15"},{"lineNumber":174,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":175,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-27"},{"lineNumber":176,"author":{"gitId":"ryanlohyr"},"content":" * @param userInput An array of user input where userInput[0] is the command and userInput[1] is the academic year.","lastModifiedDate":"2023-10-15"},{"lineNumber":177,"author":{"gitId":"ryanlohyr"},"content":" * @param creditsLeft The number of credits left until graduation.","lastModifiedDate":"2023-10-15"},{"lineNumber":178,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":180,"author":{"gitId":"ryanlohyr"},"content":" public void computePace(String[] userInput, int creditsLeft) {","lastModifiedDate":"2023-10-15"},{"lineNumber":181,"author":{"gitId":"ryanlohyr"},"content":" boolean argumentProvided \u003d userInput.length !\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":182,"author":{"gitId":"ryanlohyr"},"content":" //wait for text file logic","lastModifiedDate":"2023-10-15"},{"lineNumber":183,"author":{"gitId":"ryanlohyr"},"content":" if (!argumentProvided) {","lastModifiedDate":"2023-10-15"},{"lineNumber":184,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"You currently have \" + creditsLeft + \" MCs till graduation\");","lastModifiedDate":"2023-10-15"},{"lineNumber":185,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":186,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":187,"author":{"gitId":"ryanlohyr"},"content":" if (!parser.isValidAcademicYear(userInput[1])) {","lastModifiedDate":"2023-10-15"},{"lineNumber":188,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":190,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":191,"author":{"gitId":"ryanlohyr"},"content":" String[] parts \u003d userInput[1].split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"ryanlohyr"},"content":" String year \u003d parts[0].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"ryanlohyr"},"content":" String semester \u003d parts[1].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"ryanlohyr"},"content":" int lastSemesterOfYear \u003d 2;","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"ryanlohyr"},"content":" int lastYearOfDegree \u003d 4;","lastModifiedDate":"2023-10-15"},{"lineNumber":197,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":198,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":199,"author":{"gitId":"ryanlohyr"},"content":" int yearIntValue \u003d Character.getNumericValue(year.charAt(1));","lastModifiedDate":"2023-10-15"},{"lineNumber":200,"author":{"gitId":"ryanlohyr"},"content":" int semesterIntValue \u003d Character.getNumericValue(semester.charAt(1));","lastModifiedDate":"2023-10-15"},{"lineNumber":201,"author":{"gitId":"ryanlohyr"},"content":" //if we are at y2s1, we have 5 semesters left","lastModifiedDate":"2023-10-15"},{"lineNumber":202,"author":{"gitId":"ryanlohyr"},"content":" int semestersLeft \u003d (lastYearOfDegree - yearIntValue) * 2 + (lastSemesterOfYear - semesterIntValue);","lastModifiedDate":"2023-10-15"},{"lineNumber":203,"author":{"gitId":"ryanlohyr"},"content":" int creditsPerSem \u003d Math.round((float) creditsLeft / semestersLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":204,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"You have \" + creditsLeft + \"MCs for \" + semestersLeft + \" semesters. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":205,"author":{"gitId":"ryanlohyr"},"content":" + \"Recommended Pace: \"+ creditsPerSem + \"MCs per sem until graduation\");","lastModifiedDate":"2023-10-15"},{"lineNumber":206,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":207,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"CerIsaiah"},"content":" * Add all mods that require prerequisites to a map storing the mod and a set of preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":211,"author":{"gitId":"CerIsaiah"},"content":" * @param list","lastModifiedDate":"2023-10-18"},{"lineNumber":212,"author":{"gitId":"CerIsaiah"},"content":" * @return HashMap of Mods with their corresponding preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":213,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":214,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":215,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e addModsWithPreqs(HashMap\u003cString, List\u003cString\u003e\u003e list) {","lastModifiedDate":"2023-10-18"},{"lineNumber":216,"author":{"gitId":"CerIsaiah"},"content":" //Only two mods don\u0027t have preqs MA1511 and CS1231S.","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"CerIsaiah"},"content":" // In the future this will be dealt","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS3230\", \"CS2030S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS3230\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2030S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2040S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2106\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2109S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"CerIsaiah"},"content":" return list;","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"CerIsaiah"},"content":" * Helper function to addModsWithPreqs to add Strings and sets together","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"CerIsaiah"},"content":" * @param map","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"CerIsaiah"},"content":" * @param key","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"CerIsaiah"},"content":" * @param value","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"CerIsaiah"},"content":" public static void addValue(HashMap\u003cString, List\u003cString\u003e\u003e map, String key, String value) {","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"CerIsaiah"},"content":" // If the map does not contain the key, put an empty list for that key","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"CerIsaiah"},"content":" if (!map.containsKey(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"CerIsaiah"},"content":" map.put(key, new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"CerIsaiah"},"content":" // Add the value to the list associated with the key","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"CerIsaiah"},"content":" map.get(key).add(value);","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"SebasFok":20,"ryanlohyr":142,"janelleenqi":19,"rohitcube":1,"CerIsaiah":66}},{"path":"src/main/java/seedu/duke/models/logic/Api.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"rohitcube"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"rohitcube"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"rohitcube"},"content":"import java.net.URISyntaxException;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"//import java.util.*;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Objects;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":"import static seedu.duke.models.logic.DataRepository.getRequirements;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"rohitcube"},"content":"public class Api {","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" * Retrieves the prerequisite tree for a module specified by its code.","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" * @param moduleCode The code of the module for which prerequisites are to be retrieved.","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" * @return A JSON object representing the prerequisite tree for the module. The prerequisite tree can be in one of","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" * the following formats:","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" * - If there are no prerequisites, it returns null.","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":" * - If there is a single prerequisite, it returns a JSON object with the key \"or\" containing a list with","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" * the single prerequisite.","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" * - If there are multiple prerequisites, it returns a JSON object representing the full prerequisite tree.","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" private static JSONObject getModulePrereqTree(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" if(fullModuleInfo \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" //prereqTree can be returned as a string(single pre requisite), null(No pre requisites) or object","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" Object prereqTree \u003d fullModuleInfo.get(\"prereqTree\");","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" if(prereqTree \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" }else if(prereqTree instanceof String){","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" JSONObject jsonObject \u003d new JSONObject();","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e requirementList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" requirementList.add((String) prereqTree);","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" jsonObject.put(\"or\", requirementList);","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" return jsonObject;","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" return (JSONObject) fullModuleInfo.get(\"prereqTree\");","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" private static boolean isModuleException(String moduleCode){","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e exemptedModules \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"CS1231\");","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"MA1508E\");","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"EE4204\");","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" return exemptedModules.contains(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" private static ArrayList\u003cString\u003e getExemptedPrerequisite(String moduleCode){","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" HashMap\u003cString, ArrayList\u003cString\u003e\u003e map \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list1 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" list1.add(\"MA1511\");","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" list1.add(\"MA1512\");","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"CS1231\", list1);","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list2 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" list2.add(\"MA1511\");","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" list2.add(\"MA1512\");","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"MA1508E\", list2);","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list3 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" list3.add(\"ST2334\");","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"EE4204\", list3);","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" return map.get(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" public static JSONObject getFullModuleInfo(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"rohitcube"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"rohitcube"},"content":" String url \u003d \"https://api.nusmods.com/v2/2023-2024/modules/\" + moduleCode + \".json\";","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"rohitcube"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"rohitcube"},"content":" HttpRequest request \u003d HttpRequest.newBuilder()","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"rohitcube"},"content":" .uri(new URI(url))","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"rohitcube"},"content":" .GET()","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"rohitcube"},"content":" .build();","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"rohitcube"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"rohitcube"},"content":" String responseBody \u003d response.body();","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"rohitcube"},"content":" JSONParser parser \u003d new JSONParser();","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"rohitcube"},"content":" // Will refactor the variable later on, left it for easier readability","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"ryanlohyr"},"content":" return (JSONObject) parser.parse(responseBody);","lastModifiedDate":"2023-10-28"},{"lineNumber":95,"author":{"gitId":"rohitcube"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"rohitcube"},"content":" //to be replaced with more robust error class in the future","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Module Name\");","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"rohitcube"},"content":" } catch (IOException | InterruptedException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Module Name\");","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"rohitcube"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"rohitcube"},"content":" } catch (URISyntaxException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"rohitcube"},"content":" //to be replaced with more robust error class in the future","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"rohitcube"},"content":" System.out.println(\"Sorry, there was an error with\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"rohitcube"},"content":" \" the provided URL: \" + e.getMessage());","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"rohitcube"},"content":" return null;","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"ryanlohyr"},"content":" public static String getModuleInfoDescription(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryanlohyr"},"content":" assert fullModuleInfo !\u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"ryanlohyr"},"content":" return (String) fullModuleInfo.get(\"description\");","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"ryanlohyr"},"content":" public static String getModuleName(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":117,"author":{"gitId":"ryanlohyr"},"content":" assert fullModuleInfo !\u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"ryanlohyr"},"content":" return (String) fullModuleInfo.get(\"title\");","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"ryanlohyr"},"content":" * Recursively flattens and processes a list of module prerequisites.","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryanlohyr"},"content":" * @param major The major or program for which prerequisites are being flattened.","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"ryanlohyr"},"content":" * @param prerequisites An ArrayList to store the flattened prerequisites.","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"ryanlohyr"},"content":" * @param modulePrereqArray An ArrayList containing the module prerequisites to be processed.","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"ryanlohyr"},"content":" * @param courseRequirements An ArrayList containing course requirements.","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"ryanlohyr"},"content":" * @param currRequisite The type of the current prerequisite (e.g., \"and\" or \"or\").","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"ryanlohyr"},"content":" private static void flattenPrereq(","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"ryanlohyr"},"content":" String major,","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e prerequisites,","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e modulePrereqArray,","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e courseRequirements,","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"ryanlohyr"},"content":" String currRequisite) {","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"ryanlohyr"},"content":" //base case","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"ryanlohyr"},"content":" for(Object module: modulePrereqArray){","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"ryanlohyr"},"content":" if(module instanceof String){","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"ryanlohyr"},"content":" String formattedModule \u003d ((String) module).replace(\":D\", \"\");","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"ryanlohyr"},"content":" formattedModule \u003d formattedModule.replace(\"%\",\"\");","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"ryanlohyr"},"content":" if(courseRequirements.contains(formattedModule) ){","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"ryanlohyr"},"content":" prerequisites.add(formattedModule);","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"ryanlohyr"},"content":" if(currRequisite.equals(\"or\")){","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"ryanlohyr"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"ryanlohyr"},"content":" //item is an object","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"ryanlohyr"},"content":" //here, we determine if its \u0027or\u0027 or \u0027and\u0027","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"ryanlohyr"},"content":" JSONObject moduleJSON \u003d (JSONObject) module;","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"ryanlohyr"},"content":" String key \u003d (String) moduleJSON.keySet().toArray()[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e initial \u003d (ArrayList\u003cObjects\u003e) moduleJSON.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"ryanlohyr"},"content":" flattenPrereq(major, prerequisites, initial, getRequirements(major), key);","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"ryanlohyr"},"content":" * Retrieves the prerequisite array for a module specified by its code and also taking into account the degree","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"ryanlohyr"},"content":" * requirements of the course.","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"ryanlohyr"},"content":" * @param moduleCode The code of the module for which prerequisites are to be retrieved.","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"ryanlohyr"},"content":" * @return A JSONObject representing the prerequisite tree for the module,","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"ryanlohyr"},"content":" * or NULL if no prerequisites are specified.","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"ryanlohyr"},"content":" public static ArrayList\u003cString\u003e getModulePrereqBasedOnCourse(String moduleCode, String major) {","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"ryanlohyr"},"content":" // Only accepts CEG requirements now","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"ryanlohyr"},"content":" if(!Objects.equals(major, \"CEG\")){","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":174,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":175,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":176,"author":{"gitId":"ryanlohyr"},"content":" //Modules that has prerequisites incorrectly identified by NUSMods","lastModifiedDate":"2023-10-28"},{"lineNumber":177,"author":{"gitId":"ryanlohyr"},"content":" if(isModuleException(moduleCode)){","lastModifiedDate":"2023-10-28"},{"lineNumber":178,"author":{"gitId":"ryanlohyr"},"content":" return getExemptedPrerequisite(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":179,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":180,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":181,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e prerequisites \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"ryanlohyr"},"content":" JSONObject modulePrereqTree \u003d getModulePrereqTree(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":184,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":185,"author":{"gitId":"ryanlohyr"},"content":" if(modulePrereqTree \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":187,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":188,"author":{"gitId":"ryanlohyr"},"content":" String key \u003d (String) modulePrereqTree.keySet().toArray()[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":189,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"ryanlohyr"},"content":" //settle this warning","lastModifiedDate":"2023-10-28"},{"lineNumber":191,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e initial \u003d (ArrayList\u003cObjects\u003e) modulePrereqTree.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":192,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":193,"author":{"gitId":"ryanlohyr"},"content":" flattenPrereq(major, prerequisites, initial, getRequirements(major), key);","lastModifiedDate":"2023-10-28"},{"lineNumber":194,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":195,"author":{"gitId":"ryanlohyr"},"content":" return prerequisites;","lastModifiedDate":"2023-10-28"},{"lineNumber":196,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":197,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":200,"author":{"gitId":"rohitcube"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryanlohyr":153,"rohitcube":47}},{"path":"src/main/java/seedu/duke/models/logic/CompletePreqs.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"CerIsaiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"CerIsaiah"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"CerIsaiah"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"CerIsaiah"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"CerIsaiah"},"content":" * CompletePreqs checks which mods are unlocked once you finish a specific module","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"CerIsaiah"},"content":"public class CompletePreqs {","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"CerIsaiah"},"content":" //Full list of mods with modulesWithPreqs","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e modulesWithPreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"CerIsaiah"},"content":" private ArrayList\u003cString\u003e addToModulesCompleted;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"CerIsaiah"},"content":" // To track modules that are already unlocked","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"CerIsaiah"},"content":" private Set\u003cString\u003e unlockedModulesSet;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"CerIsaiah"},"content":" public CompletePreqs(HashMap\u003cString, List\u003cString\u003e\u003e inputMods) {","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"CerIsaiah"},"content":" modulesWithPreqs \u003d new HashMap\u003c\u003e(inputMods);","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"CerIsaiah"},"content":" * Create a list of completed mods, hardcoded from startup.","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-19"},{"lineNumber":28,"author":{"gitId":"CerIsaiah"},"content":" * @param list","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"CerIsaiah"},"content":" public void initializeCompletedMods(ModuleList list) {","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted.addAll(list.getMainModuleList());","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"CerIsaiah"},"content":" for (String mod : addToModulesCompleted) {","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"CerIsaiah"},"content":" processModuleForUnlockingWithoutPrint(mod);","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"CerIsaiah"},"content":" * Prints what mods have been unlocked after input","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-19"},{"lineNumber":40,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"CerIsaiah"},"content":" public void getUnlockedMods(String moduleCompleted) {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"CerIsaiah"},"content":" // Check prerequisites of the moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"CerIsaiah"},"content":" if (modulesWithPreqs.containsKey(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"CerIsaiah"},"content":" List\u003cString\u003e unmetPrerequisites \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"CerIsaiah"},"content":" unmetPrerequisites.add(preq);","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"CerIsaiah"},"content":" //Stops if a completedMod shouldn\u0027t be able to be completed with proper preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"CerIsaiah"},"content":" if (!unmetPrerequisites.isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(moduleCompleted +","lastModifiedDate":"2023-10-19"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" \" cannot be marked as completed because of uncompleted prerequisites: \"","lastModifiedDate":"2023-10-19"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" + unmetPrerequisites);","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"CerIsaiah"},"content":" return;","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"CerIsaiah"},"content":" //If its not marked as completed, properly add it to the list","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted.add(moduleCompleted);","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Mod completed: \" + moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"CerIsaiah"},"content":" printUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"CerIsaiah"},"content":" * This is only used for the first initalization of the mods.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" private void processModuleForUnlockingWithoutPrint(String moduleCompleted) {","lastModifiedDate":"2023-10-19"},{"lineNumber":75,"author":{"gitId":"CerIsaiah"},"content":" ArrayList\u003cString\u003e newMods \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"CerIsaiah"},"content":" for (String key : modulesWithPreqs.keySet()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"CerIsaiah"},"content":" //If new unlocked mod isn\u0027t marked as complete or unlocked already","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"CerIsaiah"},"content":" if (!unlockedModulesSet.contains(key) \u0026\u0026 !addToModulesCompleted.contains(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"CerIsaiah"},"content":" boolean allPrerequisitesMet \u003d true;","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"CerIsaiah"},"content":" //Make sure preq isn\u0027t already marked as done","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"CerIsaiah"},"content":" allPrerequisitesMet \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"CerIsaiah"},"content":" if (allPrerequisitesMet) {","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"CerIsaiah"},"content":" newMods.add(key);","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"CerIsaiah"},"content":" public void printUnlockedMods(String moduleCompleted) {","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"CerIsaiah"},"content":" ArrayList\u003cString\u003e newlyUnlockedMods \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"CerIsaiah"},"content":" for (String key : modulesWithPreqs.keySet()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"CerIsaiah"},"content":" //If new unlocked mod isn\u0027t marked as complete or unlocked already","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"CerIsaiah"},"content":" if (!unlockedModulesSet.contains(key) \u0026\u0026 !addToModulesCompleted.contains(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"CerIsaiah"},"content":" boolean allPrerequisitesMet \u003d true;","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"CerIsaiah"},"content":" //Make sure preq isn\u0027t already marked as done","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"CerIsaiah"},"content":" allPrerequisitesMet \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"CerIsaiah"},"content":" if (allPrerequisitesMet) {","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"CerIsaiah"},"content":" newlyUnlockedMods.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"CerIsaiah"},"content":" for (String mod : newlyUnlockedMods) {","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(mod + \" has been unlocked!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"CerIsaiah"},"content":" public void printModsCompleted(){","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"CerIsaiah"},"content":" for (String mod: addToModulesCompleted){","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(mod + \"has been completed\");","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"CerIsaiah"},"content":" public boolean checkModInput(String[] words, ModuleList list){","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"CerIsaiah"},"content":" if (words.length \u003d\u003d 2){","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"CerIsaiah"},"content":" if (list.getMainModuleList().contains(words[1])){","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"CerIsaiah"},"content":" return true;","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Please enter a available mod: \");","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"CerIsaiah"},"content":" list.printMainModuleList();","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"CerIsaiah"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":142,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Please enter a available mod after the complete keyword\");","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"CerIsaiah"},"content":" list.printMainModuleList();","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"CerIsaiah"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"CerIsaiah"},"content":"}","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"ryanlohyr":7,"CerIsaiah":142}},{"path":"src/main/java/seedu/duke/models/logic/DataRepository.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import java.io.File;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"public class DataRepository {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" public static ArrayList\u003cString\u003e getRequirements(String major){","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" try{","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" //add validation if wrong major?","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":" String fileName \u003d String.format(\"src/main/java/seedu/duke/models/data/%sRequirements\",major);","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":" File f \u003d new File(fileName);","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"ryanlohyr"},"content":" if (!f.exists()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"File does not exist\");","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" return new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e currentArray \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":" Scanner s \u003d new Scanner(f);","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" String currentLine \u003d s.nextLine();","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" currentArray.add(currentLine);","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" return currentArray;","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" }catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":31}},{"path":"src/main/java/seedu/duke/models/logic/ModuleList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"public class ModuleList {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":" private ArrayList\u003cString\u003e mainModuleList;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"janelleenqi"},"content":" private int numberOfModules;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":" public ModuleList(String modules) {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":" String[] moduleArray \u003d modules.split(\" \");","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":" mainModuleList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":" numberOfModules \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":" for (String module : moduleArray) {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.add(module);","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"janelleenqi"},"content":" numberOfModules +\u003d 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"janelleenqi"},"content":" } catch (NullPointerException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"janelleenqi"},"content":" new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" public ModuleList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":" mainModuleList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" numberOfModules \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"janelleenqi"},"content":" * Computes the difference between two ModuleList objects (A - B) and updates the current list.","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" * @param a The first ModuleList.","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" * @param b The second ModuleList.","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":" * @throws InvalidObjectException If either A or B is null.","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" public void getDifference (ModuleList a, ModuleList b) throws InvalidObjectException {","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":" //A - B","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" if (a \u003d\u003d null || b \u003d\u003d null) {","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":" throw new InvalidObjectException(\"Null Inputs\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" for (String moduleA : a.mainModuleList) {","lastModifiedDate":"2023-10-19"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" if (!b.exists(moduleA)) {","lastModifiedDate":"2023-10-19"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.add(moduleA);","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":" numberOfModules +\u003d 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" } catch (InvalidObjectException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" System.out.println(\"Error: \" + e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":" * Checks if a module exists in the list.","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":" * @param moduleA The module to check for existence.","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":" * @return true if the module exists in the list; false otherwise.","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" * @throws InvalidObjectException If moduleA is null.","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" public boolean exists(String moduleA) throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"janelleenqi"},"content":" if (moduleA \u003d\u003d null || mainModuleList \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"janelleenqi"},"content":" throw new InvalidObjectException(\"Null Inputs\");","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"janelleenqi"},"content":" for (String moduleB : mainModuleList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"janelleenqi"},"content":" if (moduleA.equals(moduleB)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"janelleenqi"},"content":" return true;","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"janelleenqi"},"content":" return false;","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"janelleenqi"},"content":" * Retrieves the list of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"janelleenqi"},"content":" * @return The ArrayList containing the modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"janelleenqi"},"content":" public ArrayList\u003cString\u003e getMainModuleList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"janelleenqi"},"content":" assert mainModuleList !\u003d null: \"null mainModuleList\";","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" return mainModuleList;","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"CerIsaiah"},"content":" public void printMainModuleList(){","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"CerIsaiah"},"content":" for (String mod: mainModuleList){","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"CerIsaiah"},"content":" System.out.print(mod + \" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"CerIsaiah"},"content":" System.out.println();","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"janelleenqi"},"content":" * Retrieves the number of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" * @return The number of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" public int getNumberOfModules() {","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":" assert numberOfModules \u003e\u003d 0: \"negative numberOfModules\";","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":" return numberOfModules;","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"janelleenqi"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"ryanlohyr":9,"janelleenqi":91,"CerIsaiah":7}},{"path":"src/main/java/seedu/duke/models/logic/ScheduleGenerator.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class ScheduleGenerator {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":" //we need to create a requisite sorter","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":7}},{"path":"src/main/java/seedu/duke/models/schema/Major.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"public enum Major {","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":" CS, CEG","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"SebasFok":4,"ryanlohyr":1}},{"path":"src/main/java/seedu/duke/models/schema/Module.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"public class Module {","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":" //defining your module object etc","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"ryanlohyr":4}},{"path":"src/main/java/seedu/duke/models/schema/Student.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"public class Student {","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":" private String name;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":" private Major major;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":" public Student(String name, Major major) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"SebasFok"},"content":" this.major \u003d major;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":" public Student() {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"SebasFok"},"content":" this.name \u003d null;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":" this.major \u003d null;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"SebasFok"},"content":" public String getName() {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"SebasFok"},"content":" return name;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"SebasFok"},"content":" public Major getMajor() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"SebasFok"},"content":" return major;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"SebasFok"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"SebasFok"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"SebasFok"},"content":" public void setMajor(Major major) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"SebasFok"},"content":" this.major \u003d major;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"SebasFok"},"content":" public String updateMajor(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"SebasFok"},"content":" String[] words \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"SebasFok"},"content":" if (words.length \u003c 2) {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"SebasFok"},"content":" return \"currentMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"SebasFok"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"SebasFok"},"content":" setMajor(Major.valueOf(words[1].toUpperCase()));","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"SebasFok"},"content":" return \"newMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"SebasFok"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"SebasFok"},"content":" return \"invalidMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"SebasFok":45,"ryanlohyr":1}},{"path":"src/main/java/seedu/duke/utils/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.utils;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class Parser {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":" * Checks if the given academic year input is valid.","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":" * The academic year should be in the format \"Yn/Sx\", where \u0027n\u0027 represents the year","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":" * and \u0027x\u0027 represents the semester (e.g., Y1/S1, Y2/S2).","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" * @author @ryanlohyr","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" * @param userInput The academic year input to be validated.","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":" * @return true if the input is a valid academic year, false otherwise.","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"ryanlohyr"},"content":" * @throws IllegalArgumentException if the input format is incorrect or if the year or semester is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" public boolean isValidAcademicYear( String userInput ) {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":" String[] parts \u003d userInput.split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" if(parts.length !\u003d 2){","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Needs to be in format of Y2/S1\");","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" String year \u003d parts[0].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" String semester \u003d parts[1].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" //last year","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" if(year.equals(\"Y4\") \u0026\u0026 semester.equals(\"S2\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Its your last sem!! A bit too late ya....\");","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" //validate semester","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" if(!semester.equals(\"S1\") \u0026\u0026 !semester.equals(\"S2\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Invalid Semester\");","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" //validate year","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" if (!(year.equals(\"Y1\") || year.equals(\"Y2\") || year.equals(\"Y3\") || year.equals(\"Y4\"))) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" // The input is not \"Y1,\" \"Y2,\" \"Y3,\" or \"Y4\"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Invalid Year\");","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":" public static boolean isValidInput(String command, String[] words) {","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" switch (command) {","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"ryanlohyr"},"content":" case \"prereq\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":51,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 2) {","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" case \"test\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 23) {","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":" case \"test2\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 21) {","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" default: {","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"ryanlohyr":78}},{"path":"src/main/java/seedu/duke/views/CommandLineView.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class CommandLineView {","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":" public void displayWelcome(){","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":" String logo \u003d \" ____ _ \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":" + \"| _ \\\\ _ _| | _____ \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":" + \"| | | | | | | |/ / _ \\\\\\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":" + \"| |_| | |_| | \u003c __/\\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" + \"|____/ \\\\__,_|_|\\\\_\\\\___|\\n\";","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Hello from\\n\" + logo);","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"What is your name?\");","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":" public void displayMessage(String message) {","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"ryanlohyr":18}},{"path":"src/main/java/seedu/duke/views/ErrorHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class ErrorHandler {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":" public static void invalidInput(){","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Input provided\");","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":7}},{"path":"src/main/java/seedu/duke/views/ModuleInfo.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"rohitcube"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"rohitcube"},"content":"public class ModuleInfo {","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"rohitcube"},"content":" public static void printModule(JSONObject module) {","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"rohitcube"},"content":" System.out.println(module);","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"rohitcube"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"rohitcube":10}},{"path":"src/test/java/seedu/duke/ModuleListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"janelleenqi"},"content":"package seedu.duke;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":"class ModuleListTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":" //success scenario 1: 2 ModuleList --\u003e difference","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_twoModuleList_expectDifference() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"janelleenqi"},"content":" ModuleList actualDifference \u003d new ModuleList(\"CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" difference.getDifference(first, second);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d difference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"janelleenqi"},"content":" assertEquals(difference.getMainModuleList().get(i), actualDifference.getMainModuleList().get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"janelleenqi"},"content":" //success scenario 2: 1 empty ModuleList, 1 ModuleList --\u003e difference which is empty","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_oneEmptyModuleListAnotherModuleList_expectEmptyDifference() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"janelleenqi"},"content":" ModuleList actualDifference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"janelleenqi"},"content":" difference.getDifference(first, second);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d difference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" assertEquals(difference.getMainModuleList().get(i), actualDifference.getMainModuleList().get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":" //failure scenario 1: null ModuleList input --\u003e throw exception","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_nullModuleListInput_expectException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":" assertThrows(InvalidObjectException.class, () -\u003e difference.getDifference(first, second));","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":" //success scenario 1: 1 input String, 1 ModuleList that contains input String --\u003e true","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" void existsTest_moduleListContainsModule_expectTrue() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"janelleenqi"},"content":" assertTrue(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"janelleenqi"},"content":" //success scenario 2: 1 input String, 1 ModuleList that does not contain input String --\u003e false","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"janelleenqi"},"content":" void existsTest_moduleListDoesNotContainModule_expectFalse() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"janelleenqi"},"content":" assertFalse(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"janelleenqi"},"content":" //failure scenario 1: input null string, 1 ModuleList --\u003e throw exception","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"janelleenqi"},"content":" void existsTest_nullInput_expectException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"janelleenqi"},"content":" assertThrows(InvalidObjectException.class, () -\u003e ml.exists(inputString));","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"janelleenqi"},"content":" //success scenario 3: input string, 1 empty ModuleList --\u003e false","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"janelleenqi"},"content":" void existsTest_nullMainModuleList_expectException() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" assertFalse(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"ryanlohyr":1,"janelleenqi":102}},{"path":"src/test/java/seedu/duke/controllers/ModulePlannerControllerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.controllers;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.DataRepository;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":"class ModulePlannerControllerTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" private final ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" public void setUpStreams() {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" @AfterEach","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" public void restoreStreams() {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" System.setOut(originalOut);","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" void computePaceWithoutArgument() {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(String.format(\"You currently have %s MCs till graduation\",creditsLeft), printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidArgument() {","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Needs to be in format of Y2/S1\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" void test() throws FileNotFoundException {","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"testttt\");","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(DataRepository.getRequirements(\"CEG\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Needs to be in format of Y2/S1\", \"Needs to be in format of Y2/S1\");","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidSemester() {","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2/s10\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Invalid Semester\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidYear() {","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y20/s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Invalid Year\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"ryanlohyr"},"content":" void computePaceValidYear() {","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2/s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"ryanlohyr"},"content":" String test \u003d \"hi\";","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"ryanlohyr"},"content":" String line \u003d \"You have 60MCs for 5 semesters. Recommended Pace: 12MCs per sem until graduation\";","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(printedOutput, line);","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" //success scenario: difference","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" void listModulesLeftTest_expectArrayList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"CerIsaiah"},"content":" ModuleList actualDifference \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-19"},{"lineNumber":105,"author":{"gitId":"janelleenqi"},"content":" ArrayList\u003cString\u003e list \u003d controller.listModulesLeft();","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d actualDifference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"janelleenqi"},"content":" assertEquals(actualDifference.getMainModuleList().get(i), list.get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"SebasFok":1,"ryanlohyr":95,"janelleenqi":17,"CerIsaiah":1}},{"path":"src/test/java/seedu/duke/models/StudentTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"SebasFok"},"content":"package seedu.duke.models;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Student;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":"public class StudentTest {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":" //success scenario: valid major -\u003e major updated","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_validMajor_expectNewMajorMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major cs\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"newMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"SebasFok"},"content":" //success scenario: no major -\u003e return current major","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_noMajor_expectCurrentMajorMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major\";","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"currentMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"SebasFok"},"content":" //failure scenario invalid major -\u003e throw exception","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_invalidMajor_expectFailureMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major abc\";","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"invalidMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"SebasFok":34,"ryanlohyr":1}},{"path":"src/test/java/seedu/duke/models/logic/DataRepositoryTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"class DataRepositoryTest {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" void validRequirementsReturned() {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e cegRequirementArray \u003d DataRepository.getRequirements(\"CEG\");","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" assert(!cegRequirementArray.isEmpty());","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":13}}] +[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Duke project template","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below: i love 2113 ","lastModifiedDate":"2023-10-05"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"SebasFok":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"rohitcube"},"content":" implementation \u0027com.googlecode.json-simple:json-simple:1.1.1\u0027","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run {","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"janelleenqi":1,"rohitcube":1,"-":46}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"|--------------------------------|:-----------------------:|:-----------------------------------------:|:-------------------------------------------------:|","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"| ![](photos/disney_selfie.png) | Sebastian Fok Shin Hung | [Github](https://github.com/SebasFok/) | [Portfolio](team/sebastianfok.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"| ![](photos/j.png) | Liow Enqi Janelle | [Github](https://github.com/janelleenqi/) | [Portfolio](team/liowenqijanelle.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"| ![](photos/rohit_pic.png) | Rohit R | [Github](https://github.com/rohitcube) | [Portfolio](team/johndoe.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":"| ![](photos/ryanPic.JPG) | Ryan Loh | [Github](https://github.com/ryanlohyr) | [Portfolio](https://ryanlohyr.github.io/ryanloh/) |","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":"| ![](photos/isaiah_profile.png) | Isaiah Cerven | [Github](https://github.com/CerIsaiah/) | [Portfolio](team/isaiah.md) |","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"SebasFok":7,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"## Design \u0026 implementation, Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"## Features","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":"- Pace","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"- Left","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":"- Major","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":"# Implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":"## [Proposed] Pacing and MC Calculation","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"The proposed \"Pacing and MC Calculation\" mechanism is implemented to help users track their academic progress and remaining Modular Credits (MCs) required for graduation. This feature is facilitated by the PacingManager, which stores user data and provides functions for calculating the recommended pacing and remaining MCs. The following operations are available:","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":"- PacingManager#calculateRemainingMCs() — Calculates the remaining MCs required for graduation.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":"- PacingManager#calculateRecommendedPace() — Recommends the pacing for upcoming semesters.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":"These operations are exposed in the Pacing interface as Pacing#calculateRemainingMCs() and Pacing#calculateRecommendedPace() respectively.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":"### Usage Examples","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":"Here are a few examples of how the \"Pacing and MC Calculation\" feature behaves:","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":"#### Example 1: Calculate Remaining MCs","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":"Command: `pace Y2/S1` (assuming that the user has completed 60 MCs from Y1S1 to Y2S1)","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":"Response:","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":"`You currently have 100 MCs left until graduation.`","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":"#### Example 2: Calculate Remaining MCs (No Semester Specified)","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":"Command: `pace`","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":"Response:","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":"`You currently have 100 MCs left until graduation.`","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"## [Proposed] List Modules Left Feature","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":"The proposed left mechanism is implemented to help users keep tracks of modules left for their major. It is facilitated by `modulesLeft`, `modulesMajor` and `modulesTaken`. Additionally, it implements the following operations:","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":"- `modulesLeft#getDifference(modulesMajor, modulesTaken)` – Keeps the list of modules in `modulesMajor` but not in `modulesTaken` in `modulesLeft`.","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":"- `modulesLeft#getMainModuleList()` – Returns the list of modules in `modulesLeft`.","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":"This operation is exposed in the `ModulePlannerController` interface as `ModulePlannerController#listModulesLeft()`.","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":"### Usage Examples","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":"Here are a few examples of how the List Modules Left Feature behaves:","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":"#### Example 1: ","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":"`modulesMajor#getMainModuleList()` gives modules `CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230`.","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":"`modulesTaken#getMainModuleList()` gives modules `CS1231S MA1511`","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":"Command: `left`","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":"Response:","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":"`CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230`","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"SebasFok"},"content":"## [Proposed] Input Major Feature","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"SebasFok"},"content":"The proposed input major feature is facilitated by `Student`. It tries to store the major specified in userInput txt ","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"SebasFok"},"content":"file such that it can be used across sessions. It will print different responses based on whether the storing of the ","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"SebasFok"},"content":"Major was successful. Additionally, it implements the following operation:","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"SebasFok"},"content":"- `Student#setMajor(Major major)` – Saves the selected major in its memory.","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"SebasFok"},"content":"This operation is exposed in the `Student` interface as `Student#updateMajor(String userInput)`.","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"SebasFok"},"content":"### Usage Examples","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"SebasFok"},"content":"Here are a few examples of how the Input Major Feature behaves:","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"SebasFok"},"content":"#### Example 1:","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"SebasFok"},"content":"If \"CS\" is a valid major: `Student#updateMajor(\"major CS\")` calls `Student#setMajor(\"CS\")`, which sets the Major in the ","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"SebasFok"},"content":"student object as `CS` and returns a string `newMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"SebasFok"},"content":"Command: `major CS`","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"SebasFok"},"content":"Response: `Major CS selected!`","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"SebasFok"},"content":"#### Example 2:","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"SebasFok"},"content":"If \"abc\" is an invalid major: `Student#updateMajor(\"major abc\")` calls `Student#setMajor(\"abc\")`, which generates an","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"SebasFok"},"content":"IllegalArgumentException, which is caught and returns a string `invalidMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"SebasFok"},"content":"Command: `major abc`","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"SebasFok"},"content":"Response: `Please select a major from this list: [list of currently available Majors]`","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"SebasFok"},"content":"#### Example 3:","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"SebasFok"},"content":"If no major was specified: `Student#updateMajor(\"major\")` returns a string `currentMajor`","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"SebasFok"},"content":"Command: `major`","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"SebasFok"},"content":"Response: `Current major is [current major in student object].`","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":105,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":107,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":109,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":111,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":115,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":116,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":117,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":118,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":120,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":122,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":124,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":126,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":128,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":129,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":130,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"SebasFok":37,"ryanlohyr":20,"janelleenqi":35,"-":38}},{"path":"docs/team/isaiah.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"CerIsaiah"},"content":"# Isaiah - Project Portfolio Page","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"CerIsaiah"},"content":"## Overview","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"CerIsaiah"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"CerIsaiah":6}},{"path":"docs/team/liowenqijanelle.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"janelleenqi"},"content":"# Liow Enqi Janelle - Project Portfolio Page","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"## Overview","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"janelleenqi":6}},{"path":"docs/team/sebastianfok.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"SebasFok"},"content":"# Sebastian Fok - Project Portfolio Page","lastModifiedDate":"2023-10-06"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"## Overview","lastModifiedDate":"2023-10-06"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"SebasFok":6}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.controllers.ModulePlannerController;","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":4,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":" * Main entry-point for the java.duke.Duke application.","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":" //main should have basically no code except start","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" controller.start();","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"ryanlohyr":5,"-":8}},{"path":"src/main/java/seedu/duke/controllers/ModulePlannerController.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.controllers;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.CompletePreqs;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"import seedu.duke.models.logic.DataRepository;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Major;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Student;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.Api;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.views.CommandLineView;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.utils.Parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.views.ErrorHandler;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"CerIsaiah"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":"import static seedu.duke.models.logic.Api.getModulePrereqBasedOnCourse;","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":"public class ModulePlannerController {","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" private CommandLineView view;","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" private Parser parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"SebasFok"},"content":" private Student student;","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesMajor;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesTaken;","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"janelleenqi"},"content":" private ModuleList modulesLeft;","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e modsWithPreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"CerIsaiah"},"content":" private CompletePreqs addModulePreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" public ModulePlannerController() {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" this.view \u003d new CommandLineView();","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" this.parser \u003d new Parser();","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"SebasFok"},"content":" this.student \u003d new Student();","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"CerIsaiah"},"content":" //This modules list of taken and classes left can be in a storage class later on.","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":" this.modulesMajor \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"CerIsaiah"},"content":" this.modulesTaken \u003d new ModuleList(\"CS1231S MA1511\");","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":" this.modulesLeft \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"CerIsaiah"},"content":" modsWithPreqs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"CerIsaiah"},"content":" //Pass in Hashmap of mods with Preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"CerIsaiah"},"content":" this.addModulePreqs \u003d new CompletePreqs(addModsWithPreqs(modsWithPreqs));","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"CerIsaiah"},"content":" //Pass in the list of mods completed.","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.initializeCompletedMods(modulesTaken);","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" * Starts the interactive command-line interface for the academic module management system.","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" * This method displays a welcome message, reads user input, and processes various commands.","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" * While the user input is not \"bye,\" the method processes the input and responds accordingly.","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" * The commands are case-insensitive, and the response is displayed in the view.","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" public void start() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":" view.displayWelcome();","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":" Scanner in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" String userInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" while (!userInput.equals(\"bye\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" String[] words \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"CerIsaiah"},"content":" String initialWord \u003d words[0].toLowerCase();","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" switch (initialWord) {","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" case \"hi\": {","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"can put the commands here\");","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" case \"hello\": {","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"yup\");","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"ryanlohyr"},"content":" case \"info\": {","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"info\");","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" JSONObject moduleInfoObject \u003d Api.getFullModuleInfo(\"CS2113\");","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"ryanlohyr"},"content":" assert(moduleInfoObject !\u003d null);","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryanlohyr"},"content":" String moduleInfo \u003d (String) moduleInfoObject.get(\"description\");","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(moduleInfo);","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":" case \"left\": {","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"janelleenqi"},"content":" ArrayList\u003cString\u003e modules \u003d listModulesLeft();","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(\"Modules left:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"janelleenqi"},"content":" for (String module : modules) {","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(module);","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"janelleenqi"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" case \"pace\": {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"ryanlohyr"},"content":" //assumed that everyone graduates at y4s2","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"ryanlohyr"},"content":" //waiting for retrieving logic","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"ryanlohyr"},"content":" int modulesCreditsCompleted \u003d 100;","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"ryanlohyr"},"content":" int totalCreditsToGraduate \u003d 160;","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d totalCreditsToGraduate - modulesCreditsCompleted;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"ryanlohyr"},"content":" computePace(words, creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"ryanlohyr"},"content":" case \"prereq\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"ryanlohyr"},"content":" if(!Parser.isValidInput(\"prereq\",words)){","lastModifiedDate":"2023-10-28"},{"lineNumber":108,"author":{"gitId":"ryanlohyr"},"content":" ErrorHandler.invalidInput();","lastModifiedDate":"2023-10-28"},{"lineNumber":109,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryanlohyr"},"content":" String keyword \u003d words[1];","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(getModulePrereqBasedOnCourse(keyword.toUpperCase(), \"CEG\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"SebasFok"},"content":" case \"major\": {","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"SebasFok"},"content":" String printMessageCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"SebasFok"},"content":" switch (printMessageCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"SebasFok"},"content":" case \"currentMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Current major is \" + student.getMajor() + \".\");","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"SebasFok"},"content":" case \"newMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Major \" + student.getMajor() + \" selected!\");","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"SebasFok"},"content":" case \"invalidMajor\":","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"SebasFok"},"content":" view.displayMessage(\"Please select a major from this list: \" + Arrays.toString(Major.values()));","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"SebasFok"},"content":" // Empty default branch as printMessageCommand cannot take any other value","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"SebasFok"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"SebasFok"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"janelleenqi"},"content":" case \"required\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"janelleenqi"},"content":" try {","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"janelleenqi"},"content":" view.printTXTFile(DataRepository.getFullRequirements(student.getMajor()));","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"janelleenqi"},"content":" } catch (NullPointerException | FileNotFoundException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(\"☹ An error occurred. \" + e.getMessage());","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"janelleenqi"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"CerIsaiah"},"content":" case \"complete\": {","lastModifiedDate":"2023-10-18"},{"lineNumber":142,"author":{"gitId":"CerIsaiah"},"content":" if (addModulePreqs.checkModInput(words, modulesMajor)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"CerIsaiah"},"content":" String moduleCompleted \u003d words[1];","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.getUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-18"},{"lineNumber":145,"author":{"gitId":"CerIsaiah"},"content":" addModulePreqs.printUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":149,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"ryanlohyr"},"content":" default: {","lastModifiedDate":"2023-10-12"},{"lineNumber":151,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"Hello \" + userInput);","lastModifiedDate":"2023-10-12"},{"lineNumber":152,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":153,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":154,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":155,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":156,"author":{"gitId":"ryanlohyr"},"content":" userInput \u003d in.nextLine();","lastModifiedDate":"2023-10-12"},{"lineNumber":157,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":158,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":159,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":160,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":161,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":162,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":163,"author":{"gitId":"ryanlohyr"},"content":" * Computes and returns the list of modules that are left in the ModuleList modulesMajor","lastModifiedDate":"2023-10-17"},{"lineNumber":164,"author":{"gitId":"ryanlohyr"},"content":" * after subtracting the modules in the ModuleList modulesTaken.","lastModifiedDate":"2023-10-17"},{"lineNumber":165,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":166,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":167,"author":{"gitId":"ryanlohyr"},"content":" * @return An ArrayList of module codes representing the modules left after the subtraction.","lastModifiedDate":"2023-10-17"},{"lineNumber":168,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":169,"author":{"gitId":"ryanlohyr"},"content":" public ArrayList\u003cString\u003e listModulesLeft() {","lastModifiedDate":"2023-10-17"},{"lineNumber":170,"author":{"gitId":"ryanlohyr"},"content":" //modulesMajor.txt - modulesTaken.txt","lastModifiedDate":"2023-10-17"},{"lineNumber":171,"author":{"gitId":"ryanlohyr"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":172,"author":{"gitId":"ryanlohyr"},"content":" modulesLeft.getDifference(modulesMajor, modulesTaken);","lastModifiedDate":"2023-10-17"},{"lineNumber":173,"author":{"gitId":"ryanlohyr"},"content":" return modulesLeft.getMainModuleList();","lastModifiedDate":"2023-10-17"},{"lineNumber":174,"author":{"gitId":"ryanlohyr"},"content":" } catch (InvalidObjectException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":175,"author":{"gitId":"janelleenqi"},"content":" view.displayMessage(\"Error: \" + e.getMessage());","lastModifiedDate":"2023-10-29"},{"lineNumber":176,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":177,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-17"},{"lineNumber":178,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":179,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":180,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-15"},{"lineNumber":181,"author":{"gitId":"ryanlohyr"},"content":" * Computes the recommended pace for completing a degree based on the provided academic year","lastModifiedDate":"2023-10-15"},{"lineNumber":182,"author":{"gitId":"ryanlohyr"},"content":" * and credits left until graduation.","lastModifiedDate":"2023-10-15"},{"lineNumber":183,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-15"},{"lineNumber":184,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-27"},{"lineNumber":185,"author":{"gitId":"ryanlohyr"},"content":" * @param userInput An array of user input where userInput[0] is the command and userInput[1] is the academic year.","lastModifiedDate":"2023-10-15"},{"lineNumber":186,"author":{"gitId":"ryanlohyr"},"content":" * @param creditsLeft The number of credits left until graduation.","lastModifiedDate":"2023-10-15"},{"lineNumber":187,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"ryanlohyr"},"content":" public void computePace(String[] userInput, int creditsLeft) {","lastModifiedDate":"2023-10-15"},{"lineNumber":190,"author":{"gitId":"ryanlohyr"},"content":" boolean argumentProvided \u003d userInput.length !\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":191,"author":{"gitId":"ryanlohyr"},"content":" //wait for text file logic","lastModifiedDate":"2023-10-15"},{"lineNumber":192,"author":{"gitId":"ryanlohyr"},"content":" if (!argumentProvided) {","lastModifiedDate":"2023-10-15"},{"lineNumber":193,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"You currently have \" + creditsLeft + \" MCs till graduation\");","lastModifiedDate":"2023-10-15"},{"lineNumber":194,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":195,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":196,"author":{"gitId":"ryanlohyr"},"content":" if (!parser.isValidAcademicYear(userInput[1])) {","lastModifiedDate":"2023-10-15"},{"lineNumber":197,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":198,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":199,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":200,"author":{"gitId":"ryanlohyr"},"content":" String[] parts \u003d userInput[1].split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":201,"author":{"gitId":"ryanlohyr"},"content":" String year \u003d parts[0].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":202,"author":{"gitId":"ryanlohyr"},"content":" String semester \u003d parts[1].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":203,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":204,"author":{"gitId":"ryanlohyr"},"content":" int lastSemesterOfYear \u003d 2;","lastModifiedDate":"2023-10-15"},{"lineNumber":205,"author":{"gitId":"ryanlohyr"},"content":" int lastYearOfDegree \u003d 4;","lastModifiedDate":"2023-10-15"},{"lineNumber":206,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":207,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":208,"author":{"gitId":"ryanlohyr"},"content":" int yearIntValue \u003d Character.getNumericValue(year.charAt(1));","lastModifiedDate":"2023-10-15"},{"lineNumber":209,"author":{"gitId":"ryanlohyr"},"content":" int semesterIntValue \u003d Character.getNumericValue(semester.charAt(1));","lastModifiedDate":"2023-10-15"},{"lineNumber":210,"author":{"gitId":"ryanlohyr"},"content":" //if we are at y2s1, we have 5 semesters left","lastModifiedDate":"2023-10-15"},{"lineNumber":211,"author":{"gitId":"ryanlohyr"},"content":" int semestersLeft \u003d (lastYearOfDegree - yearIntValue) * 2 + (lastSemesterOfYear - semesterIntValue);","lastModifiedDate":"2023-10-15"},{"lineNumber":212,"author":{"gitId":"ryanlohyr"},"content":" int creditsPerSem \u003d Math.round((float) creditsLeft / semestersLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":213,"author":{"gitId":"ryanlohyr"},"content":" view.displayMessage(\"You have \" + creditsLeft + \"MCs for \" + semestersLeft + \" semesters. \"","lastModifiedDate":"2023-10-15"},{"lineNumber":214,"author":{"gitId":"ryanlohyr"},"content":" + \"Recommended Pace: \"+ creditsPerSem + \"MCs per sem until graduation\");","lastModifiedDate":"2023-10-15"},{"lineNumber":215,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":216,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"CerIsaiah"},"content":" * Add all mods that require prerequisites to a map storing the mod and a set of preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"CerIsaiah"},"content":" * @param list","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"CerIsaiah"},"content":" * @return HashMap of Mods with their corresponding preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e addModsWithPreqs(HashMap\u003cString, List\u003cString\u003e\u003e list) {","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"CerIsaiah"},"content":" //Only two mods don\u0027t have preqs MA1511 and CS1231S.","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"CerIsaiah"},"content":" // In the future this will be dealt","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS3230\", \"CS2030S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS3230\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2030S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2040S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2106\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"CerIsaiah"},"content":" addValue(list, \"CS2109S\", \"CS1231S\");","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"CerIsaiah"},"content":" return list;","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"CerIsaiah"},"content":" * Helper function to addModsWithPreqs to add Strings and sets together","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"CerIsaiah"},"content":" * @param map","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"CerIsaiah"},"content":" * @param key","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"CerIsaiah"},"content":" * @param value","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"CerIsaiah"},"content":" public static void addValue(HashMap\u003cString, List\u003cString\u003e\u003e map, String key, String value) {","lastModifiedDate":"2023-10-18"},{"lineNumber":249,"author":{"gitId":"CerIsaiah"},"content":" // If the map does not contain the key, put an empty list for that key","lastModifiedDate":"2023-10-18"},{"lineNumber":250,"author":{"gitId":"CerIsaiah"},"content":" if (!map.containsKey(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":251,"author":{"gitId":"CerIsaiah"},"content":" map.put(key, new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":252,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":253,"author":{"gitId":"CerIsaiah"},"content":" // Add the value to the list associated with the key","lastModifiedDate":"2023-10-18"},{"lineNumber":254,"author":{"gitId":"CerIsaiah"},"content":" map.get(key).add(value);","lastModifiedDate":"2023-10-18"},{"lineNumber":255,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":256,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"SebasFok":20,"ryanlohyr":139,"janelleenqi":31,"rohitcube":1,"CerIsaiah":66}},{"path":"src/main/java/seedu/duke/models/logic/Api.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"rohitcube"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"rohitcube"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"rohitcube"},"content":"import java.net.URISyntaxException;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"rohitcube"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"//import java.util.*;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Objects;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":"import static seedu.duke.models.logic.DataRepository.getRequirements;","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"rohitcube"},"content":"public class Api {","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" * Retrieves the prerequisite tree for a module specified by its code.","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" * @param moduleCode The code of the module for which prerequisites are to be retrieved.","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" * @return A JSON object representing the prerequisite tree for the module. The prerequisite tree can be in one of","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" * the following formats:","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" * - If there are no prerequisites, it returns null.","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":" * - If there is a single prerequisite, it returns a JSON object with the key \"or\" containing a list with","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" * the single prerequisite.","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" * - If there are multiple prerequisites, it returns a JSON object representing the full prerequisite tree.","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" private static JSONObject getModulePrereqTree(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" if(fullModuleInfo \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" //prereqTree can be returned as a string(single pre requisite), null(No pre requisites) or object","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" Object prereqTree \u003d fullModuleInfo.get(\"prereqTree\");","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" if(prereqTree \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" }else if(prereqTree instanceof String){","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" JSONObject jsonObject \u003d new JSONObject();","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e requirementList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" requirementList.add((String) prereqTree);","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" jsonObject.put(\"or\", requirementList);","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" return jsonObject;","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" return (JSONObject) fullModuleInfo.get(\"prereqTree\");","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" private static boolean isModuleException(String moduleCode){","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e exemptedModules \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"CS1231\");","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"MA1508E\");","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" exemptedModules.add(\"EE4204\");","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" return exemptedModules.contains(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" private static ArrayList\u003cString\u003e getExemptedPrerequisite(String moduleCode){","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" HashMap\u003cString, ArrayList\u003cString\u003e\u003e map \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list1 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" list1.add(\"MA1511\");","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" list1.add(\"MA1512\");","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"CS1231\", list1);","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list2 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" list2.add(\"MA1511\");","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" list2.add(\"MA1512\");","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"MA1508E\", list2);","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e list3 \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" list3.add(\"ST2334\");","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" map.put(\"EE4204\", list3);","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" return map.get(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" public static JSONObject getFullModuleInfo(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"rohitcube"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"rohitcube"},"content":" String url \u003d \"https://api.nusmods.com/v2/2023-2024/modules/\" + moduleCode + \".json\";","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"rohitcube"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"rohitcube"},"content":" HttpRequest request \u003d HttpRequest.newBuilder()","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"rohitcube"},"content":" .uri(new URI(url))","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"rohitcube"},"content":" .GET()","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"rohitcube"},"content":" .build();","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"rohitcube"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"rohitcube"},"content":" String responseBody \u003d response.body();","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"rohitcube"},"content":" JSONParser parser \u003d new JSONParser();","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"rohitcube"},"content":" // Will refactor the variable later on, left it for easier readability","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"ryanlohyr"},"content":" return (JSONObject) parser.parse(responseBody);","lastModifiedDate":"2023-10-28"},{"lineNumber":95,"author":{"gitId":"rohitcube"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"rohitcube"},"content":" //to be replaced with more robust error class in the future","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Module Name\");","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"rohitcube"},"content":" } catch (IOException | InterruptedException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Module Name\");","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"rohitcube"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"rohitcube"},"content":" } catch (URISyntaxException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"rohitcube"},"content":" //to be replaced with more robust error class in the future","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"rohitcube"},"content":" System.out.println(\"Sorry, there was an error with\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"rohitcube"},"content":" \" the provided URL: \" + e.getMessage());","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"rohitcube"},"content":" return null;","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"ryanlohyr"},"content":" public static String getModuleInfoDescription(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryanlohyr"},"content":" assert fullModuleInfo !\u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"ryanlohyr"},"content":" return (String) fullModuleInfo.get(\"description\");","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"ryanlohyr"},"content":" public static String getModuleName(String moduleCode) {","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"ryanlohyr"},"content":" JSONObject fullModuleInfo \u003d getFullModuleInfo(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":117,"author":{"gitId":"ryanlohyr"},"content":" assert fullModuleInfo !\u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"ryanlohyr"},"content":" return (String) fullModuleInfo.get(\"title\");","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"ryanlohyr"},"content":" * Recursively flattens and processes a list of module prerequisites.","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryanlohyr"},"content":" * @param major The major or program for which prerequisites are being flattened.","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"ryanlohyr"},"content":" * @param prerequisites An ArrayList to store the flattened prerequisites.","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"ryanlohyr"},"content":" * @param modulePrereqArray An ArrayList containing the module prerequisites to be processed.","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"ryanlohyr"},"content":" * @param courseRequirements An ArrayList containing course requirements.","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"ryanlohyr"},"content":" * @param currRequisite The type of the current prerequisite (e.g., \"and\" or \"or\").","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"ryanlohyr"},"content":" private static void flattenPrereq(","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"ryanlohyr"},"content":" String major,","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e prerequisites,","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e modulePrereqArray,","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e courseRequirements,","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"ryanlohyr"},"content":" String currRequisite) {","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"ryanlohyr"},"content":" //base case","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"ryanlohyr"},"content":" for(Object module: modulePrereqArray){","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"ryanlohyr"},"content":" if(module instanceof String){","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"ryanlohyr"},"content":" String formattedModule \u003d ((String) module).replace(\":D\", \"\");","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"ryanlohyr"},"content":" formattedModule \u003d formattedModule.replace(\"%\",\"\");","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"ryanlohyr"},"content":" if(courseRequirements.contains(formattedModule) ){","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"ryanlohyr"},"content":" prerequisites.add(formattedModule);","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"ryanlohyr"},"content":" if(currRequisite.equals(\"or\")){","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"ryanlohyr"},"content":" return;","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"ryanlohyr"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"ryanlohyr"},"content":" //item is an object","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"ryanlohyr"},"content":" //here, we determine if its \u0027or\u0027 or \u0027and\u0027","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"ryanlohyr"},"content":" JSONObject moduleJSON \u003d (JSONObject) module;","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"ryanlohyr"},"content":" String key \u003d (String) moduleJSON.keySet().toArray()[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e initial \u003d (ArrayList\u003cObjects\u003e) moduleJSON.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"ryanlohyr"},"content":" flattenPrereq(major, prerequisites, initial, getRequirements(major), key);","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"ryanlohyr"},"content":" * Retrieves the prerequisite array for a module specified by its code and also taking into account the degree","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"ryanlohyr"},"content":" * requirements of the course.","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"ryanlohyr"},"content":" * @author ryanlohyr","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"ryanlohyr"},"content":" * @param moduleCode The code of the module for which prerequisites are to be retrieved.","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"ryanlohyr"},"content":" * @return A JSONObject representing the prerequisite tree for the module,","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"ryanlohyr"},"content":" * or NULL if no prerequisites are specified.","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"ryanlohyr"},"content":" public static ArrayList\u003cString\u003e getModulePrereqBasedOnCourse(String moduleCode, String major) {","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"ryanlohyr"},"content":" // Only accepts CEG requirements now","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"ryanlohyr"},"content":" if(!Objects.equals(major, \"CEG\")){","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":174,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":175,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":176,"author":{"gitId":"ryanlohyr"},"content":" //Modules that has prerequisites incorrectly identified by NUSMods","lastModifiedDate":"2023-10-28"},{"lineNumber":177,"author":{"gitId":"ryanlohyr"},"content":" if(isModuleException(moduleCode)){","lastModifiedDate":"2023-10-28"},{"lineNumber":178,"author":{"gitId":"ryanlohyr"},"content":" return getExemptedPrerequisite(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":179,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":180,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":181,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e prerequisites \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"ryanlohyr"},"content":" JSONObject modulePrereqTree \u003d getModulePrereqTree(moduleCode);","lastModifiedDate":"2023-10-28"},{"lineNumber":184,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":185,"author":{"gitId":"ryanlohyr"},"content":" if(modulePrereqTree \u003d\u003d null){","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"ryanlohyr"},"content":" return null;","lastModifiedDate":"2023-10-28"},{"lineNumber":187,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":188,"author":{"gitId":"ryanlohyr"},"content":" String key \u003d (String) modulePrereqTree.keySet().toArray()[0];","lastModifiedDate":"2023-10-28"},{"lineNumber":189,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"ryanlohyr"},"content":" //settle this warning","lastModifiedDate":"2023-10-28"},{"lineNumber":191,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cObjects\u003e initial \u003d (ArrayList\u003cObjects\u003e) modulePrereqTree.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":192,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":193,"author":{"gitId":"ryanlohyr"},"content":" flattenPrereq(major, prerequisites, initial, getRequirements(major), key);","lastModifiedDate":"2023-10-28"},{"lineNumber":194,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":195,"author":{"gitId":"ryanlohyr"},"content":" return prerequisites;","lastModifiedDate":"2023-10-28"},{"lineNumber":196,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":197,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":200,"author":{"gitId":"rohitcube"},"content":"}","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryanlohyr":153,"rohitcube":47}},{"path":"src/main/java/seedu/duke/models/logic/CompletePreqs.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"CerIsaiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"CerIsaiah"},"content":"import java.util.HashSet;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"CerIsaiah"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"CerIsaiah"},"content":"import java.util.Set;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"CerIsaiah"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"CerIsaiah"},"content":" * CompletePreqs checks which mods are unlocked once you finish a specific module","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"CerIsaiah"},"content":"public class CompletePreqs {","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"CerIsaiah"},"content":" //Full list of mods with modulesWithPreqs","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"CerIsaiah"},"content":" private HashMap\u003cString, List\u003cString\u003e\u003e modulesWithPreqs;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"CerIsaiah"},"content":" private ArrayList\u003cString\u003e addToModulesCompleted;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"CerIsaiah"},"content":" // To track modules that are already unlocked","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"CerIsaiah"},"content":" private Set\u003cString\u003e unlockedModulesSet;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"CerIsaiah"},"content":" public CompletePreqs(HashMap\u003cString, List\u003cString\u003e\u003e inputMods) {","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"CerIsaiah"},"content":" modulesWithPreqs \u003d new HashMap\u003c\u003e(inputMods);","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"CerIsaiah"},"content":" * Create a list of completed mods, hardcoded from startup.","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-19"},{"lineNumber":28,"author":{"gitId":"CerIsaiah"},"content":" * @param list","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"CerIsaiah"},"content":" public void initializeCompletedMods(ModuleList list) {","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted.addAll(list.getMainModuleList());","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"CerIsaiah"},"content":" for (String mod : addToModulesCompleted) {","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"CerIsaiah"},"content":" processModuleForUnlockingWithoutPrint(mod);","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"CerIsaiah"},"content":" * Prints what mods have been unlocked after input","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-19"},{"lineNumber":40,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"CerIsaiah"},"content":" public void getUnlockedMods(String moduleCompleted) {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"CerIsaiah"},"content":" // Check prerequisites of the moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"CerIsaiah"},"content":" if (modulesWithPreqs.containsKey(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"CerIsaiah"},"content":" List\u003cString\u003e unmetPrerequisites \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"CerIsaiah"},"content":" unmetPrerequisites.add(preq);","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"CerIsaiah"},"content":" //Stops if a completedMod shouldn\u0027t be able to be completed with proper preqs","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"CerIsaiah"},"content":" if (!unmetPrerequisites.isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(moduleCompleted +","lastModifiedDate":"2023-10-19"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" \" cannot be marked as completed because of uncompleted prerequisites: \"","lastModifiedDate":"2023-10-19"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" + unmetPrerequisites);","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"CerIsaiah"},"content":" return;","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"CerIsaiah"},"content":" //If its not marked as completed, properly add it to the list","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(moduleCompleted)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"CerIsaiah"},"content":" addToModulesCompleted.add(moduleCompleted);","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Mod completed: \" + moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"CerIsaiah"},"content":" printUnlockedMods(moduleCompleted);","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"CerIsaiah"},"content":" * This is only used for the first initalization of the mods.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" private void processModuleForUnlockingWithoutPrint(String moduleCompleted) {","lastModifiedDate":"2023-10-19"},{"lineNumber":75,"author":{"gitId":"CerIsaiah"},"content":" ArrayList\u003cString\u003e newMods \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"CerIsaiah"},"content":" for (String key : modulesWithPreqs.keySet()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"CerIsaiah"},"content":" //If new unlocked mod isn\u0027t marked as complete or unlocked already","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"CerIsaiah"},"content":" if (!unlockedModulesSet.contains(key) \u0026\u0026 !addToModulesCompleted.contains(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"CerIsaiah"},"content":" boolean allPrerequisitesMet \u003d true;","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"CerIsaiah"},"content":" //Make sure preq isn\u0027t already marked as done","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"CerIsaiah"},"content":" allPrerequisitesMet \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"CerIsaiah"},"content":" if (allPrerequisitesMet) {","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"CerIsaiah"},"content":" newMods.add(key);","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"CerIsaiah"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"CerIsaiah"},"content":" * @param moduleCompleted","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"CerIsaiah"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"CerIsaiah"},"content":" public void printUnlockedMods(String moduleCompleted) {","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"CerIsaiah"},"content":" ArrayList\u003cString\u003e newlyUnlockedMods \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"CerIsaiah"},"content":" for (String key : modulesWithPreqs.keySet()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"CerIsaiah"},"content":" //If new unlocked mod isn\u0027t marked as complete or unlocked already","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"CerIsaiah"},"content":" if (!unlockedModulesSet.contains(key) \u0026\u0026 !addToModulesCompleted.contains(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"CerIsaiah"},"content":" boolean allPrerequisitesMet \u003d true;","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"CerIsaiah"},"content":" for (String preq : modulesWithPreqs.get(key)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"CerIsaiah"},"content":" if (!addToModulesCompleted.contains(preq)) {","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"CerIsaiah"},"content":" //Make sure preq isn\u0027t already marked as done","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"CerIsaiah"},"content":" allPrerequisitesMet \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"CerIsaiah"},"content":" break;","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"CerIsaiah"},"content":" if (allPrerequisitesMet) {","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"CerIsaiah"},"content":" newlyUnlockedMods.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"CerIsaiah"},"content":" unlockedModulesSet.add(key);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"CerIsaiah"},"content":" for (String mod : newlyUnlockedMods) {","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(mod + \" has been unlocked!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"CerIsaiah"},"content":" public void printModsCompleted(){","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"CerIsaiah"},"content":" for (String mod: addToModulesCompleted){","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(mod + \"has been completed\");","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"CerIsaiah"},"content":" public boolean checkModInput(String[] words, ModuleList list){","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"CerIsaiah"},"content":" if (words.length \u003d\u003d 2){","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"CerIsaiah"},"content":" if (list.getMainModuleList().contains(words[1])){","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"CerIsaiah"},"content":" return true;","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Please enter a available mod: \");","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"CerIsaiah"},"content":" list.printMainModuleList();","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"CerIsaiah"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":142,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"CerIsaiah"},"content":" System.out.println(\"Please enter a available mod after the complete keyword\");","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"CerIsaiah"},"content":" list.printMainModuleList();","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"CerIsaiah"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"CerIsaiah"},"content":"}","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"ryanlohyr":7,"CerIsaiah":142}},{"path":"src/main/java/seedu/duke/models/logic/DataRepository.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"import seedu.duke.models.schema.Major;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import java.io.File;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"public class DataRepository {","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":" * Retrieves a list of modules requirements for a specified major.","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":" * @param major The major for which to retrieve requirements.","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":" * @return An ArrayList of module codes.","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"janelleenqi"},"content":" * @throws RuntimeException If the specified major requirements file is not found.","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"janelleenqi"},"content":" public static ArrayList\u003cString\u003e getRequirements(String major){","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" try {","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" //add validation if wrong major?","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" String fileName \u003d String.format(\"src/main/java/seedu/duke/models/data/%sRequirements\",major);","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" File f \u003d new File(fileName);","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" if (!f.exists()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"File does not exist\");","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" return new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e currentArray \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":" Scanner s \u003d new Scanner(f);","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" String currentLine \u003d s.nextLine();","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"janelleenqi"},"content":" String[] words \u003d currentLine.split(\" \");","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":" if (!currentLine.isEmpty() \u0026\u0026 !currentLine.startsWith(\"*\")) { // not empty line, not title","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" currentArray.add(words[0]);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" return currentArray;","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" } catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" * Returns the file path for the requirements of a specified major.","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":" * @param major The major for which to retrieve the requirements file path.","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":" * @return The file path to the major\u0027s requirements file.","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" public static String getFullRequirements(Major major){","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" return String.format(\"src/main/java/seedu/duke/models/data/%sRequirements\", major.toString());","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":29,"janelleenqi":27}},{"path":"src/main/java/seedu/duke/models/logic/ModuleList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"public class ModuleList {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":" private ArrayList\u003cString\u003e mainModuleList;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"janelleenqi"},"content":" private int numberOfModules;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":" public ModuleList(String modules) {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":" String[] moduleArray \u003d modules.split(\" \");","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":" mainModuleList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":" numberOfModules \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":" for (String module : moduleArray) {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.add(module);","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"janelleenqi"},"content":" numberOfModules +\u003d 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"janelleenqi"},"content":" } catch (NullPointerException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"janelleenqi"},"content":" new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" public ModuleList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":" mainModuleList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" numberOfModules \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"janelleenqi"},"content":" * Computes the difference between two ModuleList objects (A - B) and updates the current list.","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" * @param a The first ModuleList.","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" * @param b The second ModuleList.","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":" * @throws InvalidObjectException If either A or B is null.","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" public void getDifference (ModuleList a, ModuleList b) throws InvalidObjectException {","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":" //A - B","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" if (a \u003d\u003d null || b \u003d\u003d null) {","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":" throw new InvalidObjectException(\"Null Inputs\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" for (String moduleA : a.mainModuleList) {","lastModifiedDate":"2023-10-19"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" if (!b.exists(moduleA)) {","lastModifiedDate":"2023-10-19"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" mainModuleList.add(moduleA);","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":" numberOfModules +\u003d 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" } catch (InvalidObjectException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" System.out.println(\"Error: \" + e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":" * Checks if a module exists in the list.","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":" * @param moduleA The module to check for existence.","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":" * @return true if the module exists in the list; false otherwise.","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" * @throws InvalidObjectException If moduleA is null.","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" public boolean exists(String moduleA) throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"janelleenqi"},"content":" if (moduleA \u003d\u003d null || mainModuleList \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"janelleenqi"},"content":" throw new InvalidObjectException(\"Null Inputs\");","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"janelleenqi"},"content":" for (String moduleB : mainModuleList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"janelleenqi"},"content":" if (moduleA.equals(moduleB)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"janelleenqi"},"content":" return true;","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"janelleenqi"},"content":" return false;","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"janelleenqi"},"content":" * Retrieves the list of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"janelleenqi"},"content":" * @author janelleenqi","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"janelleenqi"},"content":" * @return The ArrayList containing the modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"janelleenqi"},"content":" public ArrayList\u003cString\u003e getMainModuleList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"janelleenqi"},"content":" assert mainModuleList !\u003d null: \"null mainModuleList\";","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" return mainModuleList;","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"CerIsaiah"},"content":" public void printMainModuleList(){","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"CerIsaiah"},"content":" for (String mod: mainModuleList){","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"CerIsaiah"},"content":" System.out.print(mod + \" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"CerIsaiah"},"content":" System.out.println();","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"CerIsaiah"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"CerIsaiah"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"janelleenqi"},"content":" * Retrieves the number of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" * @return The number of modules.","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" public int getNumberOfModules() {","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":" assert numberOfModules \u003e\u003d 0: \"negative numberOfModules\";","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":" return numberOfModules;","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"janelleenqi"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"ryanlohyr":9,"janelleenqi":91,"CerIsaiah":7}},{"path":"src/main/java/seedu/duke/models/logic/ScheduleGenerator.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class ScheduleGenerator {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":" //we need to create a requisite sorter","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":7}},{"path":"src/main/java/seedu/duke/models/schema/Major.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"public enum Major {","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":" CS, CEG","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"SebasFok":4,"ryanlohyr":1}},{"path":"src/main/java/seedu/duke/models/schema/Module.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"public class Module {","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":" //defining your module object etc","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"ryanlohyr":4}},{"path":"src/main/java/seedu/duke/models/schema/Student.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.schema;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"public class Student {","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":" private String name;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":" private Major major;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":" public Student(String name, Major major) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"SebasFok"},"content":" this.major \u003d major;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":" public Student() {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"SebasFok"},"content":" this.name \u003d null;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":" this.major \u003d null;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"SebasFok"},"content":" public String getName() {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"SebasFok"},"content":" return name;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" public Major getMajor() throws NullPointerException {","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"SebasFok"},"content":" return major;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"SebasFok"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"SebasFok"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"SebasFok"},"content":" public void setMajor(Major major) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"SebasFok"},"content":" this.major \u003d major;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"SebasFok"},"content":" public String updateMajor(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"SebasFok"},"content":" String[] words \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"SebasFok"},"content":" if (words.length \u003c 2) {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"SebasFok"},"content":" return \"currentMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"SebasFok"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"SebasFok"},"content":" setMajor(Major.valueOf(words[1].toUpperCase()));","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"SebasFok"},"content":" return \"newMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"SebasFok"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"SebasFok"},"content":" return \"invalidMajor\";","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"SebasFok":44,"ryanlohyr":1,"janelleenqi":1}},{"path":"src/main/java/seedu/duke/utils/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.utils;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class Parser {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":" * Checks if the given academic year input is valid.","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":" * The academic year should be in the format \"Yn/Sx\", where \u0027n\u0027 represents the year","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":" * and \u0027x\u0027 represents the semester (e.g., Y1/S1, Y2/S2).","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" * @author @ryanlohyr","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" * @param userInput The academic year input to be validated.","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":" * @return true if the input is a valid academic year, false otherwise.","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"ryanlohyr"},"content":" * @throws IllegalArgumentException if the input format is incorrect or if the year or semester is invalid.","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":" *","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" public boolean isValidAcademicYear( String userInput ) {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":" String[] parts \u003d userInput.split(\"/\");","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" if(parts.length !\u003d 2){","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Needs to be in format of Y2/S1\");","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":" String year \u003d parts[0].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" String semester \u003d parts[1].toUpperCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" //last year","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" if(year.equals(\"Y4\") \u0026\u0026 semester.equals(\"S2\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Its your last sem!! A bit too late ya....\");","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" //validate semester","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" if(!semester.equals(\"S1\") \u0026\u0026 !semester.equals(\"S2\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Invalid Semester\");","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" //validate year","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" if (!(year.equals(\"Y1\") || year.equals(\"Y2\") || year.equals(\"Y3\") || year.equals(\"Y4\"))) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" // The input is not \"Y1,\" \"Y2,\" \"Y3,\" or \"Y4\"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" throw new IllegalArgumentException(\"Invalid Year\");","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":" public static boolean isValidInput(String command, String[] words) {","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" switch (command) {","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"ryanlohyr"},"content":" case \"prereq\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":51,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 2) {","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" case \"test\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 23) {","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":" case \"test2\": {","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" if (words.length \u003c 21) {","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" return false;","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" default: {","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":" return true;","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"ryanlohyr":78}},{"path":"src/main/java/seedu/duke/views/CommandLineView.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"import java.io.File;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"janelleenqi"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"public class CommandLineView {","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":" private int formatLineLength \u003d 0;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"janelleenqi"},"content":" private final int accountForTabs \u003d 15;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" public void displayWelcome(){","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" String logo \u003d \" ____ _ \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":" + \"| _ \\\\ _ _| | _____ \\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":" + \"| | | | | | | |/ / _ \\\\\\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"ryanlohyr"},"content":" + \"| |_| | |_| | \u003c __/\\n\"","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":" + \"|____/ \\\\__,_|_|\\\\_\\\\___|\\n\";","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Hello from\\n\" + logo);","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"What is your name?\");","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" * Display a message to the command line view.","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"janelleenqi"},"content":" * @param o The object to be displayed.","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":" public void displayMessage(Object o) {","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" System.out.println(o);","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"janelleenqi"},"content":" * Display an empty line to the command line view.","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":" public void displayMessage() {","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"janelleenqi"},"content":" System.out.println();","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"janelleenqi"},"content":" * Print a top line for a formatted subheader.","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"janelleenqi"},"content":" private void printTopLine() {","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":" displayMessage(String.format(\"┌%-\" + formatLineLength + \"s┐\", \"\").replace(\u0027 \u0027, \u0027-\u0027));","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"janelleenqi"},"content":" * Print a double top line for a formatted header.","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" private void printDoubleTopLine() {","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" displayMessage(String.format(\"╔%-\" + formatLineLength + \"s╗\", \"\").replace(\u0027 \u0027, \u0027\u003d\u0027));","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" * Print a bottom line for a formatted subheader.","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" private void printBottomLine() {","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":" displayMessage(String.format(\"└%-\" + formatLineLength + \"s┘\", \"\").replace(\u0027 \u0027, \u0027-\u0027));","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":" * Print a double bottom line for a formatted header.","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":" private void printDoubleBottomLine() {","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":" displayMessage(String.format(\"╚%-\" + formatLineLength + \"s╝\", \"\").replace(\u0027 \u0027, \u0027\u003d\u0027));","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"janelleenqi"},"content":" * Return a justified string with a specified length.","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"janelleenqi"},"content":" * @param name The name part of the string.","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"janelleenqi"},"content":" * @param description The description part of the string.","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"janelleenqi"},"content":" * @param length The total length of the formatted string.","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"janelleenqi"},"content":" * @return The justified string.","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"janelleenqi"},"content":" private String returnJustified(String name, String description, int length) {","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"janelleenqi"},"content":" return String.format(\"%-\" + length + \"s\\t\", name) + description;","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":78,"author":{"gitId":"janelleenqi"},"content":" * Print the contents of a text file about major requirements with structured formatting.","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"janelleenqi"},"content":" * @param filePath The path to the text file to be printed.","lastModifiedDate":"2023-10-29"},{"lineNumber":81,"author":{"gitId":"janelleenqi"},"content":" * @throws FileNotFoundException If the file specified by filePath is not found.","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":83,"author":{"gitId":"janelleenqi"},"content":" public void printTXTFile(String filePath) throws FileNotFoundException {","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"janelleenqi"},"content":" File f \u003d new File(filePath); // create a File for the given file path","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"janelleenqi"},"content":" int longestLineLength \u003d getLongestLineLength(f);","lastModifiedDate":"2023-10-29"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" formatLineLength \u003d longestLineLength + accountForTabs;","lastModifiedDate":"2023-10-29"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":" Scanner s \u003d new Scanner(f);","lastModifiedDate":"2023-10-29"},{"lineNumber":89,"author":{"gitId":"janelleenqi"},"content":" String moduleName;","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"janelleenqi"},"content":" String moduleMCs;","lastModifiedDate":"2023-10-29"},{"lineNumber":91,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"janelleenqi"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":93,"author":{"gitId":"janelleenqi"},"content":" String currentLine \u003d s.nextLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"janelleenqi"},"content":" if (currentLine.indexOf(\" - \") \u003e 0) { //module exist","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"janelleenqi"},"content":" moduleName \u003d currentLine.substring(0, currentLine.indexOf(\" - \"));","lastModifiedDate":"2023-10-29"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" moduleMCs \u003d currentLine.substring(currentLine.indexOf(\" - \") + 3);","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"janelleenqi"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":" moduleName \u003d currentLine;","lastModifiedDate":"2023-10-29"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" moduleMCs \u003d \"\";","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":" if (currentLine.startsWith(\"***\")) { //subsubheader","lastModifiedDate":"2023-10-29"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":" String actualModuleName \u003d moduleName.substring(3);","lastModifiedDate":"2023-10-29"},{"lineNumber":104,"author":{"gitId":"janelleenqi"},"content":" displayMessage(\" ~~\\t\" + returnJustified(actualModuleName, moduleMCs, longestLineLength) + \"\\t ~~\");","lastModifiedDate":"2023-10-29"},{"lineNumber":105,"author":{"gitId":"janelleenqi"},"content":" displayMessage();","lastModifiedDate":"2023-10-29"},{"lineNumber":106,"author":{"gitId":"janelleenqi"},"content":" } else if (currentLine.startsWith(\"**\")) { //subheader has box","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"janelleenqi"},"content":" printTopLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":108,"author":{"gitId":"janelleenqi"},"content":" String actualModuleName \u003d moduleName.substring(2);","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"janelleenqi"},"content":" displayMessage(\"│\\t\" + returnJustified(actualModuleName, moduleMCs, longestLineLength) + \"\\t\\t│\");","lastModifiedDate":"2023-10-29"},{"lineNumber":110,"author":{"gitId":"janelleenqi"},"content":" printBottomLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":111,"author":{"gitId":"janelleenqi"},"content":" } else if (currentLine.startsWith(\"*\")) { //header","lastModifiedDate":"2023-10-29"},{"lineNumber":112,"author":{"gitId":"janelleenqi"},"content":" printDoubleTopLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"janelleenqi"},"content":" String actualModuleName \u003d moduleName.substring(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":114,"author":{"gitId":"janelleenqi"},"content":" displayMessage(\"║\\t\" + returnJustified(actualModuleName, moduleMCs, longestLineLength) + \"\\t║\");","lastModifiedDate":"2023-10-29"},{"lineNumber":115,"author":{"gitId":"janelleenqi"},"content":" printDoubleBottomLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":116,"author":{"gitId":"janelleenqi"},"content":" } else if (!currentLine.isEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":117,"author":{"gitId":"janelleenqi"},"content":" displayMessage(\"\\t\" + returnJustified(moduleName, moduleMCs, longestLineLength));","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"janelleenqi"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"janelleenqi"},"content":" displayMessage();","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":122,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"janelleenqi"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"janelleenqi"},"content":" * Find the length of the longest line in a text file.","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"janelleenqi"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"janelleenqi"},"content":" * @param f The text file to analyze.","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"janelleenqi"},"content":" * @return The length of the longest line found.","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"janelleenqi"},"content":" * @throws FileNotFoundException If the file specified by f is not found.","lastModifiedDate":"2023-10-29"},{"lineNumber":131,"author":{"gitId":"janelleenqi"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":132,"author":{"gitId":"janelleenqi"},"content":" private static int getLongestLineLength(File f) throws FileNotFoundException {","lastModifiedDate":"2023-10-29"},{"lineNumber":133,"author":{"gitId":"janelleenqi"},"content":" Scanner s \u003d new Scanner(f); // create a Scanner using the File as the source","lastModifiedDate":"2023-10-29"},{"lineNumber":134,"author":{"gitId":"janelleenqi"},"content":" int longestLineLength \u003d 0;","lastModifiedDate":"2023-10-29"},{"lineNumber":135,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":136,"author":{"gitId":"janelleenqi"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"janelleenqi"},"content":" String currentLine \u003d s.nextLine();","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"janelleenqi"},"content":" if (currentLine.indexOf(\" - \") \u003e longestLineLength) {","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"janelleenqi"},"content":" longestLineLength \u003d currentLine.indexOf(\" - \");","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"janelleenqi"},"content":" if (longestLineLength % 4 \u003e 0) { // remainder","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"janelleenqi"},"content":" longestLineLength \u003d (longestLineLength / 4) * 4;","lastModifiedDate":"2023-10-29"},{"lineNumber":144,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"janelleenqi"},"content":" return longestLineLength;","lastModifiedDate":"2023-10-29"},{"lineNumber":146,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":147,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"ryanlohyr":16,"janelleenqi":131}},{"path":"src/main/java/seedu/duke/views/ErrorHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"public class ErrorHandler {","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":" public static void invalidInput(){","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"Invalid Input provided\");","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":7}},{"path":"src/main/java/seedu/duke/views/ModuleInfo.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"rohitcube"},"content":"package seedu.duke.views;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"rohitcube"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"rohitcube"},"content":"public class ModuleInfo {","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"rohitcube"},"content":" public static void printModule(JSONObject module) {","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"rohitcube"},"content":" System.out.println(module);","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"rohitcube"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"rohitcube"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"rohitcube"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"rohitcube":10}},{"path":"src/test/java/seedu/duke/ModuleListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"janelleenqi"},"content":"package seedu.duke;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"janelleenqi"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"janelleenqi"},"content":"import java.io.InvalidObjectException;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"janelleenqi"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"janelleenqi"},"content":"class ModuleListTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"janelleenqi"},"content":" //success scenario 1: 2 ModuleList --\u003e difference","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_twoModuleList_expectDifference() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"janelleenqi"},"content":" ModuleList actualDifference \u003d new ModuleList(\"CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"janelleenqi"},"content":" difference.getDifference(first, second);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d difference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"janelleenqi"},"content":" assertEquals(difference.getMainModuleList().get(i), actualDifference.getMainModuleList().get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"janelleenqi"},"content":" //success scenario 2: 1 empty ModuleList, 1 ModuleList --\u003e difference which is empty","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_oneEmptyModuleListAnotherModuleList_expectEmptyDifference() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"janelleenqi"},"content":" ModuleList actualDifference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"janelleenqi"},"content":" difference.getDifference(first, second);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d difference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"janelleenqi"},"content":" assertEquals(difference.getMainModuleList().get(i), actualDifference.getMainModuleList().get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"janelleenqi"},"content":" //failure scenario 1: null ModuleList input --\u003e throw exception","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"janelleenqi"},"content":" void getDifferenceTest_nullModuleListInput_expectException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"janelleenqi"},"content":" ModuleList first \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"janelleenqi"},"content":" ModuleList second \u003d new ModuleList(\"CS1231S CS2030S CS2040S MA1511\");","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"janelleenqi"},"content":" ModuleList difference \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"janelleenqi"},"content":" assertThrows(InvalidObjectException.class, () -\u003e difference.getDifference(first, second));","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"janelleenqi"},"content":" //success scenario 1: 1 input String, 1 ModuleList that contains input String --\u003e true","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"janelleenqi"},"content":" void existsTest_moduleListContainsModule_expectTrue() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS1231S CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"janelleenqi"},"content":" assertTrue(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"janelleenqi"},"content":" //success scenario 2: 1 input String, 1 ModuleList that does not contain input String --\u003e false","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"janelleenqi"},"content":" void existsTest_moduleListDoesNotContainModule_expectFalse() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"janelleenqi"},"content":" assertFalse(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"janelleenqi"},"content":" //failure scenario 1: input null string, 1 ModuleList --\u003e throw exception","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"janelleenqi"},"content":" void existsTest_nullInput_expectException() {","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"janelleenqi"},"content":" assertThrows(InvalidObjectException.class, () -\u003e ml.exists(inputString));","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"janelleenqi"},"content":" //success scenario 3: input string, 1 empty ModuleList --\u003e false","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"janelleenqi"},"content":" void existsTest_nullMainModuleList_expectException() throws InvalidObjectException {","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"janelleenqi"},"content":" String inputString \u003d \"CS1231S\";","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"janelleenqi"},"content":" ModuleList ml \u003d new ModuleList();","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" boolean result \u003d ml.exists(inputString);","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" assertFalse(result);","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"ryanlohyr":1,"janelleenqi":102}},{"path":"src/test/java/seedu/duke/controllers/ModulePlannerControllerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.controllers;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.ModuleList;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"janelleenqi"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.logic.DataRepository;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"ryanlohyr"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"ryanlohyr"},"content":"class ModulePlannerControllerTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"ryanlohyr"},"content":" private final ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"ryanlohyr"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"ryanlohyr"},"content":" @BeforeEach","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryanlohyr"},"content":" public void setUpStreams() {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"ryanlohyr"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"ryanlohyr"},"content":" @AfterEach","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryanlohyr"},"content":" public void restoreStreams() {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"ryanlohyr"},"content":" System.setOut(originalOut);","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"ryanlohyr"},"content":" void computePaceWithoutArgument() {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(String.format(\"You currently have %s MCs till graduation\",creditsLeft), printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidArgument() {","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Needs to be in format of Y2/S1\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryanlohyr"},"content":" void test() throws FileNotFoundException {","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(\"testttt\");","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryanlohyr"},"content":" System.out.println(DataRepository.getRequirements(\"CEG\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Needs to be in format of Y2/S1\", \"Needs to be in format of Y2/S1\");","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidSemester() {","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2/s10\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Invalid Semester\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"ryanlohyr"},"content":" void computePaceInvalidYear() {","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y20/s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(\"Invalid Year\", printedOutput);","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"ryanlohyr"},"content":" void computePaceValidYear() {","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"ryanlohyr"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"ryanlohyr"},"content":" String[] userInput \u003d {\"pace\",\"y2/s1\"};","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"ryanlohyr"},"content":" int creditsLeft \u003d 60;","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"ryanlohyr"},"content":" controller.computePace(userInput,creditsLeft);","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"ryanlohyr"},"content":" String test \u003d \"hi\";","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"ryanlohyr"},"content":" // Capture the printed output","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"ryanlohyr"},"content":" String printedOutput \u003d outputStream.toString().trim();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"ryanlohyr"},"content":" String line \u003d \"You have 60MCs for 5 semesters. Recommended Pace: 12MCs per sem until graduation\";","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"ryanlohyr"},"content":" // Assert the printed output matches the expected value","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"ryanlohyr"},"content":" assertEquals(printedOutput, line);","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"janelleenqi"},"content":" //success scenario: difference","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"janelleenqi"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"janelleenqi"},"content":" void listModulesLeftTest_expectArrayList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"janelleenqi"},"content":" ModulePlannerController controller \u003d new ModulePlannerController();","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"CerIsaiah"},"content":" ModuleList actualDifference \u003d new ModuleList(\"CS2030S CS2040S CS2100 CS2101 CS2106 CS2109S CS3230\");","lastModifiedDate":"2023-10-19"},{"lineNumber":105,"author":{"gitId":"janelleenqi"},"content":" ArrayList\u003cString\u003e list \u003d controller.listModulesLeft();","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"janelleenqi"},"content":" //test","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"janelleenqi"},"content":" int numberOfModules \u003d actualDifference.getNumberOfModules();","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"janelleenqi"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"janelleenqi"},"content":" for (int i \u003d 0; i \u003c numberOfModules; i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"janelleenqi"},"content":" assertEquals(actualDifference.getMainModuleList().get(i), list.get(i));","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"janelleenqi"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"SebasFok":1,"ryanlohyr":95,"janelleenqi":17,"CerIsaiah":1}},{"path":"src/test/java/seedu/duke/models/StudentTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"SebasFok"},"content":"package seedu.duke.models;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"SebasFok"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"import seedu.duke.models.schema.Student;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"SebasFok"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"SebasFok"},"content":"public class StudentTest {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"SebasFok"},"content":" //success scenario: valid major -\u003e major updated","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_validMajor_expectNewMajorMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major cs\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"newMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"SebasFok"},"content":" //success scenario: no major -\u003e return current major","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_noMajor_expectCurrentMajorMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major\";","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"currentMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"SebasFok"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"SebasFok"},"content":" //failure scenario invalid major -\u003e throw exception","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"SebasFok"},"content":" @Test","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"SebasFok"},"content":" void updateMajorTest_invalidMajor_expectFailureMessage() {","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"SebasFok"},"content":" Student student \u003d new Student();","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"SebasFok"},"content":" String userInput \u003d \"major abc\";","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"SebasFok"},"content":" String printedOutputCommand \u003d student.updateMajor(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"SebasFok"},"content":" assertEquals(\"invalidMajor\", printedOutputCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"SebasFok"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"SebasFok"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"SebasFok":34,"ryanlohyr":1}},{"path":"src/test/java/seedu/duke/models/logic/DataRepositoryTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryanlohyr"},"content":"package seedu.duke.models.logic;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"ryanlohyr"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"ryanlohyr"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryanlohyr"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryanlohyr"},"content":"class DataRepositoryTest {","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryanlohyr"},"content":" @Test","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryanlohyr"},"content":" void validRequirementsReturned() {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryanlohyr"},"content":" ArrayList\u003cString\u003e cegRequirementArray \u003d DataRepository.getRequirements(\"CEG\");","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryanlohyr"},"content":" assert(!cegRequirementArray.isEmpty());","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryanlohyr"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"ryanlohyr"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"ryanlohyr":13}}] diff --git a/AY2324S1-CS2113-T17-4_tp_master/commits.json b/AY2324S1-CS2113-T17-4_tp_master/commits.json index f467fcb..fdeeb0c 100644 --- a/AY2324S1-CS2113-T17-4_tp_master/commits.json +++ b/AY2324S1-CS2113-T17-4_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"SebasFok":[{"date":"2023-10-05","commitResults":[{"hash":"aeef6fad05b0f6d0f0c354e9db79ba3ecbdfbef9","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-06","commitResults":[{"hash":"2039386c7d8e661b4e7bf66f1d4fa3ea80da23ac","isMergeCommit":false,"messageTitle":"Add AboutUs information for Sebastian","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}}]},{"date":"2023-10-07","commitResults":[{"hash":"de8365c98e9274e9c7b40228f5c687bbb7774a2e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"a728f005673371e58b95131d45ece32ea30c5cf6","isMergeCommit":true,"messageTitle":"Merge pull request #4 from janelleenqi/branch-Edit-AboutUs-v1","messageBody":"janelleenqi-AboutUs","fileTypesAndContributionMap":{}},{"hash":"a53713ffad1e3c43fb6821740bbbae2f0b934975","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2336e0f03aede437eefc987d98349c05b02aecc3","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-4/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5677d80546a6e55ae3fc9b3c2f9efc6cc36ddfbc","isMergeCommit":true,"messageTitle":"Merge pull request #5 from ryanlohyr/master","messageBody":"Ryanlohyr-AboutUs","fileTypesAndContributionMap":{}},{"hash":"f10394ae22fddfcc20621826cb53a03dd516d990","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-4/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"0d840309811b905770039ac8ee89b6c803eb14ee","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9c3ef1f3c1cd7136c584fdbcd2b00be6f53e8069","isMergeCommit":false,"messageTitle":"Fix AboutUs page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"d97257fe38507e38b90b874e965ec94cc6b5c00a","isMergeCommit":false,"messageTitle":"Revert \"Fix AboutUs page\"","messageBody":"This reverts commit 9c3ef1f3c1cd7136c584fdbcd2b00be6f53e8069.\n","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"d0a5cf6d3dab23e3ab691ed2f8a77ddb0e301864","isMergeCommit":false,"messageTitle":"Fix AboutUs page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"a6429ace4f7089682cc2c231fd5a974b2abacea8","isMergeCommit":true,"messageTitle":"Merge pull request #8 from SebasFok/branch-FixAboutUs","messageBody":"Fix about us page","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"be9eda9ae041c25d60d33065384ebbafb11b421b","isMergeCommit":false,"messageTitle":"Add student class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":0}}},{"hash":"f37c8d8033f4f5340abf8af3f6cfee7194242bee","isMergeCommit":false,"messageTitle":"Add \"major\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"2ed39fab10850f7beac9b1dea7710dab4ee3b966","isMergeCommit":false,"messageTitle":"Add enum for majors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":8}}},{"hash":"a777fd584c0ae40bcd4d764c056dde18112af52d","isMergeCommit":false,"messageTitle":"Add tests for \u0027updateMajor\u0027 function","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":26,"deletions":0}}},{"hash":"88ac029553890db8c4945a2fd9d5dce17ff67011","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"20e6817a7cccc59b82ffed3fccf09a44a67b767c","isMergeCommit":true,"messageTitle":"Merge pull request #16 from SebasFok/branch-SelectMajor","messageBody":"Add major feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"f8bdc1bbed8355ad7010bcf3a1dfe6a49b2ac42d","isMergeCommit":false,"messageTitle":"Fix Major command bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":11},"test-code":{"insertions":34,"deletions":24}}},{"hash":"1fd6f85f957f1380b71520ff1ccca4efea83951c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into SebasFok-FixMajor","messageBody":"# Conflicts:\n#\tsrc/test/java/seedu/duke/controllers/ModulePlannerControllerTest.java\n","fileTypesAndContributionMap":{}},{"hash":"7ef09a89be73ba92a5b1c84aa9bb8ed37f8681d0","isMergeCommit":false,"messageTitle":"Fix CheckStyle Issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"d98977a14d7f4b3d2de12892a24cd09b46fc462d","isMergeCommit":true,"messageTitle":"Merge pull request #36 from SebasFok/SebasFok-FixMajor","messageBody":"Fix major bugs","fileTypesAndContributionMap":{}},{"hash":"f179c1478f01690019185e566c6739999e30a483","isMergeCommit":false,"messageTitle":"Create Developer Guide for Major feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"f2b9bf9248cc0a203e4a62ab5303f80e85729dad","isMergeCommit":true,"messageTitle":"Merge pull request #37 from SebasFok/SebasFok-DGForMajorFeature","messageBody":"Create Developer Guide for Major feature","fileTypesAndContributionMap":{}}]}],"ryanlohyr":[{"date":"2023-10-07","commitResults":[{"hash":"a04733a9b91f0436d9e7599a9dbe7438aa6089a5","isMergeCommit":false,"messageTitle":"Update ryan portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-12","commitResults":[{"hash":"f7df8565f0f1c09b3e97078aa0914ec8c8beb51e","isMergeCommit":false,"messageTitle":"create project base layout","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":12}}},{"hash":"448ac15a82ee8f25745d15ad226d9a5dd0f6bc55","isMergeCommit":false,"messageTitle":"Create base project layout","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":12}}},{"hash":"9bddadace6b3fe56ea34260bfbf808a576b7e336","isMergeCommit":false,"messageTitle":"Revert \"Create base project layout\"","messageBody":"This reverts commit 448ac15a82ee8f25745d15ad226d9a5dd0f6bc55.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":66}}},{"hash":"5cb0e57054f2e47ba0c944876577e4b36e3cb793","isMergeCommit":true,"messageTitle":"Merge branch \u0027ryan-createLayout\u0027 of https://github.com/ryanlohyr/tp into ryan-createLayout","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"de707c380d524d5b537fa700b0bd3337eb46c778","isMergeCommit":false,"messageTitle":"Fix test bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"52772484e68d1498e236d83c230d6226cc9b0dc3","isMergeCommit":true,"messageTitle":"Merge pull request #7 from ryanlohyr/ryan-createLayout","messageBody":"Create project base layout","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"813fa09444c9155f79f736faadd281e068a13fe7","isMergeCommit":false,"messageTitle":"Add pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":4,"deletions":0}}},{"hash":"92685f4a8354d7c9339df54862e8ad730875ae31","isMergeCommit":false,"messageTitle":"Add pace feature v2","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":88,"deletions":3},"test-code":{"insertions":86,"deletions":3}}},{"hash":"e4f352e491e6bee1e281a3aeac2b5cbec16e50ce","isMergeCommit":false,"messageTitle":"fix window os bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":16},"test-code":{"insertions":2,"deletions":4}}},{"hash":"ab09a619ac2be800ae064c73f1b41ce734c8f64b","isMergeCommit":true,"messageTitle":"Merge pull request #9 from ryanlohyr/ryan-paceFeature","messageBody":"Add pace feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"22c9f54fa9950fed39f4313ac4569cfa59a40694","isMergeCommit":false,"messageTitle":"add pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":18}}},{"hash":"d3fc98e585ca694c04d379ebc953ff02c874042a","isMergeCommit":true,"messageTitle":"Merge pull request #14 from ryanlohyr/ryan-paceFeature","messageBody":"add pace feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"c12b196537f7101680d6b70f81d40496e13cb010","isMergeCommit":false,"messageTitle":"fix format bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":79}}},{"hash":"7b5a888b1c9c716564aee6458077499f76f301ab","isMergeCommit":true,"messageTitle":"fix test bug","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0e0f7bfab9fd4d4c361e5a315b233c8e07248f71","isMergeCommit":true,"messageTitle":"Merge pull request #22 from ryanlohyr/master","messageBody":"fix formatting and unit test bug","fileTypesAndContributionMap":{}},{"hash":"94d07e6718756e5e3ca942fe01955a4ba192be5c","isMergeCommit":true,"messageTitle":"Merge pull request #21 from rohitcube/master","messageBody":"Add API class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"b36f87967ffacbc039d25221df0214ffb7ec9530","isMergeCommit":false,"messageTitle":"Create developer guide for pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2},"other":{"insertions":1,"deletions":1},"docs":{"insertions":28,"deletions":0},"test-code":{"insertions":2,"deletions":1}}},{"hash":"ff1fed86da7619c2faa142dc10f0a5c93da3f6e7","isMergeCommit":true,"messageTitle":"Merge pull request #27 from ryanlohyr/ryan/developer-guide","messageBody":"Create developer guide for pace feature","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"bd43a06ecf5d38a83e18e921c2b2471b97d790f3","isMergeCommit":false,"messageTitle":"Fix repo structure and api mods issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":10},"other":{"insertions":6,"deletions":9},"test-code":{"insertions":4,"deletions":3}}},{"hash":"71fc4612770b0946010116462f06af6ebe347f79","isMergeCommit":true,"messageTitle":"Merge pull request #41 from ryanlohyr/ryan/fix/repo-structure","messageBody":"Fix repo structure and api mods issue","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"472947849c656b0915df4c8752e547ff55cbb61b","isMergeCommit":false,"messageTitle":"Restructure project and add prerequisite function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":242,"deletions":35},"test-code":{"insertions":22,"deletions":50}}},{"hash":"d28259e7dc130809d475536cfcad9c14f94ae623","isMergeCommit":true,"messageTitle":"Merge pull request #42 from ryanlohyr/ryan/feat/prerequisite","messageBody":"Restructure project and add prerequisite function","fileTypesAndContributionMap":{}}]}],"janelleenqi":[{"date":"2023-10-07","commitResults":[{"hash":"b8e95e351ff1f9e8058d1fa4512b9fed2a801ff5","isMergeCommit":true,"messageTitle":"Merge pull request #1 from SebasFok/SebasFok-AboutUs","messageBody":"Add AboutUs information for Sebastian","fileTypesAndContributionMap":{}},{"hash":"215bbf707ba73e12fe4a3852bd195add31b9563b","isMergeCommit":false,"messageTitle":"Edit AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"20248cfdb579d3a65dba6b00480f73fd6818e9de","isMergeCommit":true,"messageTitle":"Merge pull request #3 from rohitcube/master","messageBody":"added profile - rohit","fileTypesAndContributionMap":{}},{"hash":"320cf1073f08efaeb681a28d2a71a2c05d03f61a","isMergeCommit":false,"messageTitle":"Edit AboutUs.md to include github","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"eeadb9d732a337b8cd7c73ed135d8d5aabf3ba2e","isMergeCommit":true,"messageTitle":"Merge AboutUs.md","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"e9a420df1a3a38da09d884a238231f1d151f3f37","isMergeCommit":false,"messageTitle":"add \"left\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":97,"deletions":22}}},{"hash":"d61cfbec5c631f4536a0498f84b53a469717b7a9","isMergeCommit":false,"messageTitle":"delete unnecessary lines","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"9fec7539e4da6bde4964b8bb37ea3827706ac546","isMergeCommit":false,"messageTitle":"add ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":44,"deletions":0}}},{"hash":"22d2823da7d4c2553ed68abf4765cc2f69476943","isMergeCommit":false,"messageTitle":"add listModulesLeftTest for successful scenario in ModulePlannerControllerTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":0}}},{"hash":"c14bd0e9753371612f42b4a7653b130eedb55459","isMergeCommit":false,"messageTitle":"add existsTest for successful scenarios in ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":2}}},{"hash":"fe408d5d36d769ff7ccd93af2aa871dbb174bc36","isMergeCommit":false,"messageTitle":"add some exception handling for ModuleList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":14}}},{"hash":"fff60307f1c5bdb366bcd603e5b712359400b076","isMergeCommit":false,"messageTitle":"add failure scenarios for existsTest and getDifferenceTest in ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":8},"test-code":{"insertions":30,"deletions":7}}},{"hash":"21c26955eebadc657445a51c384758035a3bde48","isMergeCommit":false,"messageTitle":"add javadoc comments for functions in the \"left\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}},{"hash":"8789c06c3791750c5fd338706ea328ffb9040de7","isMergeCommit":false,"messageTitle":"Add success scenario where mainModuleList is empty for existsTest for ModuleListTest. This closes #10","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":16},"test-code":{"insertions":11,"deletions":0}}},{"hash":"bd71200339e77f407935b3039a6437d4e41a9cd7","isMergeCommit":false,"messageTitle":"Edit for build-and-check Gradle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":30},"test-code":{"insertions":9,"deletions":7}}},{"hash":"1c3dba0cc588f9746f2a6706955df611cf1dac8c","isMergeCommit":false,"messageTitle":"Edit 2 for build-and-check Gradle (add new line at the end of the file)","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"7103ecb9071ddb693815469edc4a98c724696ce3","isMergeCommit":false,"messageTitle":"Edit 3 for build-and-check Gradle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"28c461ff31ca243dacb48ca80caca708351319c5","isMergeCommit":true,"messageTitle":"Merge pull request #13 from janelleenqi/branch-left-command","messageBody":"Add Left Command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"4dad4e47e3274967b37f8fdf9168819dc7d8c360","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"ee22092cdb466e755f74b1d931009faf2a8450a3","isMergeCommit":false,"messageTitle":"Reorganise files in directory","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"other":{"insertions":1,"deletions":1},"test-code":{"insertions":2,"deletions":1}}},{"hash":"4bb7e1ca9fd650a59260929e471b6fdcc5cf9ae8","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"86a67bc781962dfebf96ff33220836d88f56949d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-shift-file","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"844497020cb6212656e880719bbbd03584f59310","isMergeCommit":false,"messageTitle":"Assertions Enabled in the build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":1}}},{"hash":"8fe8d35becdda7684f96ce0a750afda64d581a87","isMergeCommit":false,"messageTitle":"Add assertions to ModuleList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"634977a79898a14c9da7a96127606077f40d63f6","isMergeCommit":false,"messageTitle":"Update DeveloperGuide for Left","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":34,"deletions":8}}},{"hash":"71a99acc2f14adcb21441720314b3036f25b8db3","isMergeCommit":false,"messageTitle":"Fixes #10, fixes #33","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"a4358197e7e9da71f5b3a7cce3beb7eabcd57224","isMergeCommit":true,"messageTitle":"Merge pull request #34 from janelleenqi/branch-ensure-project-deliverables","messageBody":"Add assertions, Update Developer Guide","fileTypesAndContributionMap":{}}]}],"rohitcube":[{"date":"2023-10-07","commitResults":[{"hash":"a705965a345d0fb777a8268c24a02cb95f3c7009","isMergeCommit":false,"messageTitle":"added profile - rohit","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-09","commitResults":[{"hash":"67dfcdb437ce0cff8d2449ca49a32c15acb77cd7","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"526e6983d8cb279b409a14132ce402926860616a","isMergeCommit":true,"messageTitle":"Merge pull request #6 from rohitcube/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"abbb47faf32f9201108d53c0b360b528451fdc81","isMergeCommit":false,"messageTitle":"Added API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":1},"other":{"insertions":1,"deletions":0},"test-code":{"insertions":19,"deletions":0}}},{"hash":"3295f1687ef050ad59ed4739c2bbb84b0b40cbf1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e6920151453fa8acfaef5a9c2c94aaf1a4288172","isMergeCommit":true,"messageTitle":"Fixed unresolved merge","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4bbac7ecc89de2ea1f18a0b3fe5aa5e1bc4f2265","isMergeCommit":false,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"6cd6c37ead68c4b389fb5c88296604599be37272","isMergeCommit":true,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"06e8865dc23823bff453a73e8ecfa52fffea2b1e","isMergeCommit":false,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-19","commitResults":[{"hash":"3127654c68e3fcba58f73ccccf5737502ee90421","isMergeCommit":false,"messageTitle":"Fix indentation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":78},"test-code":{"insertions":0,"deletions":4}}},{"hash":"dca72b7be67ea4541f4246de06a127116d3f8d54","isMergeCommit":true,"messageTitle":"Merge CompletePreqs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f58efff20a7620a2b3490ea0e2d2d10cd90a3b67","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-4:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3858e4f65cfdeeeb9619b94b7bc63b076bba9f71","isMergeCommit":false,"messageTitle":"Fix CheckstyleMain","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":9},"test-code":{"insertions":9,"deletions":8}}},{"hash":"048fcd3aceef10dca2c3f33158706897d68b3bab","isMergeCommit":false,"messageTitle":"Remove API Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":102},"test-code":{"insertions":0,"deletions":16}}},{"hash":"fde33ba4b836e32a85c0f5125f315203cbbba6c6","isMergeCommit":true,"messageTitle":"Merge pull request #23 from rohitcube/branch-AddAPIClass","messageBody":"Remove API Class","tags":["v0.1"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"b2440a2441f95ea27fb2d5a8ea2804c3189bc3a9","isMergeCommit":false,"messageTitle":"Add API Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":0},"test-code":{"insertions":51,"deletions":0}}},{"hash":"a74c4c143857f517b7518f354aa339e5b90c9eb6","isMergeCommit":false,"messageTitle":"Add API Class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"43d67d6a9cb7a1e38683a3f6edd3f56b9c49baa1","isMergeCommit":true,"messageTitle":"Merge pull request #35 from rohitcube/Add-API-class-and-parser","messageBody":"Add API class and functions","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"6dcec60b621b4f3a3b9e66fbf1c5318b5201e3f7","isMergeCommit":false,"messageTitle":"Add functions that return json to API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":4},"test-code":{"insertions":0,"deletions":1}}},{"hash":"c4b9c1f6be1164dc52cef97da20ee323e347d0e4","isMergeCommit":false,"messageTitle":"Deleted \u0027info\u0027 command from module controller","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":11}}},{"hash":"ff4016383cf24bb5d6c682ea99fd9fd321149ad6","isMergeCommit":true,"messageTitle":"Merge pull request #40 from rohitcube/rohit/fix/add-json-functions-to-api-class","messageBody":"Rohit/fix/add json functions to api class","fileTypesAndContributionMap":{}}]}],"CerIsaiah":[{"date":"2023-10-08","commitResults":[{"hash":"d6daf466c3aae14881d7203cec549477dda5aca9","isMergeCommit":false,"messageTitle":"Add photo and aboutUs information","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"621e25c4f695763044e239140052377d8211fa05","isMergeCommit":true,"messageTitle":"Add aboutUs information","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"1e56807ba29080daddc8d8d177aa0110c772c699","isMergeCommit":false,"messageTitle":"Fixed merge conflicts with about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-18","commitResults":[{"hash":"5c7739cc63dfdba986b90ce2f2fcce5c0683a2b2","isMergeCommit":false,"messageTitle":"Add the complete class command to mark when a class is complete","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":165,"deletions":3}}},{"hash":"e39a5de84acff43f9364ed22ee1dda158fca3ecf","isMergeCommit":true,"messageTitle":"Merge major and complete commands","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"348b3da8aa36d1612001cf37da34c02482855c12","isMergeCommit":false,"messageTitle":"Fix merge tests conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":1},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-25","commitResults":[{"hash":"1cb45d2901f18782158ee8871e09adb98caee588","isMergeCommit":false,"messageTitle":"fix complete feature bugs and optimized features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":9}}},{"hash":"4a6d6f64b8e288c9ff071bb39982f18ab1824149","isMergeCommit":true,"messageTitle":"Merge pull request #38 from CerIsaiah/bug-completefeature","messageBody":"fix complete feature bugs and optimized features","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"SebasFok":{"docs":51,"functional-code":69,"test-code":35},"ryanlohyr":{"docs":20,"functional-code":463,"test-code":110},"janelleenqi":{"docs":41,"functional-code":110,"test-code":119,"other":1},"rohitcube":{"docs":0,"functional-code":58,"test-code":0,"other":1},"CerIsaiah":{"docs":6,"functional-code":215,"test-code":1}},"authorContributionVariance":{"SebasFok":756.12854,"ryanlohyr":6213.1133,"janelleenqi":5893.453,"rohitcube":3096.9536,"CerIsaiah":828.4441},"authorDisplayNameMap":{"SebasFok":"CS2113-T17-4 SEBA..HUNG","ryanlohyr":"CS2113-T17-4 RYAN.. RUI","janelleenqi":"CS2113-T17-4 LIOW..ELLE","rohitcube":"CS2113-T17-4 ROHI..THAN","CerIsaiah":"CS2113-T17-4 CERV..DEAN"}} +{"authorDailyContributionsMap":{"SebasFok":[{"date":"2023-10-05","commitResults":[{"hash":"aeef6fad05b0f6d0f0c354e9db79ba3ecbdfbef9","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-06","commitResults":[{"hash":"2039386c7d8e661b4e7bf66f1d4fa3ea80da23ac","isMergeCommit":false,"messageTitle":"Add AboutUs information for Sebastian","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}}]},{"date":"2023-10-07","commitResults":[{"hash":"de8365c98e9274e9c7b40228f5c687bbb7774a2e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"a728f005673371e58b95131d45ece32ea30c5cf6","isMergeCommit":true,"messageTitle":"Merge pull request #4 from janelleenqi/branch-Edit-AboutUs-v1","messageBody":"janelleenqi-AboutUs","fileTypesAndContributionMap":{}},{"hash":"a53713ffad1e3c43fb6821740bbbae2f0b934975","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2336e0f03aede437eefc987d98349c05b02aecc3","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-4/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5677d80546a6e55ae3fc9b3c2f9efc6cc36ddfbc","isMergeCommit":true,"messageTitle":"Merge pull request #5 from ryanlohyr/master","messageBody":"Ryanlohyr-AboutUs","fileTypesAndContributionMap":{}},{"hash":"f10394ae22fddfcc20621826cb53a03dd516d990","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T17-4/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"0d840309811b905770039ac8ee89b6c803eb14ee","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9c3ef1f3c1cd7136c584fdbcd2b00be6f53e8069","isMergeCommit":false,"messageTitle":"Fix AboutUs page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"d97257fe38507e38b90b874e965ec94cc6b5c00a","isMergeCommit":false,"messageTitle":"Revert \"Fix AboutUs page\"","messageBody":"This reverts commit 9c3ef1f3c1cd7136c584fdbcd2b00be6f53e8069.\n","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"d0a5cf6d3dab23e3ab691ed2f8a77ddb0e301864","isMergeCommit":false,"messageTitle":"Fix AboutUs page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"a6429ace4f7089682cc2c231fd5a974b2abacea8","isMergeCommit":true,"messageTitle":"Merge pull request #8 from SebasFok/branch-FixAboutUs","messageBody":"Fix about us page","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"be9eda9ae041c25d60d33065384ebbafb11b421b","isMergeCommit":false,"messageTitle":"Add student class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":0}}},{"hash":"f37c8d8033f4f5340abf8af3f6cfee7194242bee","isMergeCommit":false,"messageTitle":"Add \"major\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"2ed39fab10850f7beac9b1dea7710dab4ee3b966","isMergeCommit":false,"messageTitle":"Add enum for majors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":8}}},{"hash":"a777fd584c0ae40bcd4d764c056dde18112af52d","isMergeCommit":false,"messageTitle":"Add tests for \u0027updateMajor\u0027 function","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":26,"deletions":0}}},{"hash":"88ac029553890db8c4945a2fd9d5dce17ff67011","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"20e6817a7cccc59b82ffed3fccf09a44a67b767c","isMergeCommit":true,"messageTitle":"Merge pull request #16 from SebasFok/branch-SelectMajor","messageBody":"Add major feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"f8bdc1bbed8355ad7010bcf3a1dfe6a49b2ac42d","isMergeCommit":false,"messageTitle":"Fix Major command bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":11},"test-code":{"insertions":34,"deletions":24}}},{"hash":"1fd6f85f957f1380b71520ff1ccca4efea83951c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into SebasFok-FixMajor","messageBody":"# Conflicts:\n#\tsrc/test/java/seedu/duke/controllers/ModulePlannerControllerTest.java\n","fileTypesAndContributionMap":{}},{"hash":"7ef09a89be73ba92a5b1c84aa9bb8ed37f8681d0","isMergeCommit":false,"messageTitle":"Fix CheckStyle Issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"d98977a14d7f4b3d2de12892a24cd09b46fc462d","isMergeCommit":true,"messageTitle":"Merge pull request #36 from SebasFok/SebasFok-FixMajor","messageBody":"Fix major bugs","fileTypesAndContributionMap":{}},{"hash":"f179c1478f01690019185e566c6739999e30a483","isMergeCommit":false,"messageTitle":"Create Developer Guide for Major feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"f2b9bf9248cc0a203e4a62ab5303f80e85729dad","isMergeCommit":true,"messageTitle":"Merge pull request #37 from SebasFok/SebasFok-DGForMajorFeature","messageBody":"Create Developer Guide for Major feature","fileTypesAndContributionMap":{}}]}],"ryanlohyr":[{"date":"2023-10-07","commitResults":[{"hash":"a04733a9b91f0436d9e7599a9dbe7438aa6089a5","isMergeCommit":false,"messageTitle":"Update ryan portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-12","commitResults":[{"hash":"f7df8565f0f1c09b3e97078aa0914ec8c8beb51e","isMergeCommit":false,"messageTitle":"create project base layout","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":12}}},{"hash":"448ac15a82ee8f25745d15ad226d9a5dd0f6bc55","isMergeCommit":false,"messageTitle":"Create base project layout","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":12}}},{"hash":"9bddadace6b3fe56ea34260bfbf808a576b7e336","isMergeCommit":false,"messageTitle":"Revert \"Create base project layout\"","messageBody":"This reverts commit 448ac15a82ee8f25745d15ad226d9a5dd0f6bc55.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":66}}},{"hash":"5cb0e57054f2e47ba0c944876577e4b36e3cb793","isMergeCommit":true,"messageTitle":"Merge branch \u0027ryan-createLayout\u0027 of https://github.com/ryanlohyr/tp into ryan-createLayout","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"de707c380d524d5b537fa700b0bd3337eb46c778","isMergeCommit":false,"messageTitle":"Fix test bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"52772484e68d1498e236d83c230d6226cc9b0dc3","isMergeCommit":true,"messageTitle":"Merge pull request #7 from ryanlohyr/ryan-createLayout","messageBody":"Create project base layout","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"813fa09444c9155f79f736faadd281e068a13fe7","isMergeCommit":false,"messageTitle":"Add pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":4,"deletions":0}}},{"hash":"92685f4a8354d7c9339df54862e8ad730875ae31","isMergeCommit":false,"messageTitle":"Add pace feature v2","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":88,"deletions":3},"test-code":{"insertions":86,"deletions":3}}},{"hash":"e4f352e491e6bee1e281a3aeac2b5cbec16e50ce","isMergeCommit":false,"messageTitle":"fix window os bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":16},"test-code":{"insertions":2,"deletions":4}}},{"hash":"ab09a619ac2be800ae064c73f1b41ce734c8f64b","isMergeCommit":true,"messageTitle":"Merge pull request #9 from ryanlohyr/ryan-paceFeature","messageBody":"Add pace feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"22c9f54fa9950fed39f4313ac4569cfa59a40694","isMergeCommit":false,"messageTitle":"add pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":18}}},{"hash":"d3fc98e585ca694c04d379ebc953ff02c874042a","isMergeCommit":true,"messageTitle":"Merge pull request #14 from ryanlohyr/ryan-paceFeature","messageBody":"add pace feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"c12b196537f7101680d6b70f81d40496e13cb010","isMergeCommit":false,"messageTitle":"fix format bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":79}}},{"hash":"7b5a888b1c9c716564aee6458077499f76f301ab","isMergeCommit":true,"messageTitle":"fix test bug","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0e0f7bfab9fd4d4c361e5a315b233c8e07248f71","isMergeCommit":true,"messageTitle":"Merge pull request #22 from ryanlohyr/master","messageBody":"fix formatting and unit test bug","fileTypesAndContributionMap":{}},{"hash":"94d07e6718756e5e3ca942fe01955a4ba192be5c","isMergeCommit":true,"messageTitle":"Merge pull request #21 from rohitcube/master","messageBody":"Add API class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"b36f87967ffacbc039d25221df0214ffb7ec9530","isMergeCommit":false,"messageTitle":"Create developer guide for pace feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2},"other":{"insertions":1,"deletions":1},"docs":{"insertions":28,"deletions":0},"test-code":{"insertions":2,"deletions":1}}},{"hash":"ff1fed86da7619c2faa142dc10f0a5c93da3f6e7","isMergeCommit":true,"messageTitle":"Merge pull request #27 from ryanlohyr/ryan/developer-guide","messageBody":"Create developer guide for pace feature","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"bd43a06ecf5d38a83e18e921c2b2471b97d790f3","isMergeCommit":false,"messageTitle":"Fix repo structure and api mods issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":10},"other":{"insertions":6,"deletions":9},"test-code":{"insertions":4,"deletions":3}}},{"hash":"71fc4612770b0946010116462f06af6ebe347f79","isMergeCommit":true,"messageTitle":"Merge pull request #41 from ryanlohyr/ryan/fix/repo-structure","messageBody":"Fix repo structure and api mods issue","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"472947849c656b0915df4c8752e547ff55cbb61b","isMergeCommit":false,"messageTitle":"Restructure project and add prerequisite function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":242,"deletions":35},"test-code":{"insertions":22,"deletions":50}}},{"hash":"d28259e7dc130809d475536cfcad9c14f94ae623","isMergeCommit":true,"messageTitle":"Merge pull request #42 from ryanlohyr/ryan/feat/prerequisite","messageBody":"Restructure project and add prerequisite function","fileTypesAndContributionMap":{}}]}],"janelleenqi":[{"date":"2023-10-07","commitResults":[{"hash":"b8e95e351ff1f9e8058d1fa4512b9fed2a801ff5","isMergeCommit":true,"messageTitle":"Merge pull request #1 from SebasFok/SebasFok-AboutUs","messageBody":"Add AboutUs information for Sebastian","fileTypesAndContributionMap":{}},{"hash":"215bbf707ba73e12fe4a3852bd195add31b9563b","isMergeCommit":false,"messageTitle":"Edit AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"20248cfdb579d3a65dba6b00480f73fd6818e9de","isMergeCommit":true,"messageTitle":"Merge pull request #3 from rohitcube/master","messageBody":"added profile - rohit","fileTypesAndContributionMap":{}},{"hash":"320cf1073f08efaeb681a28d2a71a2c05d03f61a","isMergeCommit":false,"messageTitle":"Edit AboutUs.md to include github","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"eeadb9d732a337b8cd7c73ed135d8d5aabf3ba2e","isMergeCommit":true,"messageTitle":"Merge AboutUs.md","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"e9a420df1a3a38da09d884a238231f1d151f3f37","isMergeCommit":false,"messageTitle":"add \"left\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":97,"deletions":22}}},{"hash":"d61cfbec5c631f4536a0498f84b53a469717b7a9","isMergeCommit":false,"messageTitle":"delete unnecessary lines","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"9fec7539e4da6bde4964b8bb37ea3827706ac546","isMergeCommit":false,"messageTitle":"add ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":44,"deletions":0}}},{"hash":"22d2823da7d4c2553ed68abf4765cc2f69476943","isMergeCommit":false,"messageTitle":"add listModulesLeftTest for successful scenario in ModulePlannerControllerTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":20,"deletions":0}}},{"hash":"c14bd0e9753371612f42b4a7653b130eedb55459","isMergeCommit":false,"messageTitle":"add existsTest for successful scenarios in ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":2}}},{"hash":"fe408d5d36d769ff7ccd93af2aa871dbb174bc36","isMergeCommit":false,"messageTitle":"add some exception handling for ModuleList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":14}}},{"hash":"fff60307f1c5bdb366bcd603e5b712359400b076","isMergeCommit":false,"messageTitle":"add failure scenarios for existsTest and getDifferenceTest in ModuleListTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":8},"test-code":{"insertions":30,"deletions":7}}},{"hash":"21c26955eebadc657445a51c384758035a3bde48","isMergeCommit":false,"messageTitle":"add javadoc comments for functions in the \"left\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}},{"hash":"8789c06c3791750c5fd338706ea328ffb9040de7","isMergeCommit":false,"messageTitle":"Add success scenario where mainModuleList is empty for existsTest for ModuleListTest. This closes #10","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":16},"test-code":{"insertions":11,"deletions":0}}},{"hash":"bd71200339e77f407935b3039a6437d4e41a9cd7","isMergeCommit":false,"messageTitle":"Edit for build-and-check Gradle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":30},"test-code":{"insertions":9,"deletions":7}}},{"hash":"1c3dba0cc588f9746f2a6706955df611cf1dac8c","isMergeCommit":false,"messageTitle":"Edit 2 for build-and-check Gradle (add new line at the end of the file)","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"7103ecb9071ddb693815469edc4a98c724696ce3","isMergeCommit":false,"messageTitle":"Edit 3 for build-and-check Gradle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"28c461ff31ca243dacb48ca80caca708351319c5","isMergeCommit":true,"messageTitle":"Merge pull request #13 from janelleenqi/branch-left-command","messageBody":"Add Left Command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"4dad4e47e3274967b37f8fdf9168819dc7d8c360","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"ee22092cdb466e755f74b1d931009faf2a8450a3","isMergeCommit":false,"messageTitle":"Reorganise files in directory","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"other":{"insertions":1,"deletions":1},"test-code":{"insertions":2,"deletions":1}}},{"hash":"4bb7e1ca9fd650a59260929e471b6fdcc5cf9ae8","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"86a67bc781962dfebf96ff33220836d88f56949d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-shift-file","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"844497020cb6212656e880719bbbd03584f59310","isMergeCommit":false,"messageTitle":"Assertions Enabled in the build.gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":1}}},{"hash":"8fe8d35becdda7684f96ce0a750afda64d581a87","isMergeCommit":false,"messageTitle":"Add assertions to ModuleList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"634977a79898a14c9da7a96127606077f40d63f6","isMergeCommit":false,"messageTitle":"Update DeveloperGuide for Left","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":34,"deletions":8}}},{"hash":"71a99acc2f14adcb21441720314b3036f25b8db3","isMergeCommit":false,"messageTitle":"Fixes #10, fixes #33","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"a4358197e7e9da71f5b3a7cce3beb7eabcd57224","isMergeCommit":true,"messageTitle":"Merge pull request #34 from janelleenqi/branch-ensure-project-deliverables","messageBody":"Add assertions, Update Developer Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"b9fac348cbba2fe6641b522779774367f60831de","isMergeCommit":false,"messageTitle":"Update getRequirements to get only module codes from full CEGRequirements.txt","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":1}}},{"hash":"449948670f2fb2639a341e9afc3dbb1d1699d626","isMergeCommit":false,"messageTitle":"Add skeleton of \"required\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":50,"deletions":8}}}]},{"date":"2023-10-29","commitResults":[{"hash":"67ba22e5c71002d4c29b71c0e9bc4aa7e1c8f176","isMergeCommit":false,"messageTitle":"Show half table","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":1}}},{"hash":"a457e05e8264244efecf3d6ea200b01d860c35a1","isMergeCommit":false,"messageTitle":"Complete simple formatting for \"required\" feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":41}}},{"hash":"0dcce0323d8643c7a55fcfe68a49bb214cd8cacc","isMergeCommit":false,"messageTitle":"add \"required\" feature for the major \"CS\"","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"18be58c5dbf0b09b3bb9857962bd2280647d269c","isMergeCommit":false,"messageTitle":"fix formatting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":41}}},{"hash":"1faae023633cccdbcfc83c9a94571c4ce4e45f12","isMergeCommit":false,"messageTitle":"extract getLongestStringLength(File f)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":18}}},{"hash":"c05f39be85d642b4f2a36be9ee52c10f29533ab7","isMergeCommit":false,"messageTitle":"Add javadoc comments for DataRepository.java and CommandLineView.java Fixes #32","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":13}}},{"hash":"12fd2b79dbf99a1a8a651b64d25f9fb6181b4fb4","isMergeCommit":false,"messageTitle":"Attempt 1 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e2871c016b80321b3234435cc5974b8129f695c9","isMergeCommit":false,"messageTitle":"Attempt 2 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"eea92354de414fdad713768272e01cfdce39024e","isMergeCommit":false,"messageTitle":"Attempt 3 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"254e7224502763d17b0a1c66d8e6515a1a8a1e84","isMergeCommit":false,"messageTitle":"Attempt 4 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"1ffc685b47a7f14c4b49644b8b3db652af1b0510","isMergeCommit":false,"messageTitle":"Attempt 5 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"f0a922ee6e36aba351cdef5d26c728ad822b153a","isMergeCommit":false,"messageTitle":"Attempt 6 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"9ce59a225b8d020f0c5382d2b1df7d3a1b5e2dbb","isMergeCommit":false,"messageTitle":"Attempt 7 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"d1d510937b71872b8a2b0811da87577be201e34b","isMergeCommit":false,"messageTitle":"Attempt 8 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"c2e9b4592b7961585605487af164075e734256d9","isMergeCommit":false,"messageTitle":"Attempt 9 of fixing unicode problems","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"206bda85747cccf85dd05ad738bd880a6e1470b9","isMergeCommit":false,"messageTitle":"Fixes #32","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"01ac435a7756ed81d1085a174bf4719f2805934e","isMergeCommit":true,"messageTitle":"Merge pull request #43 from janelleenqi/Janelle/feature/required-modules","messageBody":"Add feature \"required\"","fileTypesAndContributionMap":{}}]}],"rohitcube":[{"date":"2023-10-07","commitResults":[{"hash":"a705965a345d0fb777a8268c24a02cb95f3c7009","isMergeCommit":false,"messageTitle":"added profile - rohit","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-09","commitResults":[{"hash":"67dfcdb437ce0cff8d2449ca49a32c15acb77cd7","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"526e6983d8cb279b409a14132ce402926860616a","isMergeCommit":true,"messageTitle":"Merge pull request #6 from rohitcube/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"abbb47faf32f9201108d53c0b360b528451fdc81","isMergeCommit":false,"messageTitle":"Added API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":1},"other":{"insertions":1,"deletions":0},"test-code":{"insertions":19,"deletions":0}}},{"hash":"3295f1687ef050ad59ed4739c2bbb84b0b40cbf1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e6920151453fa8acfaef5a9c2c94aaf1a4288172","isMergeCommit":true,"messageTitle":"Fixed unresolved merge","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4bbac7ecc89de2ea1f18a0b3fe5aa5e1bc4f2265","isMergeCommit":false,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"6cd6c37ead68c4b389fb5c88296604599be37272","isMergeCommit":true,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"06e8865dc23823bff453a73e8ecfa52fffea2b1e","isMergeCommit":false,"messageTitle":"Add API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-19","commitResults":[{"hash":"3127654c68e3fcba58f73ccccf5737502ee90421","isMergeCommit":false,"messageTitle":"Fix indentation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":78},"test-code":{"insertions":0,"deletions":4}}},{"hash":"dca72b7be67ea4541f4246de06a127116d3f8d54","isMergeCommit":true,"messageTitle":"Merge CompletePreqs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f58efff20a7620a2b3490ea0e2d2d10cd90a3b67","isMergeCommit":true,"messageTitle":"Merge branch \u0027AY2324S1-CS2113-T17-4:master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"3858e4f65cfdeeeb9619b94b7bc63b076bba9f71","isMergeCommit":false,"messageTitle":"Fix CheckstyleMain","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":9},"test-code":{"insertions":9,"deletions":8}}},{"hash":"048fcd3aceef10dca2c3f33158706897d68b3bab","isMergeCommit":false,"messageTitle":"Remove API Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":102},"test-code":{"insertions":0,"deletions":16}}},{"hash":"fde33ba4b836e32a85c0f5125f315203cbbba6c6","isMergeCommit":true,"messageTitle":"Merge pull request #23 from rohitcube/branch-AddAPIClass","messageBody":"Remove API Class","tags":["v0.1"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"b2440a2441f95ea27fb2d5a8ea2804c3189bc3a9","isMergeCommit":false,"messageTitle":"Add API Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":0},"test-code":{"insertions":51,"deletions":0}}},{"hash":"a74c4c143857f517b7518f354aa339e5b90c9eb6","isMergeCommit":false,"messageTitle":"Add API Class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"43d67d6a9cb7a1e38683a3f6edd3f56b9c49baa1","isMergeCommit":true,"messageTitle":"Merge pull request #35 from rohitcube/Add-API-class-and-parser","messageBody":"Add API class and functions","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"6dcec60b621b4f3a3b9e66fbf1c5318b5201e3f7","isMergeCommit":false,"messageTitle":"Add functions that return json to API class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":4},"test-code":{"insertions":0,"deletions":1}}},{"hash":"c4b9c1f6be1164dc52cef97da20ee323e347d0e4","isMergeCommit":false,"messageTitle":"Deleted \u0027info\u0027 command from module controller","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":11}}},{"hash":"ff4016383cf24bb5d6c682ea99fd9fd321149ad6","isMergeCommit":true,"messageTitle":"Merge pull request #40 from rohitcube/rohit/fix/add-json-functions-to-api-class","messageBody":"Rohit/fix/add json functions to api class","fileTypesAndContributionMap":{}}]}],"CerIsaiah":[{"date":"2023-10-08","commitResults":[{"hash":"d6daf466c3aae14881d7203cec549477dda5aca9","isMergeCommit":false,"messageTitle":"Add photo and aboutUs information","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}},{"hash":"621e25c4f695763044e239140052377d8211fa05","isMergeCommit":true,"messageTitle":"Add aboutUs information","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"1e56807ba29080daddc8d8d177aa0110c772c699","isMergeCommit":false,"messageTitle":"Fixed merge conflicts with about us","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-18","commitResults":[{"hash":"5c7739cc63dfdba986b90ce2f2fcce5c0683a2b2","isMergeCommit":false,"messageTitle":"Add the complete class command to mark when a class is complete","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":165,"deletions":3}}},{"hash":"e39a5de84acff43f9364ed22ee1dda158fca3ecf","isMergeCommit":true,"messageTitle":"Merge major and complete commands","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"348b3da8aa36d1612001cf37da34c02482855c12","isMergeCommit":false,"messageTitle":"Fix merge tests conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":1},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-25","commitResults":[{"hash":"1cb45d2901f18782158ee8871e09adb98caee588","isMergeCommit":false,"messageTitle":"fix complete feature bugs and optimized features","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":9}}},{"hash":"4a6d6f64b8e288c9ff071bb39982f18ab1824149","isMergeCommit":true,"messageTitle":"Merge pull request #38 from CerIsaiah/bug-completefeature","messageBody":"fix complete feature bugs and optimized features","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"SebasFok":{"docs":51,"functional-code":68,"test-code":35},"ryanlohyr":{"docs":20,"functional-code":456,"test-code":110},"janelleenqi":{"docs":41,"functional-code":281,"test-code":119,"other":1},"rohitcube":{"docs":0,"functional-code":58,"test-code":0,"other":1},"CerIsaiah":{"docs":6,"functional-code":215,"test-code":1}},"authorContributionVariance":{"SebasFok":737.90375,"ryanlohyr":6073.384,"janelleenqi":9009.707,"rohitcube":3022.6257,"CerIsaiah":808.1418},"authorDisplayNameMap":{"SebasFok":"CS2113-T17-4 SEBA..HUNG","ryanlohyr":"CS2113-T17-4 RYAN.. RUI","janelleenqi":"CS2113-T17-4 LIOW..ELLE","rohitcube":"CS2113-T17-4 ROHI..THAN","CerIsaiah":"CS2113-T17-4 CERV..DEAN"}} diff --git a/AY2324S1-CS2113-T18-2_tp_master/authorship.json b/AY2324S1-CS2113-T18-2_tp_master/authorship.json index ddec789..1b397b5 100644 --- a/AY2324S1-CS2113-T18-2_tp_master/authorship.json +++ b/AY2324S1-CS2113-T18-2_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027com.googlecode.json-simple\u0027, name: \u0027json-simple\u0027, version: \u00271.1.1\u0027","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027org.apache.commons\u0027, name: \u0027commons-lang3\u0027, version: \u00273.0\u0027","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027org.knowm.xchart\u0027, name: \u0027xchart\u0027, version: \u00273.2.2\u0027","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" mainClass.set(\"seedu.financialplanner.FinancialPlanner\")","lastModifiedDate":"2023-10-07"},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":48,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"wwweert123":3,"-":45,"ryan1604":2}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"--------|:-----------:|:--------------:|:---------:","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ryan Chua | [Github](https://github.com/ryan1604) | [Portfolio](docs/team/ryanchua.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Neo Min Wei | [Github](https://github.com/NeoMinWei) | [Portfolio](docs/team/NeoMinWei.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Frederick | [Github](https://github.com/) | [Portfolio](docs/team/frederick.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":3,"-":5,"ryan1604":1}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"**Xchart (A Simple Charting Library for Java)**","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"- author: KNOWN","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"- source: https://knowm.org/open-source/xchart/","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"**JSON Simple (simple Java toolkit for encoding and decoding JSON)**","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"- author: Yidong Fang (Google Code)","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"- source: https://code.google.com/archive/p/json-simple/","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"**Apache Common Langs 3**","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"- author: Apache Commons","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"- source: https://commons.apache.org/proper/commons-lang/","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"**Alpha Vantage Stock Market API**","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"- author: Alpha Vantage","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"- source: https://www.alphavantage.co/","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"**round() method in Cashflow.java**","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" - author: mhadidg","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" - source: https://stackoverflow.com/questions/2808535/round-a-double-to-2-decimal-places","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":"**capitalize() method in Cashflow.java**","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" - author: Nick Bolton","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" - source: https://stackoverflow.com/questions/1892765/how-to-capitalize-the-first-character-of-each-word-in-a-string","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":"**DG adapted from**","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"* [Addressbook-level3](https://github.com/se-edu/addressbook-level3)","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"### Storage Component","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"API: `Storage.java`","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"![](images/Storage.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"* The storage component loads data from the saved text files when the application starts, and saves the data to the","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" text files when the application exits.","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"* The storage class uses the static methods in LoadData and SaveData to load and save data respectively.","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"* The `load` method in LoadData reads the `data.txt` file and loads any existing Income, Expense and Budget into the application.","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"* The `save` method in SaveData saves all Incomes, Expenses and existing Budget into the `data.txt` file.","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"#### Design considerations:","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":"* There are 2 main ways to implement the storage, one is to save the data after every command, and the other is to save ","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"the data one upon exiting the program with the `exit` command.","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"* Saving the data once upon exit (Currently implemented):","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" * Advantage: Better efficiency and performance of the program.","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" * Disadvantage: If the program crashes or exits incorrectly, data will not be saved.","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":"* Saving the data after every command:","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" * Advantage: Changes are saved after every command.","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" * Disadvantage: Executing command might slow down the program when there is a large amount of data to be saved.","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":"### Visualization Feature ","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":"This feature is implemented with the help of [XChart](https://knowm.org/open-source/xchart/), a simple charting library for Java by Knowm.","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":"By typing in the vis command with the appropriate arguments (/s and /t), users will be able to visualize their income or expense ","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":"using visualization tools (Piechart, Bar Chart)","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":"Demo: ","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":"`vis /t expense /c pie`","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":"Output","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":"`Displaying piechart for expense`","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":"A message will be shown telling you that the chart is being displayed","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visOutput.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":"This feature was implemented with the help of three different classes.","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":"They are namely: Visualizer, Categorizer, VisCommand (Inherits from abstract Command Class)","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":"VisCommand\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":"1) Read the parameters of the vis command entered by the user","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":"- `/t` Reads the type of cashflow that the user wants to visualize (income/expense)","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":"- `/c` Reads the type of visualization tools the user wants (piechart/barchart)","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":"2) Calls the Cateorgizer to sort cashflow (Income/Expense) according to type","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":"3) Calls the Visualizer to display the chart to the user","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":"Categorizer\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":"According to the cashflow type (Income/Expense) arugment passed in, the Categorizer sorts the ","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":"specified cashflow entry according to type using a Hashmap which is returned and used by the Visualizer","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":"Visualizer\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":"According to the chart type (Pie/Bar) argument and the Hashmap obtained from the categorizer passed in, ","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":"the visualizer displays the specified visualization chart by calling the charting library Xchart.","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":"### Class Diagram","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualisationClass.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":"### Sequence Diagram ","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":"Overall ","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualisationSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":"Categorizer","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":"![](images/vis/categorizerSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":"Visualizer","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualizerSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":"### Add income/expense feature","lastModifiedDate":"2023-10-24"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":"The add income/expense command has 2 compulsory arguments `/t` and `/a` and 1 optional argument `/r`.","lastModifiedDate":"2023-10-24"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":"add income /a 100 /t salary /r 30","lastModifiedDate":"2023-10-24"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":128,"author":{"gitId":"NeoMinWei"},"content":"Below are the steps that shows the implementation of add income/expense.","lastModifiedDate":"2023-10-24"},{"lineNumber":129,"author":{"gitId":"NeoMinWei"},"content":"#### Step 1","lastModifiedDate":"2023-10-24"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":"An instantiated AddCashflowCommand class gets the instance of CashflowList.","lastModifiedDate":"2023-10-24"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":132,"author":{"gitId":"NeoMinWei"},"content":"This allows the AddCashflowCommand instance to access the methods of CashflowList.","lastModifiedDate":"2023-10-24"},{"lineNumber":133,"author":{"gitId":"NeoMinWei"},"content":"#### Step 2","lastModifiedDate":"2023-10-24"},{"lineNumber":134,"author":{"gitId":"NeoMinWei"},"content":"The AddCashflowCommand instance then calls addIncome() or addExpense(), depending on what `category` is initialised as.","lastModifiedDate":"2023-10-24"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":136,"author":{"gitId":"NeoMinWei"},"content":"addIncome() or addExpense() instantiates an Income or Expense object respectively.","lastModifiedDate":"2023-10-24"},{"lineNumber":137,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":"switch (category) {","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addIncome(amount, incomeType, recur);","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-24"},{"lineNumber":145,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addExpense(amount, expenseType, recur);","lastModifiedDate":"2023-10-24"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":147,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-24"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-24"},{"lineNumber":149,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":150,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":151,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"NeoMinWei"},"content":"#### Step 3","lastModifiedDate":"2023-10-24"},{"lineNumber":153,"author":{"gitId":"NeoMinWei"},"content":"The instantiated income/expense then updates the overall balance through addIncomeValue() or addExpenseValue().","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":155,"author":{"gitId":"NeoMinWei"},"content":"The income/expense object is also added to the list in Cashflowlist which contains all incomes/expenses.","lastModifiedDate":"2023-10-24"},{"lineNumber":156,"author":{"gitId":"NeoMinWei"},"content":"#### Step 4","lastModifiedDate":"2023-10-24"},{"lineNumber":157,"author":{"gitId":"NeoMinWei"},"content":"The added income/expense is then displayed to the user through the Ui.","lastModifiedDate":"2023-10-24"},{"lineNumber":158,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":159,"author":{"gitId":"NeoMinWei"},"content":"#### Diagrams","lastModifiedDate":"2023-10-24"},{"lineNumber":160,"author":{"gitId":"NeoMinWei"},"content":"Given below is the class diagram showing the class structure of the add income/expense mechanism:","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"NeoMinWei"},"content":"![](images/CashflowClassDiagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"NeoMinWei"},"content":"Given below is the sequence diagram showing the add income/expense mechanism:","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"NeoMinWei"},"content":"![](images/AddCashflowSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"ryan1604"},"content":"### Budget Feature","lastModifiedDate":"2023-10-24"},{"lineNumber":168,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"ryan1604"},"content":"This feature has 5 functions, `set`, `update`, `delete`, `reset`, and `view`.","lastModifiedDate":"2023-10-24"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":"![](images/Budget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":"The BudgetCommand will execute the appropriate command and print through `Budget.java` and prints any message to the user through `Ui.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":"#### Set and update budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":177,"author":{"gitId":"ryan1604"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":178,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":179,"author":{"gitId":"ryan1604"},"content":"budget set /b 500","lastModifiedDate":"2023-10-24"},{"lineNumber":180,"author":{"gitId":"ryan1604"},"content":"budget update /b 1000","lastModifiedDate":"2023-10-24"},{"lineNumber":181,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":182,"author":{"gitId":"ryan1604"},"content":"The \u0027/b\u0027 is followed by the budget amount. The first line will set the budget by calling `setBudget(500)` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":183,"author":{"gitId":"ryan1604"},"content":"The second line updates the budget by adding or subtracting the difference between the initial and updated amount to the ","lastModifiedDate":"2023-10-24"},{"lineNumber":184,"author":{"gitId":"ryan1604"},"content":"initial and current budget. This is done through `updateBudget(500)` method in `Budget.java`. Both functions can be seen ","lastModifiedDate":"2023-10-24"},{"lineNumber":185,"author":{"gitId":"ryan1604"},"content":"in the diagram above","lastModifiedDate":"2023-10-24"},{"lineNumber":186,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"ryan1604"},"content":"#### Delete budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":189,"author":{"gitId":"ryan1604"},"content":"![](images/deleteBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":190,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"ryan1604"},"content":"The budget will be deleted by setting the initial and current budget to 0 through the `deleteBudget()` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"ryan1604"},"content":"Example: `budget delete`","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":195,"author":{"gitId":"ryan1604"},"content":"#### Reset budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":196,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":197,"author":{"gitId":"ryan1604"},"content":"![](images/resetBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":198,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":199,"author":{"gitId":"ryan1604"},"content":"The budget will be reset by resetting the current budget to the initial budget through the `resetBudget()` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"ryan1604"},"content":"Example: `budget reset`","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"ryan1604"},"content":"#### View budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":204,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"ryan1604"},"content":"![](images/viewBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":206,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"ryan1604"},"content":"The current budget will be shown to the user through the `Ui`.","lastModifiedDate":"2023-10-24"},{"lineNumber":208,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":209,"author":{"gitId":"ryan1604"},"content":"Example: `budget view`","lastModifiedDate":"2023-10-24"},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":212,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":213,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":219,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":221,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":223,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":224,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":225,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":226,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":228,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":230,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":232,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":234,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":236,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":238,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"wwweert123":71,"NeoMinWei":51,"-":44,"ryan1604":72}},{"path":"docs/Style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T2 #5252CE","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"## Table of contents","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"* [Introduction](#introduction)","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"* [Quick start](#quick-start)","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"* [Features](#features)","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":" * [Budget](#budget)","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" * [Setting budget](#setting-a-budget-budget-set)","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" * [Updating budget](#updating-budget-budget-update)","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" * [Resetting budget](#resetting-budget-budget-reset)","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" * [Deleting budget](#deleting-budget-budget-delete)","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" * [Viewing budget](#viewing-budget-budget-view)","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" * [Displaying Overview](#displaying-overview-overview)","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" * [View Balance](#viewing-balance-balance)","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" * [Exiting the program](#exiting-the-program-exit)","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" * [Saving data](#saving-the-data)","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" * [Loading data](#loading-the-data)","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"* [FAQ](#faq)","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"* [Command Summary](#command-summary)","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"Financial Planner is a Command Line Interface (CLI) application for managing your finances conveniently. ","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"It is optimized for use via the CLI and leverages your expertise in CLI and your ability to type fast and gives ","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"you a one-stop interface to access a plethora of features to manage your finances.","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"{Give steps to get started quickly}","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"1. Down the latest version of `Duke` from [here](http://link.to/duke).","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"## Features","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"{Give detailed description of each feature}","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"### Budget","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"#### Setting a budget: `budget set`","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"Sets a monthly budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"Format: `budget set /b BUDGET`","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"* `BUDGET` has to be a positive number.","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget set /b 500`","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"A monthly budget of 500.00 has been set.","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"#### Updating budget: `budget update`","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"Updates budget to a new value.","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"Format: `budget update /b BUDGET`","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"* `Budget` has to be a positive number.","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":"* There has to be an existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget update /b 1000`","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":"Budget has been updated:","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":"Old initial budget: 500.00","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":"Old current budget: 500.00","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"New initial budget: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"New current budget: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"#### Resetting budget: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"Resets current budget to initial budget if they are different.","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"Format: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":"* Budget will be reset to initial budget or current balance, whichever is lower.","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":"Budget has been reset to 1000.00.","lastModifiedDate":"2023-10-28"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":"#### Deleting budget: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":"Deletes existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":"Format: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":"Budget has been deleted.","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":"#### Viewing budget: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"View existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":"Format: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":"You have a remaining budget of 1000.00.","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":"### Displaying overview: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":"Displays an overview of user\u0027s financials.","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":"Format: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":"Example of usage: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":"Here is an overview of your financials:","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":"Total balance: 3790.00","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":"Highest income: 5000.00 Category: Salary","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"Highest expense: 500.00 Category: Others","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":"Remaining budget for the month: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":"Reminders:","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":"No reminders added yet.","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":"### Viewing balance: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":"View user\u0027s current balance.","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":"Format: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":"Example of usage: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"ryan1604"},"content":"Balance: 3790.00","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"ryan1604"},"content":"### Exiting the program: `exit`","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"ryan1604"},"content":"Exits the program.","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"ryan1604"},"content":"Format: `exit`","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"ryan1604"},"content":"### Saving the data","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"ryan1604"},"content":"Data is automatically saved upon exiting the program using the `exit` command. Closing the program without exiting ","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"ryan1604"},"content":"will not save the data.","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"ryan1604"},"content":"### Loading the data","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":"Existing data will be automatically loaded when the program starts up.","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":172,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":174,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer? ","lastModifiedDate":"2020-05-24"},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":176,"author":{"gitId":"-"},"content":"**A**: {your answer here}","lastModifiedDate":"2020-05-24"},{"lineNumber":177,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":178,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":179,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":180,"author":{"gitId":"-"},"content":"{Give a \u0027cheat sheet\u0027 of commands here}","lastModifiedDate":"2020-05-24"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":182,"author":{"gitId":"ryan1604"},"content":"| Action | Format |","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"ryan1604"},"content":"|----------------------|---------------------------|","lastModifiedDate":"2023-10-28"},{"lineNumber":184,"author":{"gitId":"ryan1604"},"content":"| **Set budget** | `budget set /b BUDGET` |","lastModifiedDate":"2023-10-28"},{"lineNumber":185,"author":{"gitId":"ryan1604"},"content":"| **Update budget** | `budget update /b BUDGET` |","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"ryan1604"},"content":"| **Reset budget** | `budget reset` |","lastModifiedDate":"2023-10-28"},{"lineNumber":187,"author":{"gitId":"ryan1604"},"content":"| **Delete budget** | `budget delete` |","lastModifiedDate":"2023-10-28"},{"lineNumber":188,"author":{"gitId":"ryan1604"},"content":"| **View budget** | `budget view` |","lastModifiedDate":"2023-10-28"},{"lineNumber":189,"author":{"gitId":"ryan1604"},"content":"| **Display Overview** | `overview` |","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"ryan1604"},"content":"| **View balance** | `balance` |","lastModifiedDate":"2023-10-28"},{"lineNumber":191,"author":{"gitId":"ryan1604"},"content":"| **Exit program** | `exit` |","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"-":37,"ryan1604":154}},{"path":"docs/diagrams/AddCashflowSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"participant AddCashflowCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"participant CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"participant Income","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"participant Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"participant Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"-\u003e AddCashflowCommand: execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"AddCashflowCommand -\u003e CashflowList: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"CashflowList -\u003e Ui: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"alt income","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand -\u003e CashflowList: addIncome(amount, incomeType, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" create Income","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Income: Income(value, type, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" Income -\u003e Income: addIncomeValue()","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e CashflowList: add(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Ui: printAddedCashflow(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"else expense","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand -\u003e CashflowList: addExpense(amount, incomeType, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" create Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Expense: Expense(value, type, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" Expense -\u003e Expense: addExpenseValue()","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e CashflowList: add(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Ui: printAddedCashflow(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":"else invalid command","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":31}},{"path":"docs/diagrams/Budget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"-\u003e BudgetCommand: execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"BudgetCommand -\u003e Ui: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"alt set","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: setBudget(budget)","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printSetBudget()","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"else update","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetBeforeUpdate()","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: updateBudget(budget)","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetAfterUpdate()","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"else delete","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: DeleteBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"else reset","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: ResetBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"else view","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: ViewBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"else invalid command","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":27}},{"path":"docs/diagrams/CashflowClassDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"skinparam classAttributeIconSize 0","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"hide empty members","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"skinparam ClassBackgroundColor STORAGE_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"Class \"{abstract}\\nCashflow\" as Cashflow","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"Class Expense extends Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"Class Income extends Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"Class Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"Class CashflowList {","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" +addIncome(double, IncomeType, int)","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" +addExpense(double, ExpenseType, int)","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"Class AddCashflowCommand #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":"enum \"\u003c\u003cenumeration\u003e\u003e\\nExpenseType\" as ExpenseType","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"enum \"\u003c\u003cenumeration\u003e\u003e\\nIncomeType\" as IncomeType","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":"CashflowList -right-\u003e \"1\" Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":"AddCashflowCommand --\u003e \"1\" CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":"CashflowList --\u003e \"*\" Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"CashflowList ..\u003e Income","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":"CashflowList ..\u003e Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":28}},{"path":"docs/diagrams/Storage.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"skinparam ClassBackgroundColor STORAGE_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"package Storage as StoragePackage {","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"Class Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nLoadData\" as LoadData","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nSaveData\" as SaveData","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"Class CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nBudget\" as Budget","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nCashflow\" as Cashflow","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"Class \"\u003c\u003cenumeration\u003e\u003e\\nExpenseType\" as ExpenseType","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"Class \"\u003c\u003cenumeration\u003e\u003e\\nIncomeType\" as IncomeType","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"Class Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"Class FinancialPlanner #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"FinancialPlanner --\u003e Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"Storage .right.-\u003e LoadData: uses \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"Storage .left.\u003e SaveData: uses \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"SaveData --\u003e CashflowList","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"SaveData ..\u003e Budget","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"SaveData ..\u003e Cashflow","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"LoadData --\u003e CashflowList","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e Budget","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e ExpenseType","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e IncomeType","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e Cashflow","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"LoadData -right-\u003e Ui: prints message \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":35}},{"path":"docs/diagrams/deleteBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd DeleteBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt hasBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: deleteBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printDeleteBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"delete\")","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":16}},{"path":"docs/diagrams/resetBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd ResetBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt spentBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" opt initialBudgetExceedBalance","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: setInitialBudget(balance);","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetExceedBalance()","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" end","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: resetBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printResetBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"else !hasBudget","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"delete\")","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"reset\")","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":22}},{"path":"docs/diagrams/style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"/\u0027","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":" \u0027Commonly used styles and colors across diagrams.","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":" \u0027Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":" \u0027comprehensive list of skinparams.","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":" \u0027/","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"\u0027T1 through T4 are shades of the original color from lightest to darkest","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"skinparam Package {","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" BackgroundColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" FontSize 16","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":"skinparam Class {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" FontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" FontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" BorderColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" StereotypeFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"skinparam Actor {","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" BorderColor USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" Color USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"skinparam Sequence {","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" MessageAlign center","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" BoxFontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" BoxPadding 0","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" BoxFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"skinparam Participant {","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" FontColor #FFFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" Padding 20","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"skinparam ArrowFontStyle bold","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":"skinparam MinClassWidth 50","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":"skinparam ParticipantPadding 10","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":"skinparam Shadowing false","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"skinparam DefaultTextAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"skinparam packageStyle Rectangle","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"hide members","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"hide circle","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":79}},{"path":"docs/diagrams/viewBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd ViewBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt hasBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"view\")","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":15}},{"path":"docs/diagrams/vis/categorizerSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"mainframe sd sort cashflow entries","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"autoactivate on","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCategorizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": Categorizer.sortType(cashflowList, type)","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"alt type \u003d\u003d \"expense\"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nCategorizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": sortExpenses(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":" return","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"else type \u003d\u003d \"income\"","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nCategorizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": sortIncome(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" return","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"return sortedCashflow: Map\u003cString,Double\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":24}},{"path":"docs/diagrams/vis/visualisationClass.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"abstract class Command {","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"execute() {abstract}","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"class VisCommand {","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"String type","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"String chart","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"class RawCommand {","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"List\u003cString\u003e args","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"Map\u003cString, String\u003e extraArgs","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"class Categorizer {","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"sortType()","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"sortExpenses()","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"sortIncome()","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":"class Visualizer {","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"displayChart()","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":"displayPieChart()","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":"displayBarChart()","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":"Command \u003c|-- VisCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"RawCommand \u003c.. VisCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":"Categorizer \u003c.. Visualizer","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":"Visualizer \u003c.. VisCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"wwweert123":36}},{"path":"docs/diagrams/vis/visualisationSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCashFlowList\"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCategorizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nUi\": Ui.getInstance()","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nCashFlowList\": CashFlowList.getInstance()","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nUi\": ui.printDisplayChart(type)","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"ref over \"\u003c\u003cclass\u003e\u003e\\nCategorizer\", \":VisCommand\" : sort cashflow entries","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"ref over \"\u003c\u003cclass\u003e\u003e\\nVisualizer\", \":VisCommand\": displaying chart","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":21}},{"path":"docs/diagrams/vis/visualizerSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"mainframe sd displaying chart","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": Visualizer.displayChart(chart, sortedCashFlow, type)","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"activate \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"alt chartType \u003d\u003d \"pie\"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nVisualizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": displayPieChart(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"else chartType \u003d\u003d \"bar\"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nVisualizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": displayBarChart(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":20}},{"path":"docs/team/NeoMinWei.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"# Neo Min Wei - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Overview","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"### Summary of Contributions","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"NeoMinWei":1,"-":5}},{"path":"docs/team/frederick.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"I am Frederick ","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"Hello ","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"I am from this team!","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"wwweert123":5}},{"path":"src/main/java/seedu/financialplanner/FinancialPlanner.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.Command;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ExitCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.storage.Storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-07"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-07"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlanner {","lastModifiedDate":"2023-10-07"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" private static final String FILE_PATH \u003d \"data/data.txt\";","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" private final Storage storage \u003d Storage.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private final WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" ","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" private FinancialPlanner() {","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" FinancialPlannerLogger.initialise();","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" new FinancialPlanner().run();","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" public void run() {","lastModifiedDate":"2023-10-07"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" storage.load(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" ui.welcomeMessage();","lastModifiedDate":"2023-10-07"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" String input;","lastModifiedDate":"2023-10-07"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" Command command \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" while (!(command instanceof ExitCommand)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" input \u003d ui.input();","lastModifiedDate":"2023-10-07"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" command.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" save();","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" ui.exitMessage();","lastModifiedDate":"2023-10-07"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public void save() {","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" storage.save(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":40,"YFshadaow":16}},{"path":"src/main/java/seedu/financialplanner/FinancialPlannerLogger.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlannerLogger {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" public static void initialise() {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" FileHandler fh \u003d new FileHandler(\"data/logger.log\");","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" logger.addHandler(fh);","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" fh.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Logger initialised\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"ryan1604":23}},{"path":"src/main/java/seedu/financialplanner/cashflow/Budget.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public abstract class Budget {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":" private static final int MONTH \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":" private static double initialBudget \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":" private static double currentBudget \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" public static void setBudget(double amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" assert initialBudget \u003d\u003d currentBudget : \"Initial and current budget should be the same\";","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" assert initialBudget !\u003d 0 \u0026\u0026 currentBudget !\u003d 0 : \"Initial and current budget should not be 0\";","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" public static double getInitialBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" return initialBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" public static void updateBudget(double budget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" double diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" if (budget \u003e initialBudget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" diff \u003d budget - initialBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" currentBudget +\u003d diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" } else if (budget \u003c initialBudget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" diff \u003d initialBudget - budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" currentBudget -\u003d diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" assert initialBudget \u003d\u003d budget : \"Initial budget should be equal to updated budget\";","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" public static double getCurrentBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" return currentBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" public static String getCurrentBudgetString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(currentBudget, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" public static String getInitialBudgetString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(initialBudget, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" public static void deduct(double amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" Budget.currentBudget -\u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" public static void load(double initial, double current) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d initial;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d current;","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" public static boolean hasBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" return initialBudget !\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" public static String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" return \"B | \" + initialBudget + \" | \" + currentBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" public static void deleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" public static void resetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d initialBudget;","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" public static void setInitialBudget(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public static void updateCurrentBudget(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" currentBudget +\u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":81}},{"path":"src/main/java/seedu/financialplanner/cashflow/Cashflow.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import java.math.BigDecimal;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import java.math.RoundingMode;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"public abstract class Cashflow {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" protected static double balance \u003d 0;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" protected double amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" protected int recur;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" protected String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" public Cashflow(double amount, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" this.recur \u003d recur;","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" public static void clearBalance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" balance \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" public static void setBalance(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" balance \u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" //@author mhadidg-reused","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" //Reused from https://stackoverflow.com/questions/2808535/round-a-double-to-2-decimal-places","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" public static double round(double value, int places) {","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" if (places \u003c 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException();","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" BigDecimal bd \u003d BigDecimal.valueOf(value);","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" bd \u003d bd.setScale(places, RoundingMode.HALF_UP);","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":" return bd.doubleValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" //@author mhadidg","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" //@author Nick Bolton-reused","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" //Reused from","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" //https://stackoverflow.com/questions/1892765/how-to-capitalize-the-first-character-of-each-word-in-a-string","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" public String capitalize(String line) {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" return Character.toUpperCase(line.charAt(0)) + line.substring(1);","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" //@author Nick Bolton","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" String string \u003d \" Amount: \" + decimalFormat.format(round(amount, 2));","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" if (recur !\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d System.lineSeparator() + \" Recurring every: \" + recur + \" days\";","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" if (description !\u003d null) {","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d System.lineSeparator() + \" Description: \" + description;","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" return string;","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" public String formatBalance() {","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" return decimalFormat.format(round(Cashflow.balance, 2));","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" public double getAmount() {","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" return this.amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public static double getBalance() {","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" return balance;","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" String string \u003d \" | \" + this.recur;","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" if (description !\u003d null) {","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d \" | \" + this.description;","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" return string;","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" public abstract ExpenseType getExpenseType();","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":" public abstract IncomeType getIncomeType();","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":2,"NeoMinWei":78,"ryan1604":16}},{"path":"src/main/java/seedu/financialplanner/cashflow/CashflowList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"public class CashflowList {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private static CashflowList cashflowList \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public final ArrayList\u003cCashflow\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" protected Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList() {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" public static CashflowList getInstance() {","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowList \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" cashflowList \u003d new CashflowList();","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" return cashflowList;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" public void addIncome(double value, IncomeType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Adding income\");","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" Income toAdd \u003d new Income(value, type, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" list.add(toAdd);","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" ui.printAddedCashflow(toAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize + 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" public void addExpense(double value, ExpenseType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Adding expense\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":" Expense toAdd \u003d new Expense(value, type, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" list.add(toAdd);","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" ui.printAddedCashflow(toAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize + 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" public double deleteCashflowWithoutCategory(int index) {","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" int listIndex \u003d index - 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" Cashflow toRemove \u003d list.get(listIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" list.remove(listIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" toRemove.deleteCashflowvalue();","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" ui.printDeletedCashflow(toRemove);","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize - 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" return toRemove.getAmount();","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" //helper method to find the index of a given cashflow in the overall list","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" //given its index in its respective list. e.g. \"income 3\" is the third income","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" //in the overall list","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" private int cashflowIndexFinder(CashflowCategory category, int cashflowIndex) {","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" switch (category) {","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" return findCashflowIndexFromIncomeIndex(cashflowIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" return findCashflowIndexFromExpenseIndex(cashflowIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" return -1;","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" private int findCashflowIndexFromIncomeIndex(int cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"NeoMinWei"},"content":" int cashflowCounter \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" int overallCashflowIndex \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" if (entry instanceof Income) {","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" cashflowCounter +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowCounter \u003d\u003d cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" overallCashflowIndex +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" return overallCashflowIndex;","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":" private int findCashflowIndexFromExpenseIndex(int cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" int cashflowCounter \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" int overallCashflowIndex \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" if (entry instanceof Expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" cashflowCounter +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowCounter \u003d\u003d cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"NeoMinWei"},"content":" overallCashflowIndex +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"NeoMinWei"},"content":" return overallCashflowIndex;","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"NeoMinWei"},"content":" public double deleteCashflowWithCategory(CashflowCategory category, int index) {","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"NeoMinWei"},"content":" int listIndex \u003d cashflowIndexFinder(category, index);","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" Cashflow toRemove \u003d list.get(listIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" list.remove(listIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" toRemove.deleteCashflowvalue();","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"NeoMinWei"},"content":" ui.printDeletedCashflow(toRemove);","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize - 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" return toRemove.getAmount();","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" public void load(Cashflow entry) {","lastModifiedDate":"2023-10-10"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" list.add(entry);","lastModifiedDate":"2023-10-10"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" //temp method","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" public String getList() {","lastModifiedDate":"2023-10-12"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" StringBuilder output \u003d new StringBuilder();","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-12"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" output.append(entry).append(\"\\n\");","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" return output.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":119,"YFshadaow":3,"ryan1604":16}},{"path":"src/main/java/seedu/financialplanner/cashflow/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"public class Expense extends Cashflow {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":" protected ExpenseType type;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":" public Expense(double amount, ExpenseType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":" super(amount, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" addExpenseValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" public ExpenseType getExpenseType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" return type;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" public IncomeType getIncomeType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" return null;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" private void addExpenseValue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" balance -\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" balance +\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" return \"Expense\" + System.lineSeparator() +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" \" Type: \" + capitalize(type.toString().toLowerCase()) + System.lineSeparator() + super.toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" return \"E | \" + this.amount + \" | \" + this.type + super.formatString();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":39,"ryan1604":5,"hshiah":1}},{"path":"src/main/java/seedu/financialplanner/cashflow/Income.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"public class Income extends Cashflow{","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":" protected IncomeType type;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":" public Income(double amount, IncomeType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":" super(amount, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" addIncomeValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" public IncomeType getIncomeType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" return type;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" public ExpenseType getExpenseType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" return null;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" private void addIncomeValue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" balance +\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" balance -\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" return \"Income\" + System.lineSeparator() +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" \" Type: \" + capitalize(type.toString().toLowerCase()) + System.lineSeparator() + super.toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" return \"I | \" + this.amount + \" | \" + this.type + super.formatString();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":39,"ryan1604":5,"hshiah":1}},{"path":"src/main/java/seedu/financialplanner/commands/AddCashflowCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"public class AddCashflowCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" protected static Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" protected double amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowCategory category;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" protected ExpenseType expenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" protected IncomeType incomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" protected int recur \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" protected String description \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" public AddCashflowCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" String categoryString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" category \u003d CashflowCategory.valueOf(categoryString.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"a\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Missing arguments for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must have an amount\");","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing amount as double\");","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" amount \u003d Double.parseDouble(rawCommand.extraArgs.get(\"a\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Amount must be a number\");","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" if (amount \u003c 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Amount cannot be negative\");","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"a\");","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"t\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Missing arguments for type\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must have a type\");","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" String stringType \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" if (category.equals(CashflowCategory.EXPENSE)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing ExpenseType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" expenseType \u003d ExpenseType.valueOf(stringType.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for ExpenseType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be one of the following: \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" \"dining, entertainment, shopping, travel, insurance, necessities, others\");","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" } else if (category.equals(CashflowCategory.INCOME)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing IncomeType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" incomeType \u003d IncomeType.valueOf(stringType.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for IncomeType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be one of the following: \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" \"salary, investments, allowance, others\");","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"YFshadaow"},"content":" if (rawCommand.extraArgs.containsKey(\"r\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing recur as integer\");","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"YFshadaow"},"content":" recur \u003d Integer.parseInt(rawCommand.extraArgs.get(\"r\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for recur\");","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Recurrence must be an integer\");","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"r\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" if (recur \u003c 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for recur\");","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Recurring value cannot be negative\");","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":" if (rawCommand.extraArgs.containsKey(\"d\")) {","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Getting description of cashflow\");","lastModifiedDate":"2023-10-28"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" String line \u003d rawCommand.extraArgs.get(\"d\");","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" if (line.isBlank()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Empty description\");","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Description cannot be left empty\");","lastModifiedDate":"2023-10-28"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" description \u003d line.trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" rawCommand.extraArgs.remove(\"d\");","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":114,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" assert recur \u003e\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" assert amount \u003e\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" if (category.equals(CashflowCategory.EXPENSE)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"NeoMinWei"},"content":" assert expenseType.equals(ExpenseType.DINING) || expenseType.equals(ExpenseType.ENTERTAINMENT)","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.SHOPPING) || expenseType.equals(ExpenseType.TRAVEL)","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.INSURANCE) || expenseType.equals(ExpenseType.OTHERS)","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.NECESSITIES);","lastModifiedDate":"2023-10-23"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" } else if (category.equals(CashflowCategory.INCOME)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" assert incomeType.equals(IncomeType.SALARY) || incomeType.equals(IncomeType.INVESTMENTS)","lastModifiedDate":"2023-10-22"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":" || incomeType.equals(IncomeType.ALLOWANCE) || incomeType.equals(IncomeType.OTHERS);","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"YFshadaow"},"content":" switch (category) {","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-08"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addIncome(amount, incomeType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":132,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-08"},{"lineNumber":133,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addExpense(amount, expenseType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":" deductFromBudget(cashflowList.list.get(cashflowList.list.size() - 1));","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":139,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" private static void deductFromBudget(Cashflow entry) {","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" double expenseAmount \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":" Budget.deduct(expenseAmount);","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" ui.printBudgetAfterDeduction();","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":103,"ryan1604":9,"YFshadaow":37}},{"path":"src/main/java/seedu/financialplanner/commands/AddReminderCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.reminder.ReminderList;","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.reminder.Reminder;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class AddReminderCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private final String type;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private final String date;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" public AddReminderCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" String typeString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"t\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Reminder must have a type\");","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" type \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"d\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Reminder must have a date\");","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" date \u003d rawCommand.extraArgs.get(\"d\");","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"d\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" String unknownExtraArgument \u003d new java.util.ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" ReminderList.INSTANCE.list.add(new Reminder(type, date));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Reminder added!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":1,"hshiah":30,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/AddStockCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class AddStockCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" private final String stockCode;","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public AddStockCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"s\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Stock code cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing stockcode from input\");","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" stockCode \u003d rawCommand.extraArgs.get(\"s\").toUpperCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"s\");","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" String stockName;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"adding stock to watchlist\");","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" stockName \u003d watchList.addStock(stockCode);","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" assert stockName !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" ui.printAddStock(stockName);","lastModifiedDate":"2023-10-09"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Error adding stock to watchlist\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"wwweert123":31,"NeoMinWei":2,"YFshadaow":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/BalanceCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class BalanceCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" public BalanceCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Balance: \" + getBalanceString());","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" private String getBalanceString() {","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(Cashflow.getBalance(), 2));","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":27}},{"path":"src/main/java/seedu/financialplanner/commands/BudgetCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"public class BudgetCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private double budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" private String command;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public BudgetCommand(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" command \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" if (command.equals(\"delete\") || command.equals(\"reset\") || command.equals(\"view\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" validateCommandFormat(rawCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" validateBudget(rawCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" assert budget \u003e 0 \u0026\u0026 budget \u003c\u003d Cashflow.getBalance() : \"Budget should be greater than 0 and less than \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" \"or equal to total balance\";","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" rawCommand.extraArgs.remove(\"b\");","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" private void validateBudget(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Parsing budget as double\");","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" budget \u003d Double.parseDouble(rawCommand.extraArgs.get(\"b\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget\");","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Budget must be a number.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" if (budget \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget should be greater than 0.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" if (budget \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget should be lower than total balance.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" private void validateCommandFormat(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" if (!command.equals(\"set\") \u0026\u0026 !command.equals(\"update\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid arguments for budget command\");","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget command must be one of the following: set, update, \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" \"delete, reset, view.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" if (command.equals(\"set\") \u0026\u0026 Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid command: Trying to set existing budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"There is an existing budget, did you mean update?\");","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" } else if (command.equals(\"update\") \u0026\u0026 !Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid command: Trying to update non-existent budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"There is no budget set yet, did you mean set?\");","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.containsKey(\"b\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Missing argument /b in command\");","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Missing /b argument.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" assert command.equals(\"set\") || command.equals(\"update\") || command.equals(\"delete\") ||","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" command.equals(\"reset\") || command.equals(\"view\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" switch (command) {","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" case \"set\":","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" setBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" case \"update\":","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" updateBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" case \"delete\":","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" case \"reset\":","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" case \"view\":","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" viewBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Unknown command.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" private void viewBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":" ui.printBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"view\");","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" private void resetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" if (Budget.getInitialBudget() !\u003d Budget.getCurrentBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" if (Budget.getInitialBudget() \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" Budget.setInitialBudget(Cashflow.getBalance());","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetExceedBalance();","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":" Budget.resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":" ui.printResetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" } else if (!Budget.hasBudget()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"delete\");","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"reset\");","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" private void deleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" ui.printDeleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"delete\");","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" private void updateBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Updating budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetBeforeUpdate();","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(budget);","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetAfterUpdate();","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":" private void setBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Setting budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(budget);","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" ui.printSetBudget();","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":2,"ryan1604":145}},{"path":"src/main/java/seedu/financialplanner/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":" public abstract void execute() throws Exception;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":4,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/DeleteCashflowCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class DeleteCashflowCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" protected CashflowCategory category \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" protected int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" public DeleteCashflowCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" String stringIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" String stringCategory \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" if (rawCommand.args.size() \u003d\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" stringIndex \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" } else if (rawCommand.args.size() \u003d\u003d 2) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" stringCategory \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" handleInvalidCategory(stringCategory);","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" stringIndex \u003d rawCommand.args.get(1);","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Incorrect arguments.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing index as integer\");","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" index \u003d Integer.parseInt(stringIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid argument for index\");","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be an integer\");","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" if (index \u003d\u003d 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for index\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" private void handleInvalidCategory(String stringCategory) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" category \u003d CashflowCategory.valueOf(stringCategory.toUpperCase());","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" if (category \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"YFshadaow"},"content":" handleDeleteCashflowWithoutCategory();","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"YFshadaow"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" assert index !\u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" switch (category) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" handleDeleteCashflowWithCategory();","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" private void handleDeleteCashflowWithoutCategory() {","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Deleting cashflow without category\");","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" double amount \u003d cashflowList.deleteCashflowWithoutCategory(index);","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(amount);","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Index out of list\");","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" private void handleDeleteCashflowWithCategory() {","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Deleting cashflow with category\");","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" double amount \u003d cashflowList.deleteCashflowWithCategory(category, index);","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(amount);","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Index out of list\");","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":83,"ryan1604":7,"YFshadaow":12}},{"path":"src/main/java/seedu/financialplanner/commands/DeleteStockCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class DeleteStockCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" private final String stockCode;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" public DeleteStockCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"s\")) {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Stock code cannot be empty\");","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing stockcode from input\");","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" stockCode \u003d rawCommand.extraArgs.get(\"s\").toUpperCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"s\");","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" String stockName;","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"deleting stock from watchlist\");","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" stockName \u003d watchList.deleteStock(stockCode);","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" assert stockName !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" ui.printDeleteStock(stockName);","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Error deleting stock from watchlist\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"wwweert123":46,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":" public ExitCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":15,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" private final String description;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" public FindCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" this.description \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" ArrayList\u003cString\u003e foundedFinancialList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" ArrayList\u003cString\u003e foundedWatchList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" for (int i \u003d 0; i \u003c cashflowList.list.size(); i++) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" if (cashflowList.list.get(i).toString().contains(description)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" String output \u003d cashflowList.list.get(i).toString() + \" | Index: \" + (i + 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" foundedFinancialList.add(output);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"hshiah"},"content":" if (!foundedFinancialList.isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"Here are the matching financial records in your financial list:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"hshiah"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"There is no matching financial record in your financial list.\");","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"hshiah"},"content":" for (String foundedFinancialRecord : foundedFinancialList) {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"hshiah"},"content":" ui.showMessage(foundedFinancialRecord);","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"hshiah"},"content":" for (int i \u003d 0; i \u003c watchList.size(); i++) {","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"hshiah"},"content":" if (watchList.get(i).toString().contains(description)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":" foundedWatchList.add(watchList.get(i).toString() + \" | Index: \" + (i + 1));","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"hshiah"},"content":" if (!foundedWatchList.isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"Here are the matching stock records in your stock list:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"hshiah"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"There is no matching stock record in your stock list.\");","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"hshiah"},"content":" for (String foundedStockRecord : foundedWatchList) {","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"hshiah"},"content":" ui.showMessage(foundedStockRecord);","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":3,"hshiah":43,"ryan1604":2,"YFshadaow":7}},{"path":"src/main/java/seedu/financialplanner/commands/InvalidCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class InvalidCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":" public InvalidCommand() {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Unknown command. Please try again.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":1,"YFshadaow":11,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" protected CashflowCategory category \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public ListCommand(RawCommand rawCommand) throws IllegalArgumentException{","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" String stringCategory \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" if (rawCommand.args.size() \u003d\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" stringCategory \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" } else if (rawCommand.args.size() \u003e 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Incorrect arguments.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" if (stringCategory !\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" category \u003d CashflowCategory.valueOf(stringCategory.toUpperCase());","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"YFshadaow"},"content":" private boolean shouldPrintCashFlow(Cashflow cashflow) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" if (category \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" return true;","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" if (cashflow instanceof Income) {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"YFshadaow"},"content":" return category.equals(CashflowCategory.INCOME);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" if (cashflow instanceof Expense) {","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" return category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" return false;","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" List\u003cCashflow\u003e cashflowList \u003d CashflowList.getInstance().list;","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"YFshadaow"},"content":" List\u003cCashflow\u003e cashflowToBePrinted \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" for (Cashflow flow : cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"YFshadaow"},"content":" if (!shouldPrintCashFlow(flow)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"YFshadaow"},"content":" continue;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"YFshadaow"},"content":" cashflowToBePrinted.add(flow);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"YFshadaow"},"content":" if (cashflowToBePrinted.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"No matching cash flow\");","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"YFshadaow"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(String.format(\"You have %d matching cash flow:\", cashflowToBePrinted.size()));","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"YFshadaow"},"content":" for (int i \u003d 0; i \u003c cashflowToBePrinted.size(); i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" ui.showMessage((i + 1) + \": \" + cashflowToBePrinted.get(i));","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":8,"YFshadaow":59,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/OverviewCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.reminder.Reminder;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.reminder.ReminderList;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public class OverviewCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public OverviewCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" String balance \u003d getBalance();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" String highestIncome \u003d getHighestIncome();","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" String highestExpense \u003d getHighestExpense();","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" String budget \u003d getBudgetDesc();","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" String reminders \u003d getReminders();","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" Ui.getInstance().printOverview(balance, highestIncome, highestExpense, budget, reminders);","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" //todo: goal disparity","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" private String getBudgetDesc() {","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" return Budget.getCurrentBudgetString();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" private String getHighestIncome() {","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" double maxIncome \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" String incomeType \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" if (entry instanceof Income \u0026\u0026 entry.getAmount() \u003e maxIncome) {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" maxIncome \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" incomeType \u003d entry.capitalize(entry.getIncomeType().","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" toString().toLowerCase()); // Capitalise the first letter","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" if (incomeType.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" return \"No income added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(maxIncome) + \" Category: \" + incomeType;","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" private String getHighestExpense() {","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" double maxExpense \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" String expenseType \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" if (entry instanceof Expense \u0026\u0026 entry.getAmount() \u003e maxExpense) {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" maxExpense \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" expenseType \u003d entry.capitalize(entry.getExpenseType().","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" toString().toLowerCase()); // Capitalise the first letter","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" if (expenseType.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" return \"No expense added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(maxExpense) + \" Category: \" + expenseType;","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" private String formatDoubleToString(double amount) {","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(amount, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" private String getReminders() {","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" ReminderList reminderList \u003d ReminderList.INSTANCE;","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" if (reminderList.list.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" return \"No reminders added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" StringBuilder reminders \u003d new StringBuilder();","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" int count \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" for (Reminder reminder : reminderList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" reminders.append(count).append(\". \").append(reminder.toString()).append(\"\\n\");","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" count++;","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" return reminders.toString();","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" private String getBalance() {","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(Cashflow.getBalance());","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":5,"ryan1604":97}},{"path":"src/main/java/seedu/financialplanner/commands/RawCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"public class RawCommand {","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" public final List\u003cString\u003e args \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" public final Map\u003cString, String\u003e extraArgs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":" protected String commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" public RawCommand(String name, List\u003cString\u003e args, Map\u003cString, String\u003e extraArgs) {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" this.commandName \u003d name;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" this.args.addAll(args);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" this.extraArgs.putAll(extraArgs);","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" @SuppressWarnings(\"unused\")","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" public String getCommandName() {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" return commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" @SuppressWarnings(\"unused\")","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" public void setCommandName(String commandName) {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" this.commandName \u003d commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":28}},{"path":"src/main/java/seedu/financialplanner/commands/SetGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.goal.Goal;","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.goal.GoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"public class SetGoalCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private final String goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" private int amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public SetGoalCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" String labelString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"g\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Goal must have an amount\");","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" try{","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" amount \u003d Integer.parseInt(rawCommand.extraArgs.get(\"g\"));","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":" } catch (IllegalArgumentException e){","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Amount must be a number\");","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"g\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"l\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Please specify the content of the goal\");","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" goal \u003d rawCommand.extraArgs.get(\"l\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"l\");","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" String unknownExtraArgument \u003d new java.util.ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"hshiah"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"hshiah"},"content":" GoalList.INSTANCE.list.add(new Goal(goal, amount));","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Set Goal Successfully!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":1,"hshiah":34,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/VisCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.visualisations.Categorizer;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.visualisations.Visualizer;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"public class VisCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" private String type;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private String chart;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" public VisCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"t\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Entry type must be defined\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"c\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Chart type must be defined\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing entry type and chart type\");","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" this.type \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" this.chart \u003d rawCommand.extraArgs.get(\"c\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"c\");","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" public void execute() throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" assert !chart.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" assert !type.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.printDisplayChart(type, chart);","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" Visualizer.displayChart(chart, Categorizer.sortType(CashflowList.getInstance(), type), type);","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":45,"NeoMinWei":1,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/WatchListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"public class WatchListCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" public WatchListCommand(RawCommand rawCommand) throws IllegalArgumentException{","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" assert unknownExtraArgument !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" ui.printWatchListHeader();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" watchList.fetchFMPStockPrices();","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Printing watchlist\");","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" ui.printStocksInfo(watchList);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"wwweert123":24,"NeoMinWei":3,"YFshadaow":8,"ryan1604":3}},{"path":"src/main/java/seedu/financialplanner/enumerations/CashflowCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum CashflowCategory {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":" INCOME, EXPENSE","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":4,"YFshadaow":1}},{"path":"src/main/java/seedu/financialplanner/enumerations/ExpenseType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum ExpenseType {","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":" DINING, ENTERTAINMENT, SHOPPING, TRAVEL, INSURANCE, NECESSITIES, OTHERS","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"src/main/java/seedu/financialplanner/enumerations/IncomeType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum IncomeType {","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":" SALARY, INVESTMENTS, ALLOWANCE, OTHERS","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"src/main/java/seedu/financialplanner/exceptions/FinancialPlannerException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.exceptions;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlannerException extends Exception {","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":" public FinancialPlannerException(String message) {","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":" super(message);","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"ryan1604":7}},{"path":"src/main/java/seedu/financialplanner/goal/Goal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class Goal {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" private String label;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" private int amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private boolean isDone \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" public Goal(String label, int amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" this.label \u003d label;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" public String toString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" return \"Goal: \" + this.label + \" | \" + this.amount + \" | \" + status;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" public void markAsDone() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" //TODO edit the expense to mark the goal as done","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" this.isDone \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" //TODO delete the Reminder","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" public String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" return this.label + \" | \" + this.amount + \" | \" + this.isDone;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":24,"ryan1604":4}},{"path":"src/main/java/seedu/financialplanner/goal/GoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class GoalList {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" public static final GoalList INSTANCE \u003d new GoalList();","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" public ArrayList\u003cGoal\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private GoalList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public void load(Goal goal) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" list.add(goal);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" //TODO deleteGoal","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/investments/Stock.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONArray;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.time.Duration;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"public class Stock implements Serializable {","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private String symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" private String exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private String stockName;","lastModifiedDate":"2023-10-08"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" private String price;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" private String dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" private String dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" public Stock(String symbol) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" this.symbol \u003d symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" this.stockName \u003d getStockNameFromAPI(symbol);","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" public String getStockName() {","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" return stockName;","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" public String getStockNameFromAPI(String symbol) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" final String API_ENDPOINT \u003d \"https://www.alphavantage.co/query?function\u003dSYMBOL_SEARCH\u0026keywords\u003d\";","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" final String API_KEY \u003d \"LNKL0548PHY2F0QU\";","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" String requestURI \u003d String.format(\"%s%s\u0026apikey\u003d%s\", API_ENDPOINT,symbol,API_KEY);","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" HttpRequest request \u003d HttpRequest.newBuilder(URI.create(requestURI))","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" .header(\"accept\", \"application/json\")","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" .GET()","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" .timeout(Duration.ofSeconds(10))","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" .build();","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Requesting API for stock info\");","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-08"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" Object obj \u003d new JSONParser().parse(response.body());","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" JSONObject jsonObject \u003d (JSONObject) obj;","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" JSONArray ja \u003d (JSONArray) jsonObject.get(\"bestMatches\");","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" if (ja \u003d\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"API limit Reached\");","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":" if (ja.isEmpty()) {","lastModifiedDate":"2023-10-09"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock not found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" JSONObject stock \u003d (JSONObject) ja.get(0);","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" String symbolFound \u003d (String) stock.get(\"1. symbol\");","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" // TODO: Might need to use AMEX when NYSE is used","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" // TODO: Need to check if it is added already","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" // TODO: add a cap to adding","lastModifiedDate":"2023-10-09"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" // TODO: Separate based on market","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" // TODO: add other info","lastModifiedDate":"2023-10-09"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" // TODO: testing","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" if (!symbolFound.equals(symbol)) {","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock not found\");","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" assert stock.get(\"2. name\") !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":" return (String) stock.get(\"2. name\");","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" } catch (InterruptedException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" public String getSymbol() {","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" return symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" public void setSymbol(String symbol) {","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" this.symbol \u003d symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" public String toString() {","lastModifiedDate":"2023-10-08"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" return symbol + \",\";","lastModifiedDate":"2023-10-08"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":" public String getPrice() {","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":" return price;","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":" public void setPrice(String price) {","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":" this.price \u003d price;","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"wwweert123"},"content":" public String getExchange() {","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":" return exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":" public void setExchange(String exchange) {","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"wwweert123"},"content":" this.exchange \u003d exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":" public String getDayHigh() {","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"wwweert123"},"content":" return dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":" public void setDayHigh(String dayHigh) {","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"wwweert123"},"content":" this.dayHigh \u003d dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"wwweert123"},"content":" public String getDayLow() {","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"wwweert123"},"content":" return dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"wwweert123"},"content":" public void setDayLow(String dayLow) {","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"wwweert123"},"content":" this.dayLow \u003d dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":127,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/investments/WatchList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONArray;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.storage.LoadData;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.time.Duration;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"public class WatchList {","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private static WatchList watchlist \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private ArrayList\u003cStock\u003e stocks \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" private final String API_ENDPOINT \u003d \"https://financialmodelingprep.com/api/v3/quote/\";","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" private final String API_KEY \u003d \"iFumtYryBCbHpS3sDqLdVKi2SdP63vSV\";","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" private WatchList() {","lastModifiedDate":"2023-10-13"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" stocks \u003d LoadData.loadWatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" if (!stocks.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Initializing New watchlist.. adding AAPL and GOOGL for your reference\");","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" Stock apple \u003d new Stock(\"AAPL\");","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" assert apple.getSymbol() !\u003d null \u0026\u0026 apple.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" stocks.add(apple);","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" Stock google \u003d new Stock(\"GOOGL\");","lastModifiedDate":"2023-10-13"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" assert google.getSymbol() !\u003d null \u0026\u0026 google.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" stocks.add(google);","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-09"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" public static WatchList getInstance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":" if (watchlist \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" watchlist \u003d new WatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" return watchlist;","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" public void fetchFMPStockPrices() throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" if (stocks.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Empty Watchlist. Nothing to display...\");","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" StringBuilder queryStocks \u003d new StringBuilder();","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" assert !stocks.isEmpty();","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" for (Stock stock : stocks) {","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" queryStocks.append(stock.toString());","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" String requestURI \u003d String.format(\"%s%s?apikey\u003d%s\", API_ENDPOINT, queryStocks, API_KEY);","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" HttpRequest request \u003d HttpRequest.newBuilder(URI.create(requestURI))","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" .header(\"accept\", \"application/json\")","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" .GET()","lastModifiedDate":"2023-10-08"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" .timeout(Duration.ofSeconds(10))","lastModifiedDate":"2023-10-08"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" .build();","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" Object obj;","lastModifiedDate":"2023-10-09"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Requesting API endpoint FMP\");","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" // System.out.println(response.body());","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" obj \u003d new JSONParser().parse(response.body());","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Cant request API endpoint\");","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" } catch (InterruptedException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Interrupted\");","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Could not parse to JSON\");","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" JSONArray ja \u003d (JSONArray) obj;","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" if (ja.size() !\u003d stocks.size()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Error getting API info!\");","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":" int i \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" for (Object jo : ja) {","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" JSONObject stock \u003d (JSONObject) jo;","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":" Stock stockLocal \u003d stocks.get(i);","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":" // Check if the JSONObject from response matches the stock in the stocks list using symbol","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":" if (!stockLocal.getSymbol().equals(stock.get(\"symbol\"))) {","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":" i +\u003d 1;","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Stocks matching error!\");","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":" continue;","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"wwweert123"},"content":" extractStockInfoFromJSON(stock, stockLocal);","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":" i +\u003d 1;","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":110,"author":{"gitId":"wwweert123"},"content":" public String addStock(String stockCode) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":" if (stocks.size() \u003e\u003d 5) {","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Watchlist is full (max 5). Delete a stock to add a new one\");","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"wwweert123"},"content":" for (Stock stock: stocks) {","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":" if (stockCode.equals(stock.getSymbol().toUpperCase())) {","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock is already present in Watchlist. Use watchlist to view it!\");","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"wwweert123"},"content":" Stock newStock \u003d null;","lastModifiedDate":"2023-10-09"},{"lineNumber":121,"author":{"gitId":"wwweert123"},"content":" newStock \u003d new Stock(stockCode);","lastModifiedDate":"2023-10-13"},{"lineNumber":122,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"wwweert123"},"content":" assert newStock.getSymbol() !\u003d null \u0026\u0026 newStock.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"wwweert123"},"content":" stocks.add(newStock);","lastModifiedDate":"2023-10-09"},{"lineNumber":125,"author":{"gitId":"wwweert123"},"content":" return newStock.getStockName();","lastModifiedDate":"2023-10-09"},{"lineNumber":126,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":127,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":128,"author":{"gitId":"wwweert123"},"content":" public String deleteStock(String stockCode) throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":129,"author":{"gitId":"wwweert123"},"content":" if (stocks.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":130,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"No stock in watchlist!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":131,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":132,"author":{"gitId":"wwweert123"},"content":" Stock toBeRemoved \u003d stocks","lastModifiedDate":"2023-10-22"},{"lineNumber":133,"author":{"gitId":"wwweert123"},"content":" .stream()","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"wwweert123"},"content":" .filter(stock -\u003e stockCode.equals(stock.getSymbol()))","lastModifiedDate":"2023-10-22"},{"lineNumber":135,"author":{"gitId":"wwweert123"},"content":" .findFirst()","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"wwweert123"},"content":" .orElseThrow(() -\u003e new FinancialPlannerException(\"Does not Exist in Watchlist\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"wwweert123"},"content":" stocks.remove(toBeRemoved);","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"wwweert123"},"content":" return toBeRemoved.getStockName();","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"wwweert123"},"content":" public void extractStockInfoFromJSON(JSONObject stock, Stock stockLocal) {","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"wwweert123"},"content":" String price \u003d stock.get(\"price\").toString();","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"wwweert123"},"content":" assert price !\u003d null;","lastModifiedDate":"2023-10-27"},{"lineNumber":144,"author":{"gitId":"wwweert123"},"content":" stockLocal.setPrice(price);","lastModifiedDate":"2023-10-27"},{"lineNumber":145,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":146,"author":{"gitId":"wwweert123"},"content":" String exchange \u003d stock.get(\"exchange\").toString();","lastModifiedDate":"2023-10-27"},{"lineNumber":147,"author":{"gitId":"wwweert123"},"content":" assert exchange !\u003d null;","lastModifiedDate":"2023-10-27"},{"lineNumber":148,"author":{"gitId":"wwweert123"},"content":" stockLocal.setExchange(exchange);","lastModifiedDate":"2023-10-27"},{"lineNumber":149,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":150,"author":{"gitId":"wwweert123"},"content":" String dayHigh \u003d stock.get(\"dayHigh\").toString();","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"wwweert123"},"content":" assert dayHigh !\u003d null;","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"wwweert123"},"content":" stockLocal.setDayHigh(dayHigh);","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":154,"author":{"gitId":"wwweert123"},"content":" String dayLow \u003d stock.get(\"dayLow\").toString();","lastModifiedDate":"2023-10-27"},{"lineNumber":155,"author":{"gitId":"wwweert123"},"content":" assert dayLow !\u003d null;","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"wwweert123"},"content":" stockLocal.setDayLow(dayLow);","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":159,"author":{"gitId":"hshiah"},"content":" public int size() {","lastModifiedDate":"2023-10-12"},{"lineNumber":160,"author":{"gitId":"hshiah"},"content":" return stocks.size();","lastModifiedDate":"2023-10-12"},{"lineNumber":161,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":162,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":163,"author":{"gitId":"hshiah"},"content":" public Stock get(int index) {","lastModifiedDate":"2023-10-12"},{"lineNumber":164,"author":{"gitId":"hshiah"},"content":" return stocks.get(index);","lastModifiedDate":"2023-10-12"},{"lineNumber":165,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":166,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"wwweert123"},"content":" public ArrayList\u003cStock\u003e getStocks() {","lastModifiedDate":"2023-10-22"},{"lineNumber":168,"author":{"gitId":"wwweert123"},"content":" return stocks;","lastModifiedDate":"2023-10-22"},{"lineNumber":169,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":170,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"wwweert123"},"content":" public void setStocks(ArrayList\u003cStock\u003e stocks) {","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"wwweert123"},"content":" this.stocks \u003d stocks;","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":165,"YFshadaow":1,"hshiah":8}},{"path":"src/main/java/seedu/financialplanner/reminder/Reminder.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.reminder;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class Reminder {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" private String type;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" private String date;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private boolean isDone \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" public Reminder(String type, String date) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" public String toString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" return \"Reminder: \" + this.type + \" | \" + this.date + \" | \" + status;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" public void markAsDone() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" this.isDone \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" /*","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" * Returns a string that can be saved to a file.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" * Format: type | date | isDone","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" * Example: \"Reminder: Birthday | 2020-10-10 | false\"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" public String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" return this.type + \" | \" + this.date + \" | \" + this.isDone;","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":29,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/reminder/ReminderList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.reminder;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"public class ReminderList {","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" public static final ReminderList INSTANCE \u003d new ReminderList();","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" public ArrayList\u003cReminder\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private ReminderList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public void load(Reminder reminder) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" list.add(reminder);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" //TODO deleteReminder","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/storage/LoadData.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.Stock;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.io.StreamCorruptedException;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.io.FileInputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"import java.io.FileReader;","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.io.ObjectInputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"public abstract class LoadData {","lastModifiedDate":"2023-10-10"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private static final String FILE_PATH \u003d \"data/watchlist.txt\";","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" private static final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" public static void load(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" Scanner inputFile \u003d new Scanner(new FileReader(filePath));","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" String line;","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Loading existing file...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" while(inputFile.hasNext()) {","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" line \u003d inputFile.nextLine();","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" String[] split \u003d line.split(\"\\\\|\");","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" String type \u003d split[0].trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" switch (type) {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" case \"I\":","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" case \"E\":","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" final Cashflow entry \u003d getEntry(type, split);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" cashflowList.load(entry);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" case \"B\":","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" loadBudget(split);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error loading file\");","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" inputFile.close();","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"File not found. Creating new file...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException | FinancialPlannerException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" String message \u003d e.getMessage();","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" handleCorruptedFile(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" private static void handleCorruptedFile(String message) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"File appears to be corrupted. Do you want to create a new file? (Y/N)\");","lastModifiedDate":"2023-10-10"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" if (createNewFile()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" Cashflow.clearBalance();","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-10"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Please fix the corrupted file, \" +","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" \"which can be found in data/data.txt.\\nError message: \" + message);","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" private static void loadBudget(String[] split) throws IllegalArgumentException {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" double initial \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" double current \u003d Double.parseDouble(split[2].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" if (initial \u003d\u003d 0 \u0026\u0026 current \u003d\u003d 0) {","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" if (initial \u003c 0 || current \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Negative values for budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" if (initial \u003e Cashflow.getBalance() || current \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Budget exceeds balance\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" if (initial \u003c current) {","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Current budget exceeds initial budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" Budget.load(initial, current);","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" private static boolean createNewFile() {","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" String line \u003d ui.input();","lastModifiedDate":"2023-10-10"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" while (!line.equalsIgnoreCase(\"y\") \u0026\u0026 !line.equalsIgnoreCase(\"n\")) {","lastModifiedDate":"2023-10-10"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Unknown input. Please enter Y or N only.\");","lastModifiedDate":"2023-10-10"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" line \u003d ui.input();","lastModifiedDate":"2023-10-10"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" return line.equalsIgnoreCase(\"y\");","lastModifiedDate":"2023-10-10"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" private static Cashflow getEntry(String type, String[] split)","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" throws FinancialPlannerException, IllegalArgumentException {","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" double value;","lastModifiedDate":"2023-10-10"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":" int recur;","lastModifiedDate":"2023-10-10"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" Cashflow entry;","lastModifiedDate":"2023-10-10"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" switch (type) {","lastModifiedDate":"2023-10-10"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" case \"I\":","lastModifiedDate":"2023-10-10"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" value \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" recur \u003d Integer.parseInt(split[3].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" description \u003d getDescription(split);","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" checkValidInput(value, recur);","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" IncomeType incomeType;","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" incomeType \u003d IncomeType.valueOf(split[2].trim().toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Invalid income type\");","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" entry \u003d new Income(value, incomeType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-10"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" case \"E\":","lastModifiedDate":"2023-10-10"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" value \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":" recur \u003d Integer.parseInt(split[3].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" description \u003d getDescription(split);","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" checkValidInput(value, recur);","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":" ExpenseType expenseType;","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" expenseType \u003d ExpenseType.valueOf(split[2].trim().toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Invalid expense type\");","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":" entry \u003d new Expense(value, expenseType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-10"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-10"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error loading file\");","lastModifiedDate":"2023-10-10"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" return entry;","lastModifiedDate":"2023-10-10"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":139,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":" private static String getDescription(String[] split) {","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" if (split.length \u003e 4) {","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" description \u003d split[4].trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"NeoMinWei"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"NeoMinWei"},"content":" description \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"NeoMinWei"},"content":" return description;","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"wwweert123"},"content":" public static ArrayList\u003cStock\u003e loadWatchList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":151,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":152,"author":{"gitId":"wwweert123"},"content":" ArrayList\u003cStock\u003e stocksData \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":153,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":154,"author":{"gitId":"wwweert123"},"content":" ObjectInputStream watchListStocksInputStream","lastModifiedDate":"2023-10-23"},{"lineNumber":155,"author":{"gitId":"wwweert123"},"content":" \u003d new ObjectInputStream(","lastModifiedDate":"2023-10-23"},{"lineNumber":156,"author":{"gitId":"wwweert123"},"content":" new FileInputStream(FILE_PATH)","lastModifiedDate":"2023-10-23"},{"lineNumber":157,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-23"},{"lineNumber":158,"author":{"gitId":"wwweert123"},"content":" stocksData \u003d (ArrayList\u003cStock\u003e) watchListStocksInputStream.readObject();","lastModifiedDate":"2023-10-23"},{"lineNumber":159,"author":{"gitId":"wwweert123"},"content":" watchListStocksInputStream.close();","lastModifiedDate":"2023-10-23"},{"lineNumber":160,"author":{"gitId":"wwweert123"},"content":" } catch (StreamCorruptedException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":161,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Watchlist file corrupted.. Rebuilding\");","lastModifiedDate":"2023-10-23"},{"lineNumber":162,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Watchlist file not found... Creating\");","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"wwweert123"},"content":" } catch (ClassNotFoundException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"FIle appears to be corrupted...\");","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":167,"author":{"gitId":"wwweert123"},"content":" return stocksData;","lastModifiedDate":"2023-10-23"},{"lineNumber":168,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":" private static void checkValidInput(double value, int recur) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":" if (value \u003c 0 || recur \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Amount and number of days cannot be negative\");","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":27,"NeoMinWei":31,"ryan1604":115,"YFshadaow":2}},{"path":"src/main/java/seedu/financialplanner/storage/SaveData.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.FileOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.io.ObjectOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public abstract class SaveData {","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private static final String FILE_PATH \u003d \"data/watchlist.txt\";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public static void save(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" FileWriter fw \u003d new FileWriter(filePath);","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" fw.write(entry.formatString() + \"\\n\");","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" fw.write(Budget.formatString() + \"\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" fw.close();","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error saving file.\");","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" public static void saveWatchList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" ObjectOutputStream watchListStocksOutput","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" \u003d new ObjectOutputStream(new FileOutputStream(FILE_PATH));","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" watchListStocksOutput.writeObject(wl.getStocks());","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" watchListStocksOutput.close();","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Unable to save watchlist to file\");","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":21,"NeoMinWei":3,"ryan1604":22,"YFshadaow":1}},{"path":"src/main/java/seedu/financialplanner/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import java.nio.file.Paths;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"public class Storage {","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" private static Storage storage \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" private final Path path \u003d Paths.get(\"data\");","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" private Storage() {","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" if (!Files.exists(path)) {","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" System.out.println(\"Directory doesn\u0027t exist. Creating directory...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" Files.createDirectory(path);","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" System.out.println(\"Error creating directory: \" + e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" public static Storage getInstance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" if (storage \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" storage \u003d new Storage();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" return storage;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" public void load(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" LoadData.load(filePath);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" public void save(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" SaveData.save(filePath);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" SaveData.saveWatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":2,"ryan1604":37,"YFshadaow":2}},{"path":"src/main/java/seedu/financialplanner/utils/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.utils;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.Command;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.AddStockCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.OverviewCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.AddCashflowCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.DeleteCashflowCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.FindCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.InvalidCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ListCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.RawCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.WatchListCommand;","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.VisCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.BudgetCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.commands.AddReminderCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.commands.SetGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.BalanceCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.DeleteStockCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":"import java.util.Iterator;","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"public class Parser {","lastModifiedDate":"2023-10-07"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" private static final String EXIT_COMMAND \u003d \"exit\";","lastModifiedDate":"2023-10-07"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" private static final String WATCHLIST_COMMAND \u003d \"watchlist\";","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" private static final String ADD_CASHFLOW_COMMAND \u003d \"add\";","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" private static final String DELETE_CASHFLOW_COMMAND \u003d \"delete\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" private static final String ADD_STOCK_COMMAND \u003d \"addstock\";","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" private static final String DELETE_STOCK_COMMAND \u003d \"deletestock\";","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" private static final String FIND_COMMAND \u003d \"find\";","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" private static final String OVERVIEW_COMMAND \u003d \"overview\";","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" private static final String BUDGET_COMMAND \u003d \"budget\";","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" private static final String VISUALIZATION_COMMAND \u003d \"vis\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"hshiah"},"content":" private static final String ADD_REMINDER_COMMAND \u003d \"addreminder\";","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" private static final String LIST_COMMAND \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"hshiah"},"content":" private static final String SET_GOAL_COMMAND \u003d \"set\";","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" private static final String BALANCE_COMMAND \u003d \"balance\";","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" public static Command parseCommand(String input) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" RawCommand rawCommand \u003d parseRawCommand(input);","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" return parseCommand(rawCommand);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public static Command parseCommand(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"YFshadaow"},"content":" switch (rawCommand.getCommandName()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" case EXIT_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"YFshadaow"},"content":" return new ExitCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" case WATCHLIST_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"YFshadaow"},"content":" return new WatchListCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" case ADD_CASHFLOW_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" return new AddCashflowCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" case DELETE_CASHFLOW_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" return new DeleteCashflowCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" case ADD_STOCK_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"YFshadaow"},"content":" return new AddStockCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" case DELETE_STOCK_COMMAND:","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" return new DeleteStockCommand(rawCommand);","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" case FIND_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"YFshadaow"},"content":" return new FindCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" case BUDGET_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" return new BudgetCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" case VISUALIZATION_COMMAND:","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" return new VisCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" case OVERVIEW_COMMAND:","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" return new OverviewCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"hshiah"},"content":" case ADD_REMINDER_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"hshiah"},"content":" return new AddReminderCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"YFshadaow"},"content":" case LIST_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"YFshadaow"},"content":" return new ListCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"hshiah"},"content":" case SET_GOAL_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"hshiah"},"content":" return new SetGoalCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" case BALANCE_COMMAND:","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" return new BalanceCommand(rawCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-07"},{"lineNumber":81,"author":{"gitId":"YFshadaow"},"content":" return new InvalidCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"YFshadaow"},"content":" public static RawCommand parseRawCommand(String input) throws IllegalArgumentException{","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"YFshadaow"},"content":" Iterator\u003cString\u003e iterator \u003d Arrays.stream(input.split(\" \")).iterator();","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"YFshadaow"},"content":" if (!iterator.hasNext()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Command cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":90,"author":{"gitId":"YFshadaow"},"content":" String commandName \u003d iterator.next();","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"YFshadaow"},"content":" List\u003cString\u003e args \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"YFshadaow"},"content":" Map\u003cString, String\u003e extraArgs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"YFshadaow"},"content":" List\u003cString\u003e extraArgumentContentBuffer \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"YFshadaow"},"content":" String currentExtraArgumentName \u003d null;","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"YFshadaow"},"content":" while (iterator.hasNext()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"YFshadaow"},"content":" String next \u003d iterator.next();","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"YFshadaow"},"content":" if (next.startsWith(\"/\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"YFshadaow"},"content":" // Save previous extra argument when next extra argument is found","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" savePreviousExtraArgument(extraArgs, currentExtraArgumentName, extraArgumentContentBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"YFshadaow"},"content":" if (next.length() \u003d\u003d 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Extra argument name cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"YFshadaow"},"content":" currentExtraArgumentName \u003d next.substring(1);","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName \u003d\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"YFshadaow"},"content":" args.add(next);","lastModifiedDate":"2023-10-15"},{"lineNumber":113,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"YFshadaow"},"content":" extraArgumentContentBuffer.add(next);","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"YFshadaow"},"content":" // Save previous extra argument at the very end","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":" savePreviousExtraArgument(extraArgs, currentExtraArgumentName, extraArgumentContentBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" return new RawCommand(commandName, args, extraArgs);","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" private static void savePreviousExtraArgument(Map\u003cString, String\u003e extraArgs","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":" , String currentExtraArgumentName, List\u003cString\u003e extraArgumentContentBuffer) {","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"YFshadaow"},"content":" if (extraArgs.containsKey(currentExtraArgumentName)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"YFshadaow"},"content":" String.format(\"Duplicate extra argument name: %s\", currentExtraArgumentName));","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":132,"author":{"gitId":"YFshadaow"},"content":" extraArgs.put(currentExtraArgumentName, String.join(\" \", extraArgumentContentBuffer));","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"YFshadaow"},"content":" extraArgumentContentBuffer.clear();","lastModifiedDate":"2023-10-15"},{"lineNumber":134,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"wwweert123":14,"NeoMinWei":24,"ryan1604":29,"YFshadaow":60,"hshiah":9}},{"path":"src/main/java/seedu/financialplanner/utils/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.utils;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.apache.commons.lang3.StringUtils;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.Stock;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"public class Ui {","lastModifiedDate":"2023-10-07"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" private static Ui ui \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private final String RED \u003d \"\\u001B[31m\";","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" private final String GREEN \u003d \"\\u001B[32m\";","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" private final String RESET \u003d \"\\u001B[0m\";","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" private final String YELLOW \u003d \"\\u001B[33m\";","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" private Scanner Scanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" private Ui() {","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" public static Ui getInstance() {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" if (ui \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" return ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" public static void printCorruptedFileError(String message) {","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" public Scanner getScanner() {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":" return Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" public void setScanner(Scanner scanner) {","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" this.Scanner \u003d scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" public void showMessage(String message) {","lastModifiedDate":"2023-10-07"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" assert !message.isEmpty();","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-07"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" public void welcomeMessage() {","lastModifiedDate":"2023-10-07"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Welcome to your Financial Planner. Type something to get started.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" public void exitMessage() {","lastModifiedDate":"2023-10-07"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Exiting Financial Planner. Goodbye.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" public String input() {","lastModifiedDate":"2023-10-07"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" return Scanner.nextLine().trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" public void printWatchListHeader() {","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"Symbol\");","lastModifiedDate":"2023-10-09"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"Market\");","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" System.out.print(YELLOW + \"Price\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" System.out.print(GREEN + \"Daily High\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" System.out.print(RED + \"Daily Low\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"EquityName\");","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" System.out.println();","lastModifiedDate":"2023-10-09"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" public void printStocksInfo(WatchList watchList) {","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" for (Stock stock: watchList.getStocks()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" String symbol \u003d StringUtils.rightPad(stock.getSymbol(), 10);","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" String market \u003d StringUtils.rightPad(stock.getExchange(), 10);","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" String price \u003d YELLOW + StringUtils.rightPad(stock.getPrice(), 10) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" String dayHigh \u003d GREEN + StringUtils.rightPad(stock.getDayHigh(), 15) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" String dayLow \u003d RED + StringUtils.rightPad(stock.getDayLow(), 14) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":" String name \u003d StringUtils.rightPad(stock.getStockName(), 10);","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":" System.out.println(symbol + market + price + dayHigh + dayLow + name);","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":" public void printAddStock(String stockName) {","lastModifiedDate":"2023-10-09"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"You have successfully added:\");","lastModifiedDate":"2023-10-09"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" System.out.println(stockName);","lastModifiedDate":"2023-10-09"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Use Watchlist to view it!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" public void printDeleteStock(String stockName) {","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"You have successfully deleted: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":" System.out.println(stockName);","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Use watchlist command to view updated Watchlist\");","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" public void printAddedCashflow(Cashflow entry) {","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" System.out.print(\"You have added an \");","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(entry);","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"to the Financial Planner.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"Balance: \" + entry.formatBalance());","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"NeoMinWei"},"content":" public void printDeletedCashflow(Cashflow entry) {","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"NeoMinWei"},"content":" System.out.print(\"You have removed an \");","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(entry);","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"from the Financial Planner.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"Balance: \" + entry.formatBalance());","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" public void printBudgetBeforeUpdate() {","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been updated:\\nOld initial budget: \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":" Budget.getInitialBudgetString() + \"\\nOld current budget: \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" public void printBudgetAfterUpdate() {","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" showMessage(\"New initial budget: \" + Budget.getInitialBudgetString() +","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" \"\\nNew current budget: \" + Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":" if (Budget.getCurrentBudget() \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" showMessage(\"You have exceeded your budget, please update to a larger budget or \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" \"reset the current budget to initial budget.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":" public void printBudgetAfterDeduction() {","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" StringBuilder message \u003d new StringBuilder();","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" if (Budget.getCurrentBudget() \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" message.append(\"You have exceeded your current budget by: \");","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" } else if (Budget.getCurrentBudget() \u003e 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" message.append(\"Your remaining budget for the month is: \");","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" message.append(Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" showMessage(message.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":" public void printBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":" showMessage(\"You have a remaining budget of \" + Budget.getCurrentBudgetString() + \".\");","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":" public void printDeleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been deleted.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":" public void printResetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been reset to \" + Budget.getInitialBudgetString() + \".\");","lastModifiedDate":"2023-10-23"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":150,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":151,"author":{"gitId":"wwweert123"},"content":" public void printDisplayChart(String type, String chart) {","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"wwweert123"},"content":" showMessage(\"Displaying \" + chart + \"chart for \" + type);","lastModifiedDate":"2023-10-24"},{"lineNumber":153,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"ryan1604"},"content":" public void printOverview(String... args) {","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"ryan1604"},"content":" String balance \u003d args[0];","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"ryan1604"},"content":" String income \u003d args[1];","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"ryan1604"},"content":" String expense \u003d args[2];","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"ryan1604"},"content":" String budget \u003d args[3];","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"ryan1604"},"content":" String reminders \u003d args[4];","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Here is an overview of your financials:\\n\" + \"Total balance: \" + balance + \"\\n\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"ryan1604"},"content":" \"Highest income: \" + income + \"\\n\" + \"Highest expense: \" + expense + \"\\n\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"ryan1604"},"content":" \"Remaining budget for the month: \" + budget + \"\\n\\n\" + \"Reminders:\\n\" + reminders);","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"ryan1604"},"content":" public void printSetBudget() {","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"ryan1604"},"content":" showMessage(\"A monthly budget of \" + Budget.getInitialBudgetString() + \" has been set.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":" public void printBudgetExceedBalance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Since initial budget exceeds current balance, budget will be reset to current balance.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":" public void printBudgetError(String errorType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"ryan1604"},"content":" switch (errorType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"ryan1604"},"content":" case \"delete\":","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has not been set yet.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"ryan1604"},"content":" case \"reset\":","lastModifiedDate":"2023-10-25"},{"lineNumber":181,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has not been spent yet.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"ryan1604"},"content":" case \"view\":","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"ryan1604"},"content":" showMessage(\"There is no existing budget.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Unknown command\");","lastModifiedDate":"2023-10-25"},{"lineNumber":189,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"wwweert123":49,"NeoMinWei":22,"ryan1604":106,"YFshadaow":14}},{"path":"src/main/java/seedu/financialplanner/visualisations/Categorizer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.visualisations;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"public class Categorizer {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortType(CashflowList cashflowList, String type)","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" switch (type) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" case \"expense\":","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"categorizing expenses\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" return sortExpenses(cashflowList);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" case \"income\":","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"categorizing income\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" return sortIncome(cashflowList);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(type + \" Type not found\");","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortExpenses(CashflowList cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" Map\u003cString, Double\u003e expensesByCat \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" for (Cashflow e: cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" if (e instanceof Expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" String key \u003d e.getExpenseType().toString().toLowerCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" double value \u003d expensesByCat.getOrDefault(key, 0.0) + e.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" assert value \u003e\u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" expensesByCat.put(key, value);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" return expensesByCat;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortIncome(CashflowList cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" Map\u003cString, Double\u003e incomeByCat \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" for (Cashflow e: cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" if (e instanceof Income) {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" String key \u003d e.getIncomeType().toString().toLowerCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" double value \u003d incomeByCat.getOrDefault(key, 0.0) + e.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" assert value \u003e\u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" incomeByCat.put(key, value);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" return incomeByCat;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":46,"NeoMinWei":8,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/visualisations/Visualizer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.visualisations;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.CategoryChart;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.CategoryChartBuilder;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.PieChart;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.PieChartBuilder;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.SwingWrapper;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.style.Styler;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import javax.swing.JFrame;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.awt.Color;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"public class Visualizer {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" public static void displayChart(String chartType, Map\u003cString, Double\u003e cashFlowByCat, String type)","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" switch (chartType) {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" case \"pie\":","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" displayPieChart(cashFlowByCat, type);","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" case \"bar\":","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" displayBarChart(cashFlowByCat, type);","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" default:","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(chartType + \" Chart Type Not Found\");","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" public static void displayPieChart (Map\u003cString, Double\u003e expensesByCat, String type) {","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" PieChart chart \u003d new PieChartBuilder().width(800).height(600).title(type).build();","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" // Customize Chart","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" Color[] sliceColors \u003d new Color[] {","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" new Color(21, 224, 14),","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" new Color(62, 154, 230),","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" new Color(236, 186, 110),","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" new Color(243, 159, 242),","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" new Color(246, 182, 197),","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" new Color(210, 24, 24),","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":" new Color(211, 164, 8),","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" };","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setSeriesColors(sliceColors);","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" for (Map.Entry\u003cString, Double\u003e set: expensesByCat.entrySet()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" chart.addSeries(set.getKey(), set.getValue());","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Displaying Pie Chart\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" // Show it","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" JFrame swHR \u003d new SwingWrapper\u003c\u003e(chart).displayChart();","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":" javax.swing.SwingUtilities.invokeLater(","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" ()-\u003eswHR.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" public static void displayBarChart (Map\u003cString, Double\u003e expensesByCat, String type) {","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" CategoryChart chart \u003d new CategoryChartBuilder().width(800).height(600)","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" .title(type).xAxisTitle(\"Type\").yAxisTitle(\"Value\").build();","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" // Customize Chart","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setLegendPosition(Styler.LegendPosition.InsideNW);","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setHasAnnotations(true);","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" assert !expensesByCat.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" // Series","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" List\u003cDouble\u003e values \u003d new ArrayList\u003cDouble\u003e(expensesByCat.values());","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" List\u003cString\u003e keys \u003d new ArrayList\u003cString\u003e(expensesByCat.keySet());","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" chart.addSeries(\"Expense\", keys, values);","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Displaying Bar Chart\");","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" JFrame swHR \u003d new SwingWrapper\u003c\u003e(chart).displayChart();","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" javax.swing.SwingUtilities.invokeLater(","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" ()-\u003eswHR.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":79,"ryan1604":2}},{"path":"src/test/java/seedu/financialplanner/FinancialPlannerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"class FinancialPlannerTest {","lastModifiedDate":"2023-10-07"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"-":10,"ryan1604":2}},{"path":"src/test/java/seedu/financialplanner/cashflow/BudgetTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.AddCashflowCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"@TestMethodOrder(OrderAnnotation.class)","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public class BudgetTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" @Order(1)","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public void testSetBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(500);","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" assertTrue(Budget.hasBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" assertEquals(500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" assertEquals(500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" @Order(2)","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" public void testNewExpense() {","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand testExpense \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 50 /t dining\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" testExpense.execute();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" assertEquals(450, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" @Order(3)","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" public void testUpdateBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(300);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" assertEquals(300, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" assertEquals(250, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(1000);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" assertEquals(950, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" @Order(4)","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" public void testSetInitialBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" Budget.setInitialBudget(1500);","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" @Order(5)","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" public void testUpdateCurrentBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(50);","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" @Order(6)","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" public void testResetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" Budget.resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" @Order(7)","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" public void testDeleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" assertEquals(0, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" assertEquals(0, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" @Order(8)","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public void testLoadBudget() {","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" Budget.load(100, 100);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" assertEquals(100, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" assertEquals(100, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":3,"ryan1604":82}},{"path":"src/test/java/seedu/financialplanner/cashflow/CashflowListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"class CashflowListTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList testList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" void testAddIncomeAndExpense() {","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" testList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Cashflow.balance \u003d 0;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" testList.addIncome(15, IncomeType.SALARY, 30, \"part time job\");","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" Cashflow testIncome \u003d testList.list.get(0);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" double roundedValue \u003d Cashflow.round(testIncome.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" double roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testIncome instanceof Income);","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"15.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.SALARY, testIncome.getIncomeType());","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testIncome.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"15.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"part time job\", testIncome.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" testList.addIncome(15.999, IncomeType.INVESTMENTS, 0, \"AAPL\");","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" testIncome \u003d testList.list.get(1);","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testIncome.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testIncome instanceof Income);","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"16.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.INVESTMENTS, testIncome.getIncomeType());","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testIncome.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"31.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"AAPL\", testIncome.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" testList.addExpense(10, ExpenseType.DINING, 0, \"double mcspicy\");","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" Cashflow testExpense \u003d testList.list.get(2);","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testExpense.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testExpense instanceof Expense);","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"10.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.DINING, testExpense.getExpenseType());","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testExpense.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"21.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"double mcspicy\", testExpense.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" testList.addExpense(19.999, ExpenseType.ENTERTAINMENT, 30, \"netflix\");","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" testExpense \u003d testList.list.get(3);","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testExpense.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testExpense instanceof Expense);","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"20.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.ENTERTAINMENT, testExpense.getExpenseType());","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testExpense.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"1.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"netflix\", testExpense.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" void testDeleteIncomeAndExpense() {","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithCategory(CashflowCategory.INCOME, 2);","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(3, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" double roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-15.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithoutCategory(1);","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(2, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-30.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithCategory(CashflowCategory.EXPENSE, 2);","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(1, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-10.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithoutCategory(1);","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"0.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"NeoMinWei":86,"ryan1604":2,"YFshadaow":1}},{"path":"src/test/java/seedu/financialplanner/commands/AddCashflowCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-13"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"class AddCashflowCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" void testExecute() {","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand testEntry \u003d new AddCashflowCommand(Parser","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" .parseRawCommand(\"add income /a 300 /t salary /r 30\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" testEntry.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" assertEquals(300, testEntry.amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.SALARY, testEntry.incomeType);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testEntry.recur);","lastModifiedDate":"2023-10-13"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" testEntry \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 15 /t dining\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"YFshadaow"},"content":" testEntry.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" assertEquals(15, testEntry.amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.DINING, testEntry.expenseType);","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testEntry.recur);","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":28,"YFshadaow":6}},{"path":"src/test/java/seedu/financialplanner/commands/BudgetCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"@TestMethodOrder(OrderAnnotation.class)","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"public class BudgetCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" @Order(1)","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public void testSetBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Cashflow.setBalance(2000);","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 1000\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" assertTrue(Budget.hasBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" @Order(2)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" public void testUpdateBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget update /b 1500\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Order(3)","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public void testResetBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget reset\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" AddCashflowCommand testExpense \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 50 /t dining\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" testExpense.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" Budget.deduct(50);","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" Cashflow.setBalance(1000);","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudgetExceedBalance \u003d new BudgetCommand(Parser.parseRawCommand(\"budget reset\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" testBudgetExceedBalance.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" @Order(4)","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" public void testDeleteBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget delete\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" @Order(5)","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" public void testInvalidCommandFormat_throwsException() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testExtraArgument \u003d new BudgetCommand(Parser.parseRawCommand(\"budget\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" \" set /b 500 /t sdf\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Unknown extra argument: t\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testInvalidCommand \u003d new BudgetCommand(Parser.parseRawCommand(\"budget random /b 5\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget command must be one of the following: set, update, \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" \"delete, reset, view.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(5);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testSetAndHasBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 55\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"There is an existing budget, did you mean update?\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testUpdateAndNoBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget update \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" \"/b 500\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"There is no budget set yet, did you mean set?\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testMissingArgument \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Missing /b argument.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" @Order(6)","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":" public void testInvalidBudget_throwsException() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testStringBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b f\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget must be a number.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testNegativeBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b -5\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget should be greater than 0.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":" Cashflow.clearBalance();","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudgetExceedBalance \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 500\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget should be lower than total balance.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"NeoMinWei":2,"ryan1604":120}},{"path":"src/test/java/seedu/financialplanner/investments/WatchListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.MethodOrderer;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import static org.junit.jupiter.api.Assertions.assertNotNull;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"@TestMethodOrder(MethodOrderer.OrderAnnotation.class)","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"class WatchListTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" @Order(1)","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" void fetchFMPStockPrices() throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" wl.fetchFMPStockPrices();","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" ArrayList\u003cStock\u003e stocks \u003d wl.getStocks();","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" assertNotNull(stocks.get(0).getPrice());","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" assertNotNull(stocks.get(1).getPrice());","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" @Order(2)","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" void addStock() throws Exception {","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" String stockCode \u003d \"GME\";","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" assertEquals(\"Gamestop Corporation - Class A\", wl.addStock(stockCode));","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" @Order(3)","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" void deleteStock() throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" String stockCode \u003d \"GME\";","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" assertEquals(\"Gamestop Corporation - Class A\", wl.deleteStock(stockCode));","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"wwweert123":42}},{"path":"src/test/java/seedu/financialplanner/storage/StorageTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import java.io.ByteArrayInputStream;","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"public class StorageTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" @TempDir","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" public static Path testFolder;","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" protected Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" protected Storage storage \u003d Storage.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" public void loadValidData() throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" storage.load(\"src/test/testData/ValidData.txt\");","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"YFshadaow"},"content":" String actual \u003d cashflowList.getList();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":" String expected \u003d cashflowList.getList();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public void loadInvalidData_userInputNo() {","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" ByteArrayInputStream in \u003d new ByteArrayInputStream(\"n\".getBytes());","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" ui.setScanner(new Scanner(in));","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" assertThrows(FinancialPlannerException.class,","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" () -\u003e storage.load(\"src/test/testData/InvalidData.txt\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public void saveValidData() throws FinancialPlannerException, IOException {","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" storage.save(String.valueOf(testFolder.resolve(\"temp.txt\")));","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" assertEquals(Files.readAllLines(Path.of(\"src/test/testData/ValidData.txt\")),","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" Files.readAllLines(testFolder.resolve(\"temp.txt\")));","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" public void saveNonExistentFile() {","lastModifiedDate":"2023-10-13"},{"lineNumber":60,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" assertThrows(FinancialPlannerException.class, () -\u003e storage.save(\"\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"YFshadaow"},"content":" private void getTestData() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.load(new Income(123.12, IncomeType.ALLOWANCE, 0, null));","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.load(new Expense(100, ExpenseType.SHOPPING, 30, \"shopee\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"NeoMinWei":12,"ryan1604":46,"YFshadaow":10}}] +[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027com.googlecode.json-simple\u0027, name: \u0027json-simple\u0027, version: \u00271.1.1\u0027","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027org.apache.commons\u0027, name: \u0027commons-lang3\u0027, version: \u00273.0\u0027","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" implementation group: \u0027org.knowm.xchart\u0027, name: \u0027xchart\u0027, version: \u00273.2.2\u0027","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" mainClass.set(\"seedu.financialplanner.FinancialPlanner\")","lastModifiedDate":"2023-10-07"},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":48,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"wwweert123":3,"-":45,"ryan1604":2}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"--------|:-----------:|:--------------:|:---------:","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ryan Chua | [Github](https://github.com/ryan1604) | [Portfolio](docs/team/ryanchua.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Neo Min Wei | [Github](https://github.com/NeoMinWei) | [Portfolio](docs/team/NeoMinWei.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Frederick | [Github](https://github.com/) | [Portfolio](docs/team/frederick.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":3,"-":5,"ryan1604":1}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"**Xchart (A Simple Charting Library for Java)**","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"- author: KNOWN","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"- source: [https://knowm.org/open-source/xchart/]()","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"**JSON Simple (simple Java toolkit for encoding and decoding JSON)**","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"- author: Yidong Fang (Google Code)","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"- source: [https://code.google.com/archive/p/json-simple/]()","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"**Apache Common Langs 3**","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"- author: Apache Commons","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"- source: [https://commons.apache.org/proper/commons-lang/]()","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"**Alpha Vantage Stock Market API**","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"- author: Alpha Vantage","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"- source: [https://www.alphavantage.co/]()","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"**round() method in Cashflow.java**","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" - author: mhadidg","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" - source: [https://stackoverflow.com/questions/2808535/round-a-double-to-2-decimal-places]()","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":"**capitalize() method in Cashflow.java**","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" - author: Nick Bolton","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" - source: [https://stackoverflow.com/questions/1892765/how-to-capitalize-the-first-character-of-each-word-in-a-string]()","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":"**DG adapted from**","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"* [Addressbook-level3](https://github.com/se-edu/addressbook-level3)","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"### Storage Component","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"API: `Storage.java`","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"![](images/Storage.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"* The storage component loads data from the saved text files when the application starts, and saves the data to the","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" text files when the application exits.","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"* The storage class uses the static methods in LoadData and SaveData to load and save data respectively.","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"* The `load` method in LoadData reads the `data.txt` file and loads any existing Income, Expense and Budget into the application.","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"* The `save` method in SaveData saves all Incomes, Expenses and existing Budget into the `data.txt` file.","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"#### Design considerations:","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":"* There are 2 main ways to implement the storage, one is to save the data after every command, and the other is to save ","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"the data one upon exiting the program with the `exit` command.","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"* Saving the data once upon exit (Currently implemented):","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" * Advantage: Better efficiency and performance of the program.","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" * Disadvantage: If the program crashes or exits incorrectly, data will not be saved.","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":"* Saving the data after every command:","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" * Advantage: Changes are saved after every command.","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" * Disadvantage: Executing command might slow down the program when there is a large amount of data to be saved.","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":"### Visualization Feature ","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":"This feature is implemented with the help of [XChart](https://knowm.org/open-source/xchart/), a simple charting library for Java by Knowm.","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":"By typing in the vis command with the appropriate arguments (/s and /t), users will be able to visualize their income or expense ","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":"using visualization tools (Piechart, Bar Chart)","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":"Demo: ","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":"`vis /t expense /c pie`","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":"Output","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":"`Displaying piechart for expense`","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":"A message will be shown telling you that the chart is being displayed","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visOutput.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":"This feature was implemented with the help of three different classes.","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":"They are namely: Visualizer, Categorizer, VisCommand (Inherits from abstract Command Class)","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":"VisCommand\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":"1) Read the parameters of the vis command entered by the user","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":"- `/t` Reads the type of cashflow that the user wants to visualize (income/expense)","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":"- `/c` Reads the type of visualization tools the user wants (piechart/barchart)","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":"2) Calls the Cateorgizer to sort cashflow (Income/Expense) according to type","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":"3) Calls the Visualizer to display the chart to the user","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":"Categorizer\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":"According to the cashflow type (Income/Expense) arugment passed in, the Categorizer sorts the ","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":"specified cashflow entry according to type using a Hashmap which is returned and used by the Visualizer","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":"Visualizer\u0027s Role: ","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":"According to the chart type (Pie/Bar) argument and the Hashmap obtained from the categorizer passed in, ","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":"the visualizer displays the specified visualization chart by calling the charting library Xchart.","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":"### Class Diagram","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualisationClass.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":"### Sequence Diagram ","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":"Overall ","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualisationSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":"Categorizer","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":"![](images/vis/categorizerSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":"Visualizer","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":"![](images/vis/visualizerSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":"### Add income/expense feature","lastModifiedDate":"2023-10-24"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":"The add income/expense command has 2 compulsory arguments `/t` and `/a` and 1 optional argument `/r`.","lastModifiedDate":"2023-10-24"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":"add income /a 100 /t salary /r 30","lastModifiedDate":"2023-10-24"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":128,"author":{"gitId":"NeoMinWei"},"content":"Below are the steps that shows the implementation of add income/expense.","lastModifiedDate":"2023-10-24"},{"lineNumber":129,"author":{"gitId":"NeoMinWei"},"content":"#### Step 1","lastModifiedDate":"2023-10-24"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":"An instantiated AddCashflowCommand class gets the instance of CashflowList.","lastModifiedDate":"2023-10-24"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":132,"author":{"gitId":"NeoMinWei"},"content":"This allows the AddCashflowCommand instance to access the methods of CashflowList.","lastModifiedDate":"2023-10-24"},{"lineNumber":133,"author":{"gitId":"NeoMinWei"},"content":"#### Step 2","lastModifiedDate":"2023-10-24"},{"lineNumber":134,"author":{"gitId":"NeoMinWei"},"content":"The AddCashflowCommand instance then calls addIncome() or addExpense(), depending on what `category` is initialised as.","lastModifiedDate":"2023-10-24"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":136,"author":{"gitId":"NeoMinWei"},"content":"addIncome() or addExpense() instantiates an Income or Expense object respectively.","lastModifiedDate":"2023-10-24"},{"lineNumber":137,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":"switch (category) {","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addIncome(amount, incomeType, recur);","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-24"},{"lineNumber":145,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addExpense(amount, expenseType, recur);","lastModifiedDate":"2023-10-24"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":147,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-24"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-24"},{"lineNumber":149,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":150,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":151,"author":{"gitId":"NeoMinWei"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"NeoMinWei"},"content":"#### Step 3","lastModifiedDate":"2023-10-24"},{"lineNumber":153,"author":{"gitId":"NeoMinWei"},"content":"The instantiated income/expense then updates the overall balance through addIncomeValue() or addExpenseValue().","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":155,"author":{"gitId":"NeoMinWei"},"content":"The income/expense object is also added to the list in Cashflowlist which contains all incomes/expenses.","lastModifiedDate":"2023-10-24"},{"lineNumber":156,"author":{"gitId":"NeoMinWei"},"content":"#### Step 4","lastModifiedDate":"2023-10-24"},{"lineNumber":157,"author":{"gitId":"NeoMinWei"},"content":"The added income/expense is then displayed to the user through the Ui.","lastModifiedDate":"2023-10-24"},{"lineNumber":158,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":159,"author":{"gitId":"NeoMinWei"},"content":"#### Diagrams","lastModifiedDate":"2023-10-24"},{"lineNumber":160,"author":{"gitId":"NeoMinWei"},"content":"Given below is the class diagram showing the class structure of the add income/expense mechanism:","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"NeoMinWei"},"content":"![](images/CashflowClassDiagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"NeoMinWei"},"content":"Given below is the sequence diagram showing the add income/expense mechanism:","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"NeoMinWei"},"content":"![](images/AddCashflowSequence.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"ryan1604"},"content":"### Budget Feature","lastModifiedDate":"2023-10-24"},{"lineNumber":168,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"ryan1604"},"content":"This feature has 5 functions, `set`, `update`, `delete`, `reset`, and `view`.","lastModifiedDate":"2023-10-24"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":"![](images/Budget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":"The BudgetCommand will execute the appropriate command and print through `Budget.java` and prints any message to the user through `Ui.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":"#### Set and update budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":177,"author":{"gitId":"ryan1604"},"content":"Example:","lastModifiedDate":"2023-10-24"},{"lineNumber":178,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":179,"author":{"gitId":"ryan1604"},"content":"budget set /b 500","lastModifiedDate":"2023-10-24"},{"lineNumber":180,"author":{"gitId":"ryan1604"},"content":"budget update /b 1000","lastModifiedDate":"2023-10-24"},{"lineNumber":181,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":182,"author":{"gitId":"ryan1604"},"content":"The \u0027/b\u0027 is followed by the budget amount. The first line will set the budget by calling `setBudget(500)` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":183,"author":{"gitId":"ryan1604"},"content":"The second line updates the budget by adding or subtracting the difference between the initial and updated amount to the ","lastModifiedDate":"2023-10-24"},{"lineNumber":184,"author":{"gitId":"ryan1604"},"content":"initial and current budget. This is done through `updateBudget(500)` method in `Budget.java`. Both functions can be seen ","lastModifiedDate":"2023-10-24"},{"lineNumber":185,"author":{"gitId":"ryan1604"},"content":"in the diagram above","lastModifiedDate":"2023-10-24"},{"lineNumber":186,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"ryan1604"},"content":"#### Delete budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":189,"author":{"gitId":"ryan1604"},"content":"![](images/deleteBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":190,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"ryan1604"},"content":"The budget will be deleted by setting the initial and current budget to 0 through the `deleteBudget()` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"ryan1604"},"content":"Example: `budget delete`","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":195,"author":{"gitId":"ryan1604"},"content":"#### Reset budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":196,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":197,"author":{"gitId":"ryan1604"},"content":"![](images/resetBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":198,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":199,"author":{"gitId":"ryan1604"},"content":"The budget will be reset by resetting the current budget to the initial budget through the `resetBudget()` method in `Budget.java`.","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"ryan1604"},"content":"Example: `budget reset`","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"ryan1604"},"content":"#### View budget:","lastModifiedDate":"2023-10-25"},{"lineNumber":204,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"ryan1604"},"content":"![](images/viewBudget.png)","lastModifiedDate":"2023-10-24"},{"lineNumber":206,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"ryan1604"},"content":"The current budget will be shown to the user through the `Ui`.","lastModifiedDate":"2023-10-24"},{"lineNumber":208,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":209,"author":{"gitId":"ryan1604"},"content":"Example: `budget view`","lastModifiedDate":"2023-10-24"},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":212,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":213,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":219,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":221,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":223,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":224,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":225,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":226,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":228,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":230,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":232,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":234,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":236,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":238,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"wwweert123":73,"NeoMinWei":49,"-":44,"ryan1604":72}},{"path":"docs/Style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T1 #7777DB","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T2 #5252CE","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"## Table of contents","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"* [Introduction](#introduction)","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"* [Quick start](#quick-start)","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"* [Features](#features)","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":" * [Budget](#budget)","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" * [Setting budget](#setting-a-budget-budget-set)","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" * [Updating budget](#updating-budget-budget-update)","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" * [Resetting budget](#resetting-budget-budget-reset)","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" * [Deleting budget](#deleting-budget-budget-delete)","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" * [Viewing budget](#viewing-budget-budget-view)","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" * [Displaying Overview](#displaying-overview-overview)","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" * [View Balance](#viewing-balance-balance)","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" * [WatchList](#viewing-watchlist-watchlist)","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" * [Adding Stock](#adding-stock-to-watchlist-addstock)","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" * [Deleting Stock](#deleting-budget-budget-delete)","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" * [Visualization](#Visualization)","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" * [Exiting the program](#exiting-the-program-exit)","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" * [Saving data](#saving-the-data)","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" * [Loading data](#loading-the-data)","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"* [FAQ](#faq)","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"* [Command Summary](#command-summary)","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"Financial Planner is a Command Line Interface (CLI) application for managing your finances conveniently. ","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"It is optimized for use via the CLI and leverages your expertise in CLI and your ability to type fast and gives ","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"you a one-stop interface to access a plethora of features to manage your finances.","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"{Give steps to get started quickly}","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"1. Down the latest version of `Duke` from [here](http://link.to/duke).","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"## Features","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"{Give detailed description of each feature}","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"### Budget","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"#### Setting a budget: `budget set`","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"Sets a monthly budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"Format: `budget set /b BUDGET`","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"* `BUDGET` has to be a positive number.","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget set /b 500`","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":"A monthly budget of 500.00 has been set.","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"#### Updating budget: `budget update`","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"Updates budget to a new value.","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"Format: `budget update /b BUDGET`","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":"* `Budget` has to be a positive number.","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"* There has to be an existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget update /b 1000`","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"Budget has been updated:","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"Old initial budget: 500.00","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"Old current budget: 500.00","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"New initial budget: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"New current budget: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"#### Resetting budget: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":"Resets current budget to initial budget if they are different.","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":"Format: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":"* Budget will be reset to initial budget or current balance, whichever is lower.","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget reset`","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"Budget has been reset to 1000.00.","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":"#### Deleting budget: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":"Deletes existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"Format: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":"Budget has been deleted.","lastModifiedDate":"2023-10-28"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":"#### Viewing budget: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":"View existing budget.","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":"Format: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":"Example of usage: `budget view`","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":"You have a remaining budget of 1000.00.","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":"### Displaying overview: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":"Displays an overview of user\u0027s financials.","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":"Format: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":"Example of usage: `overview`","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":"Here is an overview of your financials:","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":"Total balance: 3790.00","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":"Highest income: 5000.00 Category: Salary","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":"Highest expense: 500.00 Category: Others","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":"Remaining budget for the month: 1000.00","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":"Reminders:","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":"No reminders added yet.","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":"### Viewing balance: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":"View user\u0027s current balance.","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"ryan1604"},"content":"Format: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"ryan1604"},"content":"Example of usage: `balance`","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"ryan1604"},"content":"Example output:","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"ryan1604"},"content":"Balance: 3790.00","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"ryan1604"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"wwweert123"},"content":"### Viewing Watchlist: `watchlist`","lastModifiedDate":"2023-10-29"},{"lineNumber":162,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":163,"author":{"gitId":"wwweert123"},"content":"View your current watchlist with stocks that you are interested in with the exchanges shown as well","lastModifiedDate":"2023-10-29"},{"lineNumber":164,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":165,"author":{"gitId":"wwweert123"},"content":"Default watchlist: AAPL, GOOGL","lastModifiedDate":"2023-10-29"},{"lineNumber":166,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":167,"author":{"gitId":"wwweert123"},"content":"Format: `watchlist`","lastModifiedDate":"2023-10-29"},{"lineNumber":168,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":169,"author":{"gitId":"wwweert123"},"content":"Example of usage: `watchlist`","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"wwweert123"},"content":"Example of output:","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":174,"author":{"gitId":"wwweert123"},"content":"Symbol Market Price Daily High Daily Low EquityName","lastModifiedDate":"2023-10-29"},{"lineNumber":175,"author":{"gitId":"wwweert123"},"content":"AAPL NASDAQ 168.22 168.96 166.84 Apple Inc ","lastModifiedDate":"2023-10-29"},{"lineNumber":176,"author":{"gitId":"wwweert123"},"content":"GOOGL NASDAQ 122.17 123.31 120.2057 Alphabet Inc - Class A","lastModifiedDate":"2023-10-29"},{"lineNumber":177,"author":{"gitId":"wwweert123"},"content":"GME NYSE 13.12 13.615 13.02 Gamestop Corporation - Class A","lastModifiedDate":"2023-10-29"},{"lineNumber":178,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":179,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":180,"author":{"gitId":"wwweert123"},"content":"### Adding Stock to Watchlist: `addstock`","lastModifiedDate":"2023-10-29"},{"lineNumber":181,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":182,"author":{"gitId":"wwweert123"},"content":"Add a stock that you are interested in monitoring into your personal WatchList","lastModifiedDate":"2023-10-29"},{"lineNumber":183,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":184,"author":{"gitId":"wwweert123"},"content":"Format: `addstock /s STOCKCODE`","lastModifiedDate":"2023-10-29"},{"lineNumber":185,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":186,"author":{"gitId":"wwweert123"},"content":"Example of usage: `addstock /s META`","lastModifiedDate":"2023-10-29"},{"lineNumber":187,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":188,"author":{"gitId":"wwweert123"},"content":"Example of output:","lastModifiedDate":"2023-10-29"},{"lineNumber":189,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":190,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":191,"author":{"gitId":"wwweert123"},"content":"You have successfully added:","lastModifiedDate":"2023-10-29"},{"lineNumber":192,"author":{"gitId":"wwweert123"},"content":"Meta Platforms Inc - Class A","lastModifiedDate":"2023-10-29"},{"lineNumber":193,"author":{"gitId":"wwweert123"},"content":"Use Watchlist to view it!","lastModifiedDate":"2023-10-29"},{"lineNumber":194,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":195,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":196,"author":{"gitId":"wwweert123"},"content":"### Deleting Stock from Watchlist: `deletestock`","lastModifiedDate":"2023-10-29"},{"lineNumber":197,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":198,"author":{"gitId":"wwweert123"},"content":"Delete a stock that you are no longer interested in monitoring from your personal WatchList","lastModifiedDate":"2023-10-29"},{"lineNumber":199,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":200,"author":{"gitId":"wwweert123"},"content":"Format: `deletestock /s STOCKCODE`","lastModifiedDate":"2023-10-29"},{"lineNumber":201,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":202,"author":{"gitId":"wwweert123"},"content":"Example of usage: `deletestock /s META`","lastModifiedDate":"2023-10-29"},{"lineNumber":203,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":204,"author":{"gitId":"wwweert123"},"content":"Example of output:","lastModifiedDate":"2023-10-29"},{"lineNumber":205,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":206,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":207,"author":{"gitId":"wwweert123"},"content":"You have successfully deleted: ","lastModifiedDate":"2023-10-29"},{"lineNumber":208,"author":{"gitId":"wwweert123"},"content":"Meta Platforms Inc - Class A","lastModifiedDate":"2023-10-29"},{"lineNumber":209,"author":{"gitId":"wwweert123"},"content":"Use watchlist command to view updated Watchlist","lastModifiedDate":"2023-10-29"},{"lineNumber":210,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":211,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":212,"author":{"gitId":"wwweert123"},"content":"### Visualizing your cashflow: `vis`","lastModifiedDate":"2023-10-29"},{"lineNumber":213,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":214,"author":{"gitId":"wwweert123"},"content":"Using this command to visualize your income or expenses in a pie chart or bar chart","lastModifiedDate":"2023-10-29"},{"lineNumber":215,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":216,"author":{"gitId":"wwweert123"},"content":"Format: `vis /t TYPE /c TOOL`","lastModifiedDate":"2023-10-29"},{"lineNumber":217,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":218,"author":{"gitId":"wwweert123"},"content":"Example of usage: `vis /t income /c pie`","lastModifiedDate":"2023-10-29"},{"lineNumber":219,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":220,"author":{"gitId":"wwweert123"},"content":"Example of output:","lastModifiedDate":"2023-10-29"},{"lineNumber":221,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":222,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":223,"author":{"gitId":"wwweert123"},"content":"Displaying piechart for expense","lastModifiedDate":"2023-10-29"},{"lineNumber":224,"author":{"gitId":"wwweert123"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":225,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":226,"author":{"gitId":"wwweert123"},"content":"![](images/vis/visOutput.png)","lastModifiedDate":"2023-10-29"},{"lineNumber":227,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":228,"author":{"gitId":"ryan1604"},"content":"### Exiting the program: `exit`","lastModifiedDate":"2023-10-28"},{"lineNumber":229,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":230,"author":{"gitId":"ryan1604"},"content":"Exits the program.","lastModifiedDate":"2023-10-28"},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":232,"author":{"gitId":"ryan1604"},"content":"Format: `exit`","lastModifiedDate":"2023-10-28"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":234,"author":{"gitId":"ryan1604"},"content":"### Saving the data","lastModifiedDate":"2023-10-28"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":236,"author":{"gitId":"ryan1604"},"content":"Data is automatically saved upon exiting the program using the `exit` command. Closing the program without exiting ","lastModifiedDate":"2023-10-28"},{"lineNumber":237,"author":{"gitId":"ryan1604"},"content":"will not save the data.","lastModifiedDate":"2023-10-28"},{"lineNumber":238,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":239,"author":{"gitId":"ryan1604"},"content":"### Loading the data","lastModifiedDate":"2023-10-28"},{"lineNumber":240,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":241,"author":{"gitId":"ryan1604"},"content":"Existing data will be automatically loaded when the program starts up.","lastModifiedDate":"2023-10-28"},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":243,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":244,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":245,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer? ","lastModifiedDate":"2020-05-24"},{"lineNumber":246,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":247,"author":{"gitId":"-"},"content":"**A**: {your answer here}","lastModifiedDate":"2020-05-24"},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":249,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":250,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":251,"author":{"gitId":"-"},"content":"{Give a \u0027cheat sheet\u0027 of commands here}","lastModifiedDate":"2020-05-24"},{"lineNumber":252,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":253,"author":{"gitId":"ryan1604"},"content":"| Action | Format |","lastModifiedDate":"2023-10-28"},{"lineNumber":254,"author":{"gitId":"ryan1604"},"content":"|----------------------|---------------------------|","lastModifiedDate":"2023-10-28"},{"lineNumber":255,"author":{"gitId":"ryan1604"},"content":"| **Set budget** | `budget set /b BUDGET` |","lastModifiedDate":"2023-10-28"},{"lineNumber":256,"author":{"gitId":"ryan1604"},"content":"| **Update budget** | `budget update /b BUDGET` |","lastModifiedDate":"2023-10-28"},{"lineNumber":257,"author":{"gitId":"ryan1604"},"content":"| **Reset budget** | `budget reset` |","lastModifiedDate":"2023-10-28"},{"lineNumber":258,"author":{"gitId":"ryan1604"},"content":"| **Delete budget** | `budget delete` |","lastModifiedDate":"2023-10-28"},{"lineNumber":259,"author":{"gitId":"ryan1604"},"content":"| **View budget** | `budget view` |","lastModifiedDate":"2023-10-28"},{"lineNumber":260,"author":{"gitId":"ryan1604"},"content":"| **Display Overview** | `overview` |","lastModifiedDate":"2023-10-28"},{"lineNumber":261,"author":{"gitId":"ryan1604"},"content":"| **View balance** | `balance` |","lastModifiedDate":"2023-10-28"},{"lineNumber":262,"author":{"gitId":"ryan1604"},"content":"| **Exit program** | `exit` |","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"wwweert123":71,"-":37,"ryan1604":154}},{"path":"docs/diagrams/AddCashflowSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"participant AddCashflowCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"participant CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"participant Income","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"participant Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"participant Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"-\u003e AddCashflowCommand: execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"AddCashflowCommand -\u003e CashflowList: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"CashflowList -\u003e Ui: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"alt income","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand -\u003e CashflowList: addIncome(amount, incomeType, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" create Income","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Income: Income(value, type, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" Income -\u003e Income: addIncomeValue()","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e CashflowList: add(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Ui: printAddedCashflow(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"else expense","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand -\u003e CashflowList: addExpense(amount, incomeType, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" create Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Expense: Expense(value, type, recur)","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" Expense -\u003e Expense: addExpenseValue()","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e CashflowList: add(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" CashflowList -\u003e Ui: printAddedCashflow(toAdd)","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":"else invalid command","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":31}},{"path":"docs/diagrams/Budget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"-\u003e BudgetCommand: execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"BudgetCommand -\u003e Ui: getInstance()","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"alt set","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: setBudget(budget)","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printSetBudget()","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"else update","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetBeforeUpdate()","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: updateBudget(budget)","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetAfterUpdate()","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"else delete","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: DeleteBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"else reset","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: ResetBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"else view","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" ref over BudgetCommand: ViewBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"else invalid command","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":27}},{"path":"docs/diagrams/CashflowClassDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"skinparam classAttributeIconSize 0","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"hide empty members","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"skinparam ClassBackgroundColor STORAGE_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"Class \"{abstract}\\nCashflow\" as Cashflow","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"Class Expense extends Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"Class Income extends Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"Class Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"Class CashflowList {","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" +addIncome(double, IncomeType, int)","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" +addExpense(double, ExpenseType, int)","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"Class AddCashflowCommand #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":"enum \"\u003c\u003cenumeration\u003e\u003e\\nExpenseType\" as ExpenseType","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"enum \"\u003c\u003cenumeration\u003e\u003e\\nIncomeType\" as IncomeType","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":"CashflowList -right-\u003e \"1\" Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":"AddCashflowCommand --\u003e \"1\" CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":"CashflowList --\u003e \"*\" Cashflow","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"CashflowList ..\u003e Income","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":"CashflowList ..\u003e Expense","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"NeoMinWei":28}},{"path":"docs/diagrams/Storage.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"skinparam ClassBackgroundColor STORAGE_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"package Storage as StoragePackage {","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"Class Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nLoadData\" as LoadData","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nSaveData\" as SaveData","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"Class CashflowList","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nBudget\" as Budget","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"Class \"{abstract}\\nCashflow\" as Cashflow","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"Class \"\u003c\u003cenumeration\u003e\u003e\\nExpenseType\" as ExpenseType","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"Class \"\u003c\u003cenumeration\u003e\u003e\\nIncomeType\" as IncomeType","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"Class Ui","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"Class FinancialPlanner #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"FinancialPlanner --\u003e Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"Storage .right.-\u003e LoadData: uses \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"Storage .left.\u003e SaveData: uses \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"SaveData --\u003e CashflowList","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"SaveData ..\u003e Budget","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"SaveData ..\u003e Cashflow","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"LoadData --\u003e CashflowList","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e Budget","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e ExpenseType","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e IncomeType","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"LoadData ..\u003e Cashflow","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"LoadData -right-\u003e Ui: prints message \u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":35}},{"path":"docs/diagrams/deleteBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd DeleteBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt hasBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: deleteBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printDeleteBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"delete\")","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":16}},{"path":"docs/diagrams/resetBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd ResetBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt spentBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" opt initialBudgetExceedBalance","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: setInitialBudget(balance);","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetExceedBalance()","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" end","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Budget: resetBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printResetBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"else !hasBudget","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"delete\")","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"reset\")","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":22}},{"path":"docs/diagrams/style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"/\u0027","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":" \u0027Commonly used styles and colors across diagrams.","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":" \u0027Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":" \u0027comprehensive list of skinparams.","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":" \u0027/","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"\u0027T1 through T4 are shades of the original color from lightest to darkest","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"!define LOGIC_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"!define MODEL_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"!define STORAGE_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"skinparam Package {","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" BackgroundColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" FontSize 16","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":"skinparam Class {","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" FontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" FontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" BorderColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" StereotypeFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":"skinparam Actor {","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" BorderColor USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" Color USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"skinparam Sequence {","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" MessageAlign center","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" BoxFontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" BoxPadding 0","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" BoxFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"skinparam Participant {","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" FontColor #FFFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" Padding 20","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"skinparam ArrowFontStyle bold","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":"skinparam MinClassWidth 50","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":"skinparam ParticipantPadding 10","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":"skinparam Shadowing false","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"skinparam DefaultTextAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"skinparam packageStyle Rectangle","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"hide members","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"hide circle","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":79}},{"path":"docs/diagrams/viewBudget.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"mainframe sd ViewBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"participant \":BudgetCommand\" as BudgetCommand","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nBudget\" as Budget","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\" as Ui","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"alt hasBudget","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudget()","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"else else","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" BudgetCommand -\u003e Ui: printBudgetError(\"view\")","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"end","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"ryan1604":15}},{"path":"docs/diagrams/vis/categorizerSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"mainframe sd sort cashflow entries","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"autoactivate on","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCategorizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": Categorizer.sortType(cashflowList, type)","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"alt type \u003d\u003d \"expense\"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nCategorizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": sortExpenses(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":" return","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"else type \u003d\u003d \"income\"","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nCategorizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nCategorizer\": sortIncome(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" return","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"return sortedCashflow: Map\u003cString,Double\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":24}},{"path":"docs/diagrams/vis/visualisationClass.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"\u0027https://plantuml.com/class-diagram","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"skinparam classFontColor automatic","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"class \"{abstract}\\nCommand\" #MintCream {","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"+execute() {abstract}","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"class VisCommand #MistyRose {","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"-String type","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"-String chart","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"+execute()","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"class RawCommand #Cornsilk {","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"-args: List\u003cString\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"-extraArgs: Map\u003cString, String\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"#commandName: String","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":"class Categorizer #HoneyDew {","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":"+\u003cu\u003esortType(cashflowList: CashflowList, type: String)","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":"+\u003cu\u003esortExpenses(cashflowList: CashflowList)","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"+\u003cu\u003esortIncome(cashflowList: CashflowList)","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":"class Visualizer #Beige {","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"+\u003cu\u003edisplayChart(chart: String, cashFlowByCat: Map, type: String)","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":"+ \u003cu\u003edisplayPieChart(cashFlowByCat: Map, type: String)","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"+ \u003cu\u003edisplayBarChart(cashFlowByCat: Map, type: String)","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":"\"{abstract}\\nCommand\" \u003c|-- VisCommand","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"RawCommand \u003c.. VisCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":"Categorizer \u003c.. Visualizer","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":"Visualizer \u003c.. VisCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":"hide Circle","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":"skinparam classAttributeIconSize 0","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"wwweert123":43}},{"path":"docs/diagrams/vis/visualisationSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nUi\"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCashFlowList\"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nCategorizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nUi\": getInstance()","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nCashFlowList\": getInstance()","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nUi\": printDisplayChart(type)","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"ref over \"\u003c\u003cclass\u003e\u003e\\nCategorizer\", \":VisCommand\" : sort cashflow entries","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"ref over \"\u003c\u003cclass\u003e\u003e\\nVisualizer\", \":VisCommand\": displaying chart","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":21}},{"path":"docs/diagrams/vis/visualizerSequence.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"mainframe sd displaying chart","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"participant \":VisCommand\"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"participant \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"\":VisCommand\"-\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": Visualizer.displayChart(chart, sortedCashFlow, type)","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"activate \"\u003c\u003cclass\u003e\u003e\\nVisualizer\"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"alt chartType \u003d\u003d \"pie\"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nVisualizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": displayPieChart(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"else chartType \u003d\u003d \"bar\"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" \"\u003c\u003cclass\u003e\u003e\\nVisualizer\" -\u003e \"\u003c\u003cclass\u003e\u003e\\nVisualizer\": displayBarChart(cashflowList)","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"hide footbox","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"wwweert123":20}},{"path":"docs/team/NeoMinWei.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"# Neo Min Wei - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Overview","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"### Summary of Contributions","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"NeoMinWei":1,"-":5}},{"path":"docs/team/frederick.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"I am Frederick ","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"Hello ","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"I am from this team!","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"wwweert123":5}},{"path":"src/main/java/seedu/financialplanner/FinancialPlanner.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.Command;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ExitCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.storage.Storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-07"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-07"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlanner {","lastModifiedDate":"2023-10-07"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" private static final String FILE_PATH \u003d \"data/data.txt\";","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" private final Storage storage \u003d Storage.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private final WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" ","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" private FinancialPlanner() {","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" FinancialPlannerLogger.initialise();","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" new FinancialPlanner().run();","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" public void run() {","lastModifiedDate":"2023-10-07"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" storage.load(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" ui.welcomeMessage();","lastModifiedDate":"2023-10-07"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" String input;","lastModifiedDate":"2023-10-07"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" Command command \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" while (!(command instanceof ExitCommand)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" input \u003d ui.input();","lastModifiedDate":"2023-10-07"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" command.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" save();","lastModifiedDate":"2023-10-10"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" ui.exitMessage();","lastModifiedDate":"2023-10-07"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public void save() {","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" storage.save(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":40,"YFshadaow":16}},{"path":"src/main/java/seedu/financialplanner/FinancialPlannerLogger.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.LogManager;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlannerLogger {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" public static void initialise() {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" FileHandler fh \u003d new FileHandler(\"data/logger.log\");","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" LogManager.getLogManager().reset();","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" logger.addHandler(fh);","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" fh.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Logger initialised\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"ryan1604":23}},{"path":"src/main/java/seedu/financialplanner/cashflow/Budget.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public abstract class Budget {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":" private static final int MONTH \u003d 30;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":" private static double initialBudget \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":" private static double currentBudget \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" public static void setBudget(double amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" assert initialBudget \u003d\u003d currentBudget : \"Initial and current budget should be the same\";","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" assert initialBudget !\u003d 0 \u0026\u0026 currentBudget !\u003d 0 : \"Initial and current budget should not be 0\";","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" public static double getInitialBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" return initialBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" public static void updateBudget(double budget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" double diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" if (budget \u003e initialBudget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" diff \u003d budget - initialBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" currentBudget +\u003d diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" } else if (budget \u003c initialBudget) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" diff \u003d initialBudget - budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" currentBudget -\u003d diff;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" assert initialBudget \u003d\u003d budget : \"Initial budget should be equal to updated budget\";","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" public static double getCurrentBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" return currentBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" public static String getCurrentBudgetString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(currentBudget, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" public static String getInitialBudgetString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(initialBudget, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" public static void deduct(double amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" Budget.currentBudget -\u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" public static void load(double initial, double current) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d initial;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d current;","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" public static boolean hasBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" return initialBudget !\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" public static String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" return \"B | \" + initialBudget + \" | \" + currentBudget;","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" public static void deleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" public static void resetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" currentBudget \u003d initialBudget;","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" public static void setInitialBudget(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" initialBudget \u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public static void updateCurrentBudget(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" currentBudget +\u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":81}},{"path":"src/main/java/seedu/financialplanner/cashflow/Cashflow.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import java.math.BigDecimal;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import java.math.RoundingMode;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"public abstract class Cashflow {","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" protected static double balance \u003d 0;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" protected double amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" protected int recur;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" protected String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" public Cashflow(double amount, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" this.recur \u003d recur;","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" public static void clearBalance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" balance \u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" public static void setBalance(double amount) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" balance \u003d amount;","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" //@author mhadidg-reused","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" //Reused from https://stackoverflow.com/questions/2808535/round-a-double-to-2-decimal-places","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" public static double round(double value, int places) {","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" if (places \u003c 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException();","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" BigDecimal bd \u003d BigDecimal.valueOf(value);","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" bd \u003d bd.setScale(places, RoundingMode.HALF_UP);","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":" return bd.doubleValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" //@author mhadidg","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" //@author Nick Bolton-reused","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" //Reused from","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" //https://stackoverflow.com/questions/1892765/how-to-capitalize-the-first-character-of-each-word-in-a-string","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" public String capitalize(String line) {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" return Character.toUpperCase(line.charAt(0)) + line.substring(1);","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" //@author Nick Bolton","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" String string \u003d \" Amount: \" + decimalFormat.format(round(amount, 2));","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" if (recur !\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d System.lineSeparator() + \" Recurring every: \" + recur + \" days\";","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" if (description !\u003d null) {","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d System.lineSeparator() + \" Description: \" + description;","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" return string;","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" public String formatBalance() {","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" return decimalFormat.format(round(Cashflow.balance, 2));","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" public double getAmount() {","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" return this.amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public static double getBalance() {","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" return balance;","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" String string \u003d \" | \" + this.recur;","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" if (description !\u003d null) {","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" string +\u003d \" | \" + this.description;","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" return string;","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" public abstract ExpenseType getExpenseType();","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":" public abstract IncomeType getIncomeType();","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":2,"NeoMinWei":78,"ryan1604":16}},{"path":"src/main/java/seedu/financialplanner/cashflow/CashflowList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"public class CashflowList {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private static CashflowList cashflowList \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public final ArrayList\u003cCashflow\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" protected Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList() {","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" public static CashflowList getInstance() {","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowList \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" cashflowList \u003d new CashflowList();","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" return cashflowList;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" public void addIncome(double value, IncomeType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Adding income\");","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" Income toAdd \u003d new Income(value, type, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" list.add(toAdd);","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" ui.printAddedCashflow(toAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize + 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" public void addExpense(double value, ExpenseType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Adding expense\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":" Expense toAdd \u003d new Expense(value, type, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" list.add(toAdd);","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" ui.printAddedCashflow(toAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize + 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" public double deleteCashflowWithoutCategory(int index) {","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" int listIndex \u003d index - 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" Cashflow toRemove \u003d list.get(listIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" list.remove(listIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" toRemove.deleteCashflowvalue();","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" ui.printDeletedCashflow(toRemove);","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize - 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" return toRemove.getAmount();","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" //helper method to find the index of a given cashflow in the overall list","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" //given its index in its respective list. e.g. \"income 3\" is the third income","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" //in the overall list","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" private int cashflowIndexFinder(CashflowCategory category, int cashflowIndex) {","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" switch (category) {","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" return findCashflowIndexFromIncomeIndex(cashflowIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" return findCashflowIndexFromExpenseIndex(cashflowIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" return -1;","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" private int findCashflowIndexFromIncomeIndex(int cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"NeoMinWei"},"content":" int cashflowCounter \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" int overallCashflowIndex \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" if (entry instanceof Income) {","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" cashflowCounter +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowCounter \u003d\u003d cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" overallCashflowIndex +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" return overallCashflowIndex;","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":" private int findCashflowIndexFromExpenseIndex(int cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" int cashflowCounter \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" int overallCashflowIndex \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" if (entry instanceof Expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" cashflowCounter +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" if (cashflowCounter \u003d\u003d cashflowIndex) {","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"NeoMinWei"},"content":" overallCashflowIndex +\u003d 1;","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"NeoMinWei"},"content":" return overallCashflowIndex;","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"NeoMinWei"},"content":" public double deleteCashflowWithCategory(CashflowCategory category, int index) {","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"NeoMinWei"},"content":" int existingListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"NeoMinWei"},"content":" int listIndex \u003d cashflowIndexFinder(category, index);","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" Cashflow toRemove \u003d list.get(listIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" list.remove(listIndex);","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" toRemove.deleteCashflowvalue();","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"NeoMinWei"},"content":" ui.printDeletedCashflow(toRemove);","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" int newListSize \u003d list.size();","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":" assert newListSize \u003d\u003d existingListSize - 1;","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" return toRemove.getAmount();","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" public void load(Cashflow entry) {","lastModifiedDate":"2023-10-10"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" list.add(entry);","lastModifiedDate":"2023-10-10"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" //temp method","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" public String getList() {","lastModifiedDate":"2023-10-12"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" StringBuilder output \u003d new StringBuilder();","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : list) {","lastModifiedDate":"2023-10-12"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" output.append(entry).append(\"\\n\");","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" return output.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":119,"YFshadaow":3,"ryan1604":16}},{"path":"src/main/java/seedu/financialplanner/cashflow/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"public class Expense extends Cashflow {","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":" protected ExpenseType type;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":" public Expense(double amount, ExpenseType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":" super(amount, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" addExpenseValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" public ExpenseType getExpenseType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" return type;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" public IncomeType getIncomeType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" return null;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" private void addExpenseValue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" balance -\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" balance +\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" return \"Expense\" + System.lineSeparator() +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" \" Type: \" + capitalize(type.toString().toLowerCase()) + System.lineSeparator() + super.toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" return \"E | \" + this.amount + \" | \" + this.type + super.formatString();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":39,"ryan1604":5,"hshiah":1}},{"path":"src/main/java/seedu/financialplanner/cashflow/Income.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"public class Income extends Cashflow{","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":" protected IncomeType type;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":" public Income(double amount, IncomeType type, int recur, String description) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":" super(amount, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":" addIncomeValue();","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":" public IncomeType getIncomeType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" return type;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" public ExpenseType getExpenseType() {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" return null;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" private void addIncomeValue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" balance +\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" public void deleteCashflowvalue() {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" balance -\u003d this.amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" return \"Income\" + System.lineSeparator() +","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" \" Type: \" + capitalize(type.toString().toLowerCase()) + System.lineSeparator() + super.toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-10"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public String formatString() {","lastModifiedDate":"2023-10-10"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" return \"I | \" + this.amount + \" | \" + this.type + super.formatString();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"NeoMinWei":39,"ryan1604":5,"hshiah":1}},{"path":"src/main/java/seedu/financialplanner/commands/AddCashflowCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"public class AddCashflowCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" protected static Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" protected double amount;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowCategory category;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" protected ExpenseType expenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" protected IncomeType incomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" protected int recur \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" protected String description \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" public AddCashflowCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" String categoryString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" category \u003d CashflowCategory.valueOf(categoryString.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"a\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Missing arguments for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must have an amount\");","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing amount as double\");","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" amount \u003d Double.parseDouble(rawCommand.extraArgs.get(\"a\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Amount must be a number\");","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" if (amount \u003c 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for amount\");","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Amount cannot be negative\");","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"a\");","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"t\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Missing arguments for type\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must have a type\");","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" String stringType \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" if (category.equals(CashflowCategory.EXPENSE)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing ExpenseType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" expenseType \u003d ExpenseType.valueOf(stringType.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for ExpenseType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be one of the following: \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" \"dining, entertainment, shopping, travel, insurance, necessities, others\");","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" } else if (category.equals(CashflowCategory.INCOME)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing IncomeType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" incomeType \u003d IncomeType.valueOf(stringType.toUpperCase());","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for IncomeType\");","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be one of the following: \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" \"salary, investments, allowance, others\");","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"YFshadaow"},"content":" if (rawCommand.extraArgs.containsKey(\"r\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing recur as integer\");","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"YFshadaow"},"content":" recur \u003d Integer.parseInt(rawCommand.extraArgs.get(\"r\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for recur\");","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Recurrence must be an integer\");","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"r\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" if (recur \u003c 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for recur\");","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Recurring value cannot be negative\");","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"NeoMinWei"},"content":" if (rawCommand.extraArgs.containsKey(\"d\")) {","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Getting description of cashflow\");","lastModifiedDate":"2023-10-28"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" String line \u003d rawCommand.extraArgs.get(\"d\");","lastModifiedDate":"2023-10-28"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" if (line.isBlank()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Empty description\");","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Description cannot be left empty\");","lastModifiedDate":"2023-10-28"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" description \u003d line.trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" rawCommand.extraArgs.remove(\"d\");","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":106,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":114,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" assert recur \u003e\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" assert amount \u003e\u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" if (category.equals(CashflowCategory.EXPENSE)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"NeoMinWei"},"content":" assert expenseType.equals(ExpenseType.DINING) || expenseType.equals(ExpenseType.ENTERTAINMENT)","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.SHOPPING) || expenseType.equals(ExpenseType.TRAVEL)","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.INSURANCE) || expenseType.equals(ExpenseType.OTHERS)","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":" || expenseType.equals(ExpenseType.NECESSITIES);","lastModifiedDate":"2023-10-23"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" } else if (category.equals(CashflowCategory.INCOME)) {","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" assert incomeType.equals(IncomeType.SALARY) || incomeType.equals(IncomeType.INVESTMENTS)","lastModifiedDate":"2023-10-22"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":" || incomeType.equals(IncomeType.ALLOWANCE) || incomeType.equals(IncomeType.OTHERS);","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"YFshadaow"},"content":" switch (category) {","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-08"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addIncome(amount, incomeType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":132,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-08"},{"lineNumber":133,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.addExpense(amount, expenseType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":" deductFromBudget(cashflowList.list.get(cashflowList.list.size() - 1));","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":138,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":139,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" private static void deductFromBudget(Cashflow entry) {","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" double expenseAmount \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":" Budget.deduct(expenseAmount);","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" ui.printBudgetAfterDeduction();","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":103,"ryan1604":9,"YFshadaow":37}},{"path":"src/main/java/seedu/financialplanner/commands/AddReminderCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.reminder.ReminderList;","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.reminder.Reminder;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class AddReminderCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private final String type;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private final String date;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" public AddReminderCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" String typeString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"t\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Reminder must have a type\");","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" type \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"d\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Reminder must have a date\");","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" date \u003d rawCommand.extraArgs.get(\"d\");","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"d\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" String unknownExtraArgument \u003d new java.util.ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" ReminderList.INSTANCE.list.add(new Reminder(type, date));","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Reminder added!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":1,"hshiah":30,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/AddStockCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class AddStockCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" private final String stockCode;","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public AddStockCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.containsKey(\"s\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Stock code cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing stockcode from input\");","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" stockCode \u003d rawCommand.extraArgs.get(\"s\").toUpperCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" rawCommand.extraArgs.remove(\"s\");","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" String stockName;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"adding stock to watchlist\");","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" stockName \u003d watchList.addStock(stockCode);","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" assert stockName !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" ui.printAddStock(stockName);","lastModifiedDate":"2023-10-09"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Error adding stock to watchlist\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"wwweert123":31,"NeoMinWei":2,"YFshadaow":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/BalanceCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class BalanceCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" public BalanceCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Balance: \" + getBalanceString());","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" private String getBalanceString() {","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(Cashflow.getBalance(), 2));","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"NeoMinWei":1,"ryan1604":27}},{"path":"src/main/java/seedu/financialplanner/commands/BudgetCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"public class BudgetCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":" private final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private double budget;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" private String command;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public BudgetCommand(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" command \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" if (command.equals(\"delete\") || command.equals(\"reset\") || command.equals(\"view\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" validateCommandFormat(rawCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" validateBudget(rawCommand);","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" assert budget \u003e 0 \u0026\u0026 budget \u003c\u003d Cashflow.getBalance() : \"Budget should be greater than 0 and less than \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" \"or equal to total balance\";","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" rawCommand.extraArgs.remove(\"b\");","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" private void validateBudget(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Parsing budget as double\");","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" budget \u003d Double.parseDouble(rawCommand.extraArgs.get(\"b\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget\");","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Budget must be a number.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" if (budget \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget should be greater than 0.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" if (budget \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid value for budget\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget should be lower than total balance.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" private void validateCommandFormat(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" if (!command.equals(\"set\") \u0026\u0026 !command.equals(\"update\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid arguments for budget command\");","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Budget command must be one of the following: set, update, \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" \"delete, reset, view.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" if (command.equals(\"set\") \u0026\u0026 Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid command: Trying to set existing budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"There is an existing budget, did you mean update?\");","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" } else if (command.equals(\"update\") \u0026\u0026 !Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Invalid command: Trying to update non-existent budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"There is no budget set yet, did you mean set?\");","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.containsKey(\"b\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.WARNING, \"Missing argument /b in command\");","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Missing /b argument.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" assert command.equals(\"set\") || command.equals(\"update\") || command.equals(\"delete\") ||","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" command.equals(\"reset\") || command.equals(\"view\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" switch (command) {","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" case \"set\":","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" setBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" case \"update\":","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" updateBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" case \"delete\":","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" case \"reset\":","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" case \"view\":","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" viewBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Unknown command.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" private void viewBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":" ui.printBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"view\");","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" private void resetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" if (Budget.getInitialBudget() !\u003d Budget.getCurrentBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" if (Budget.getInitialBudget() \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" Budget.setInitialBudget(Cashflow.getBalance());","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetExceedBalance();","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":" Budget.resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":" ui.printResetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" } else if (!Budget.hasBudget()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"delete\");","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"reset\");","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" private void deleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" ui.printDeleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetError(\"delete\");","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" private void updateBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Updating budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetBeforeUpdate();","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(budget);","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":" ui.printBudgetAfterUpdate();","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":" private void setBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.INFO, \"Setting budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(budget);","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" ui.printSetBudget();","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":2,"ryan1604":145}},{"path":"src/main/java/seedu/financialplanner/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":" public abstract void execute() throws Exception;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":4,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/DeleteCashflowCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class DeleteCashflowCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" protected CashflowCategory category \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" protected int index;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" public DeleteCashflowCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" String stringIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" String stringCategory \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"NeoMinWei"},"content":" if (rawCommand.args.size() \u003d\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" stringIndex \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" } else if (rawCommand.args.size() \u003d\u003d 2) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" stringCategory \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" handleInvalidCategory(stringCategory);","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" stringIndex \u003d rawCommand.args.get(1);","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Incorrect arguments.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing index as integer\");","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" index \u003d Integer.parseInt(stringIndex);","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid argument for index\");","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be an integer\");","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" if (index \u003d\u003d 0) {","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid value for index\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" private void handleInvalidCategory(String stringCategory) {","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Parsing CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" category \u003d CashflowCategory.valueOf(stringCategory.toUpperCase());","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Invalid arguments for CashflowCategory\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" if (category \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"YFshadaow"},"content":" handleDeleteCashflowWithoutCategory();","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"YFshadaow"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" assert category.equals(CashflowCategory.INCOME) || category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" assert index !\u003d 0;","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" switch (category) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" case INCOME:","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" case EXPENSE:","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" handleDeleteCashflowWithCategory();","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Unidentified entry.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" private void handleDeleteCashflowWithoutCategory() {","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Deleting cashflow without category\");","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" double amount \u003d cashflowList.deleteCashflowWithoutCategory(index);","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(amount);","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Index out of list\");","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"NeoMinWei"},"content":" private void handleDeleteCashflowWithCategory() {","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.INFO, \"Deleting cashflow with category\");","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"NeoMinWei"},"content":" double amount \u003d cashflowList.deleteCashflowWithCategory(category, index);","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" if (Budget.hasBudget()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(amount);","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"NeoMinWei"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":" logger.log(Level.WARNING, \"Index out of list\");","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" throw new IllegalArgumentException(\"Index must be within the list\");","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":83,"ryan1604":7,"YFshadaow":12}},{"path":"src/main/java/seedu/financialplanner/commands/DeleteStockCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"public class DeleteStockCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":" private final String stockCode;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" public DeleteStockCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"s\")) {","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Stock code cannot be empty\");","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing stockcode from input\");","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" stockCode \u003d rawCommand.extraArgs.get(\"s\").toUpperCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"s\");","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" String stockName;","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"deleting stock from watchlist\");","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" stockName \u003d watchList.deleteStock(stockCode);","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" assert stockName !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" ui.printDeleteStock(stockName);","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Error deleting stock from watchlist\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"wwweert123":46,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":" public ExitCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":15,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" private final String description;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" public FindCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" this.description \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" ArrayList\u003cString\u003e foundedFinancialList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" ArrayList\u003cString\u003e foundedWatchList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" for (int i \u003d 0; i \u003c cashflowList.list.size(); i++) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" if (cashflowList.list.get(i).toString().contains(description)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" String output \u003d cashflowList.list.get(i).toString() + \" | Index: \" + (i + 1);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" foundedFinancialList.add(output);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"hshiah"},"content":" if (!foundedFinancialList.isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"Here are the matching financial records in your financial list:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"hshiah"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"There is no matching financial record in your financial list.\");","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"hshiah"},"content":" for (String foundedFinancialRecord : foundedFinancialList) {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"hshiah"},"content":" ui.showMessage(foundedFinancialRecord);","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"hshiah"},"content":" for (int i \u003d 0; i \u003c watchList.size(); i++) {","lastModifiedDate":"2023-10-12"},{"lineNumber":43,"author":{"gitId":"hshiah"},"content":" if (watchList.get(i).toString().contains(description)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"hshiah"},"content":" foundedWatchList.add(watchList.get(i).toString() + \" | Index: \" + (i + 1));","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"hshiah"},"content":" if (!foundedWatchList.isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"Here are the matching stock records in your stock list:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"hshiah"},"content":" } else {","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"hshiah"},"content":" ui.showMessage(\"There is no matching stock record in your stock list.\");","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"hshiah"},"content":" for (String foundedStockRecord : foundedWatchList) {","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"hshiah"},"content":" ui.showMessage(foundedStockRecord);","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":3,"hshiah":43,"ryan1604":2,"YFshadaow":7}},{"path":"src/main/java/seedu/financialplanner/commands/InvalidCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"public class InvalidCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":" public InvalidCommand() {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Unknown command. Please try again.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":1,"YFshadaow":11,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" protected CashflowCategory category \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" public ListCommand(RawCommand rawCommand) throws IllegalArgumentException{","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" String stringCategory \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" if (rawCommand.args.size() \u003d\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" stringCategory \u003d rawCommand.args.get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" } else if (rawCommand.args.size() \u003e 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Incorrect arguments.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" if (stringCategory !\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" category \u003d CashflowCategory.valueOf(stringCategory.toUpperCase());","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Entry must be either income or expense\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"YFshadaow"},"content":" private boolean shouldPrintCashFlow(Cashflow cashflow) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" if (category \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" return true;","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" if (cashflow instanceof Income) {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"YFshadaow"},"content":" return category.equals(CashflowCategory.INCOME);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":" if (cashflow instanceof Expense) {","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" return category.equals(CashflowCategory.EXPENSE);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" return false;","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" List\u003cCashflow\u003e cashflowList \u003d CashflowList.getInstance().list;","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"YFshadaow"},"content":" List\u003cCashflow\u003e cashflowToBePrinted \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" for (Cashflow flow : cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"YFshadaow"},"content":" if (!shouldPrintCashFlow(flow)) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"YFshadaow"},"content":" continue;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"YFshadaow"},"content":" cashflowToBePrinted.add(flow);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"YFshadaow"},"content":" if (cashflowToBePrinted.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(\"No matching cash flow\");","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"YFshadaow"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" ui.showMessage(String.format(\"You have %d matching cash flow:\", cashflowToBePrinted.size()));","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"YFshadaow"},"content":" for (int i \u003d 0; i \u003c cashflowToBePrinted.size(); i +\u003d 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" ui.showMessage((i + 1) + \": \" + cashflowToBePrinted.get(i));","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":8,"YFshadaow":59,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/OverviewCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.reminder.Reminder;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.reminder.ReminderList;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public class OverviewCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public OverviewCommand(RawCommand rawCommand) {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" public void execute() throws Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" String balance \u003d getBalance();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" String highestIncome \u003d getHighestIncome();","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" String highestExpense \u003d getHighestExpense();","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" String budget \u003d getBudgetDesc();","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" String reminders \u003d getReminders();","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" Ui.getInstance().printOverview(balance, highestIncome, highestExpense, budget, reminders);","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" //todo: goal disparity","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" private String getBudgetDesc() {","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" return Budget.getCurrentBudgetString();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" private String getHighestIncome() {","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" double maxIncome \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" String incomeType \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" if (entry instanceof Income \u0026\u0026 entry.getAmount() \u003e maxIncome) {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" maxIncome \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" incomeType \u003d entry.capitalize(entry.getIncomeType().","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" toString().toLowerCase()); // Capitalise the first letter","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" if (incomeType.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" return \"No income added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(maxIncome) + \" Category: \" + incomeType;","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" private String getHighestExpense() {","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" double maxExpense \u003d 0;","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" String expenseType \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" if (entry instanceof Expense \u0026\u0026 entry.getAmount() \u003e maxExpense) {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" maxExpense \u003d entry.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" expenseType \u003d entry.capitalize(entry.getExpenseType().","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" toString().toLowerCase()); // Capitalise the first letter","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" if (expenseType.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" return \"No expense added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(maxExpense) + \" Category: \" + expenseType;","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" private String formatDoubleToString(double amount) {","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" return decimalFormat.format(Cashflow.round(amount, 2));","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" private String getReminders() {","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" ReminderList reminderList \u003d ReminderList.INSTANCE;","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" if (reminderList.list.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" return \"No reminders added yet.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" StringBuilder reminders \u003d new StringBuilder();","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" int count \u003d 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" for (Reminder reminder : reminderList.list) {","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" reminders.append(count).append(\". \").append(reminder.toString()).append(\"\\n\");","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" count++;","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" return reminders.toString();","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" private String getBalance() {","lastModifiedDate":"2023-10-28"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" return formatDoubleToString(Cashflow.getBalance());","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"NeoMinWei":5,"ryan1604":97}},{"path":"src/main/java/seedu/financialplanner/commands/RawCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"YFshadaow"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"public class RawCommand {","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":" public final List\u003cString\u003e args \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":" public final Map\u003cString, String\u003e extraArgs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":" protected String commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" public RawCommand(String name, List\u003cString\u003e args, Map\u003cString, String\u003e extraArgs) {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" this.commandName \u003d name;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"YFshadaow"},"content":" this.args.addAll(args);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" this.extraArgs.putAll(extraArgs);","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" @SuppressWarnings(\"unused\")","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" public String getCommandName() {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":" return commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" @SuppressWarnings(\"unused\")","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" public void setCommandName(String commandName) {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":" this.commandName \u003d commandName;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"YFshadaow":28}},{"path":"src/main/java/seedu/financialplanner/commands/SetGoalCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.goal.Goal;","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.goal.GoalList;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"public class SetGoalCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private final String goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" private int amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public SetGoalCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" String labelString \u003d String.join(\" \", rawCommand.args);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"g\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Goal must have an amount\");","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" try{","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" amount \u003d Integer.parseInt(rawCommand.extraArgs.get(\"g\"));","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":" } catch (IllegalArgumentException e){","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Amount must be a number\");","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"g\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.containsKey(\"l\")){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(\"Please specify the content of the goal\");","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" goal \u003d rawCommand.extraArgs.get(\"l\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" rawCommand.extraArgs.remove(\"l\");","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" if(!rawCommand.extraArgs.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" String unknownExtraArgument \u003d new java.util.ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"hshiah"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"hshiah"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"hshiah"},"content":" GoalList.INSTANCE.list.add(new Goal(goal, amount));","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" Ui.getInstance().showMessage(\"Set Goal Successfully!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":1,"hshiah":34,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/VisCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.visualisations.Categorizer;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.visualisations.Visualizer;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"public class VisCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" private String type;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private String chart;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" public VisCommand(RawCommand rawCommand) throws IllegalArgumentException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"t\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Entry type must be defined\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.containsKey(\"c\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(\"Chart type must be defined\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Parsing entry type and chart type\");","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" this.type \u003d rawCommand.extraArgs.get(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"t\");","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" this.chart \u003d rawCommand.extraArgs.get(\"c\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" rawCommand.extraArgs.remove(\"c\");","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" public void execute() throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" assert !chart.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" assert !type.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.printDisplayChart(type, chart);","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" Visualizer.displayChart(chart, Categorizer.sortType(CashflowList.getInstance(), type), type);","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":45,"NeoMinWei":1,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/commands/WatchListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"public class WatchListCommand extends Command {","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"YFshadaow"},"content":" public WatchListCommand(RawCommand rawCommand) throws IllegalArgumentException{","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" if (!rawCommand.extraArgs.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.WARNING, \"Invalid extra arguments found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"YFshadaow"},"content":" String unknownExtraArgument \u003d new ArrayList\u003c\u003e(rawCommand.extraArgs.keySet()).get(0);","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" assert unknownExtraArgument !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(String.format(\"Unknown extra argument: %s\", unknownExtraArgument));","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" ui.printWatchListHeader();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" watchList.getLatestWatchlistInfo();","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Printing watchlist\");","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" ui.printStocksInfo(watchList);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"wwweert123":24,"NeoMinWei":3,"YFshadaow":8,"ryan1604":3}},{"path":"src/main/java/seedu/financialplanner/enumerations/CashflowCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum CashflowCategory {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":" INCOME, EXPENSE","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":4,"YFshadaow":1}},{"path":"src/main/java/seedu/financialplanner/enumerations/ExpenseType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum ExpenseType {","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":" DINING, ENTERTAINMENT, SHOPPING, TRAVEL, INSURANCE, NECESSITIES, OTHERS","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"src/main/java/seedu/financialplanner/enumerations/IncomeType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.enumerations;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"public enum IncomeType {","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":" SALARY, INVESTMENTS, ALLOWANCE, OTHERS","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"NeoMinWei":5}},{"path":"src/main/java/seedu/financialplanner/exceptions/FinancialPlannerException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.exceptions;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"public class FinancialPlannerException extends Exception {","lastModifiedDate":"2023-10-07"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":" public FinancialPlannerException(String message) {","lastModifiedDate":"2023-10-07"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":" super(message);","lastModifiedDate":"2023-10-07"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"ryan1604":7}},{"path":"src/main/java/seedu/financialplanner/goal/Goal.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class Goal {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" private String label;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" private int amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private boolean isDone \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" public Goal(String label, int amount) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" this.label \u003d label;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" public String toString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" return \"Goal: \" + this.label + \" | \" + this.amount + \" | \" + status;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" public void markAsDone() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" //TODO edit the expense to mark the goal as done","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" this.isDone \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" //TODO delete the Reminder","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" public String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" return this.label + \" | \" + this.amount + \" | \" + this.isDone;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":24,"ryan1604":4}},{"path":"src/main/java/seedu/financialplanner/goal/GoalList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.goal;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class GoalList {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" public static final GoalList INSTANCE \u003d new GoalList();","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" public ArrayList\u003cGoal\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private GoalList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public void load(Goal goal) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" list.add(goal);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" //TODO deleteGoal","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/investments/Stock.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONArray;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.Serializable;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.time.Duration;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"public class Stock implements Serializable {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" private static final String API_ENDPOINT \u003d \"https://www.alphavantage.co/query?function\u003dSYMBOL_SEARCH\u0026keywords\u003d\";","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private static final String API_KEY \u003d \"LNKL0548PHY2F0QU\";","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" private String symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" private String exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" private String stockName;","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" private String price;","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" private String dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" private String dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" private Date lastUpdated \u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" private long lastFetched \u003d 0;","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" public Stock(String symbol) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" this.symbol \u003d symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" this.stockName \u003d getStockNameFromAPI(symbol);","lastModifiedDate":"2023-10-13"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" public String getStockName() {","lastModifiedDate":"2023-10-09"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" return stockName;","lastModifiedDate":"2023-10-09"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" public String getStockNameFromAPI(String symbol) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" String requestURI \u003d String.format(\"%s%s\u0026apikey\u003d%s\", API_ENDPOINT,symbol,API_KEY);","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" HttpRequest request \u003d HttpRequest.newBuilder(URI.create(requestURI))","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" .header(\"accept\", \"application/json\")","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" .GET()","lastModifiedDate":"2023-10-08"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":" .timeout(Duration.ofSeconds(10))","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" .build();","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Requesting API for stock info\");","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" Object obj \u003d new JSONParser().parse(response.body());","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" JSONObject jsonObject \u003d (JSONObject) obj;","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" JSONArray ja \u003d (JSONArray) jsonObject.get(\"bestMatches\");","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":" if (ja \u003d\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"API limit Reached\");","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" if (ja.isEmpty()) {","lastModifiedDate":"2023-10-09"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock not found\");","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" JSONObject stock \u003d (JSONObject) ja.get(0);","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" String symbolFound \u003d (String) stock.get(\"1. symbol\");","lastModifiedDate":"2023-10-13"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" // TODO: Separate based on market","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" // TODO: testing","lastModifiedDate":"2023-10-09"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" if (!symbolFound.equals(symbol)) {","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock not found\");","lastModifiedDate":"2023-10-09"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" assert stock.get(\"2. name\") !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" return (String) stock.get(\"2. name\");","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" } catch (InterruptedException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":" public String getSymbol() {","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" return symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":" public void setSymbol(String symbol) {","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" this.symbol \u003d symbol;","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":" public String toString() {","lastModifiedDate":"2023-10-08"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" return symbol + \",\";","lastModifiedDate":"2023-10-08"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":" public String getPrice() {","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":" return price;","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":" public void setPrice(String price) {","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":" this.price \u003d price;","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"wwweert123"},"content":" public String getExchange() {","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"wwweert123"},"content":" return exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":" public void setExchange(String exchange) {","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":" this.exchange \u003d exchange;","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":" public String getDayHigh() {","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":" return dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":" public void setDayHigh(String dayHigh) {","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":" this.dayHigh \u003d dayHigh;","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"wwweert123"},"content":" public String getDayLow() {","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"wwweert123"},"content":" return dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"wwweert123"},"content":" public void setDayLow(String dayLow) {","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"wwweert123"},"content":" this.dayLow \u003d dayLow;","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"wwweert123"},"content":" public Date getLastUpdated() {","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"wwweert123"},"content":" return lastUpdated;","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":131,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":132,"author":{"gitId":"wwweert123"},"content":" public void setLastUpdated(Date lastUpdated) {","lastModifiedDate":"2023-10-29"},{"lineNumber":133,"author":{"gitId":"wwweert123"},"content":" this.lastUpdated \u003d lastUpdated;","lastModifiedDate":"2023-10-29"},{"lineNumber":134,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":135,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":136,"author":{"gitId":"wwweert123"},"content":" public long getLastFetched() {","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"wwweert123"},"content":" return lastFetched;","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"wwweert123"},"content":" public void setLastFetched(long lastFetched) {","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"wwweert123"},"content":" this.lastFetched \u003d lastFetched;","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":142,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/investments/WatchList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONArray;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.JSONObject;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.JSONParser;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.json.simple.parser.ParseException;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.storage.LoadData;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.net.URI;","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpClient;","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpRequest;","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.net.http.HttpResponse;","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.time.Duration;","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":"public class WatchList {","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private static WatchList watchlist \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" private static Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" private static final String API_ENDPOINT \u003d \"https://financialmodelingprep.com/api/v3/quote/\";","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" private static final String API_KEY \u003d \"iFumtYryBCbHpS3sDqLdVKi2SdP63vSV\";","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" private HashMap\u003cString, Stock\u003e stocks \u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"YFshadaow"},"content":" private WatchList() {","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" stocks \u003d LoadData.loadWatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" if (!stocks.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Initializing New watchlist.. adding AAPL and GOOGL for your reference\");","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" Stock apple \u003d new Stock(\"AAPL\");","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" assert apple.getSymbol() !\u003d null \u0026\u0026 apple.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" stocks.put(apple.getSymbol(), apple);","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" Stock google \u003d new Stock(\"GOOGL\");","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" assert google.getSymbol() !\u003d null \u0026\u0026 google.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" stocks.put(google.getSymbol(), google);","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" public static WatchList getInstance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" if (watchlist \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" watchlist \u003d new WatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" return watchlist;","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" public void getLatestWatchlistInfo() throws FinancialPlannerException {","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" StringBuilder queryStocks \u003d getExpiredStocks();","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":" fetchFMPStockPrices(queryStocks);","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" public StringBuilder getExpiredStocks() {","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" StringBuilder queryStocks \u003d new StringBuilder();","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" long currentTime \u003d System.currentTimeMillis();","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" long fivemin \u003d 300000;","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" for (Map.Entry\u003cString, Stock\u003e set: stocks.entrySet()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" if (set.getValue().getLastFetched() + fivemin \u003c currentTime) {","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" queryStocks.append(set.getKey());","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" queryStocks.append(\",\");","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" return queryStocks;","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":" public void fetchFMPStockPrices(StringBuilder queryStocks) throws FinancialPlannerException {","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" if (stocks.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Empty Watchlist. Nothing to display...\");","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" if (queryStocks.toString().isEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" // all stocks prices are up-to-date, just display","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" return;","lastModifiedDate":"2023-10-29"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":" HttpClient client \u003d HttpClient.newHttpClient();","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" String requestURI \u003d String.format(\"%s%s?apikey\u003d%s\", API_ENDPOINT, queryStocks, API_KEY);","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" HttpRequest request \u003d HttpRequest.newBuilder(URI.create(requestURI))","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":" .header(\"accept\", \"application/json\")","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":" .GET()","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" .timeout(Duration.ofSeconds(10))","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" .build();","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":" Object obj;","lastModifiedDate":"2023-10-09"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Requesting API endpoint FMP\");","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-08"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" HttpResponse\u003cString\u003e response \u003d client.send(request, HttpResponse.BodyHandlers.ofString());","lastModifiedDate":"2023-10-08"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":" // System.out.println(response.body());","lastModifiedDate":"2023-10-08"},{"lineNumber":96,"author":{"gitId":"wwweert123"},"content":" obj \u003d new JSONParser().parse(response.body());","lastModifiedDate":"2023-10-09"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Cant request API endpoint\");","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":" } catch (InterruptedException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Interrupted\");","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":" } catch (ParseException e) {","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.SEVERE, \"Could not parse to JSON\");","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"wwweert123"},"content":" throw new RuntimeException(e);","lastModifiedDate":"2023-10-08"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":" extractWatchlistInfoFromJSONArray((JSONArray) obj);","lastModifiedDate":"2023-10-29"},{"lineNumber":108,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":110,"author":{"gitId":"wwweert123"},"content":" public void extractWatchlistInfoFromJSONArray(JSONArray jsonstocks) throws FinancialPlannerException {","lastModifiedDate":"2023-10-29"},{"lineNumber":111,"author":{"gitId":"wwweert123"},"content":" if (jsonstocks.isEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":112,"author":{"gitId":"wwweert123"},"content":" return;","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"wwweert123"},"content":" long fetchTime \u003d System.currentTimeMillis();","lastModifiedDate":"2023-10-29"},{"lineNumber":115,"author":{"gitId":"wwweert123"},"content":" for (Object jo : jsonstocks) {","lastModifiedDate":"2023-10-29"},{"lineNumber":116,"author":{"gitId":"wwweert123"},"content":" JSONObject stock \u003d (JSONObject) jo;","lastModifiedDate":"2023-10-22"},{"lineNumber":117,"author":{"gitId":"wwweert123"},"content":" if (stocks.containsKey(stock.get(\"symbol\").toString().toUpperCase())) {","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"wwweert123"},"content":" Stock stockLocal \u003d stocks.get(stock.get(\"symbol\").toString().toUpperCase());","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"wwweert123"},"content":" extractStockInfoFromJSONObject(stock, stockLocal, fetchTime);","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":123,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":124,"author":{"gitId":"wwweert123"},"content":" public void extractStockInfoFromJSONObject(JSONObject stock, Stock stockLocal, long fetchTime) {","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"wwweert123"},"content":" stockLocal.setLastFetched(fetchTime);","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"wwweert123"},"content":" String price \u003d stock.get(\"price\").toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"wwweert123"},"content":" assert price !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"wwweert123"},"content":" stockLocal.setPrice(price);","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":131,"author":{"gitId":"wwweert123"},"content":" String exchange \u003d stock.get(\"exchange\").toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":132,"author":{"gitId":"wwweert123"},"content":" assert exchange !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":133,"author":{"gitId":"wwweert123"},"content":" stockLocal.setExchange(exchange);","lastModifiedDate":"2023-10-29"},{"lineNumber":134,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":135,"author":{"gitId":"wwweert123"},"content":" String dayHigh \u003d stock.get(\"dayHigh\").toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":136,"author":{"gitId":"wwweert123"},"content":" assert dayHigh !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"wwweert123"},"content":" stockLocal.setDayHigh(dayHigh);","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"wwweert123"},"content":" String dayLow \u003d stock.get(\"dayLow\").toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"wwweert123"},"content":" assert dayLow !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"wwweert123"},"content":" stockLocal.setDayLow(dayLow);","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"wwweert123"},"content":" String timestamp \u003d stock.get(\"timestamp\").toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":144,"author":{"gitId":"wwweert123"},"content":" long lastUpdated \u003d Long.parseLong(timestamp) * 1000;","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"wwweert123"},"content":" stockLocal.setLastUpdated(new Date(lastUpdated));","lastModifiedDate":"2023-10-29"},{"lineNumber":146,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":147,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":148,"author":{"gitId":"wwweert123"},"content":" public String addStock(String stockCode) throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":149,"author":{"gitId":"wwweert123"},"content":" if (stocks.size() \u003e\u003d 5) {","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Watchlist is full (max 5). Delete a stock to add a new one\");","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"wwweert123"},"content":" if (stocks.containsKey(stockCode.toUpperCase())) { // should already be uppercase","lastModifiedDate":"2023-10-29"},{"lineNumber":153,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Stock is already present in Watchlist. Use watchlist to view it!\");","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"wwweert123"},"content":" Stock newStock;","lastModifiedDate":"2023-10-29"},{"lineNumber":157,"author":{"gitId":"wwweert123"},"content":" newStock \u003d new Stock(stockCode);","lastModifiedDate":"2023-10-13"},{"lineNumber":158,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":159,"author":{"gitId":"wwweert123"},"content":" assert newStock.getSymbol() !\u003d null \u0026\u0026 newStock.getStockName() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"wwweert123"},"content":" stocks.put(newStock.getSymbol(), newStock);","lastModifiedDate":"2023-10-29"},{"lineNumber":161,"author":{"gitId":"wwweert123"},"content":" return newStock.getStockName();","lastModifiedDate":"2023-10-09"},{"lineNumber":162,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":163,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":164,"author":{"gitId":"wwweert123"},"content":" public String deleteStock(String stockCode) throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":165,"author":{"gitId":"wwweert123"},"content":" if (stocks.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"No stock in watchlist!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":168,"author":{"gitId":"wwweert123"},"content":" Stock removedStock \u003d stocks.remove(stockCode.toUpperCase()); // should be uppercase already","lastModifiedDate":"2023-10-29"},{"lineNumber":169,"author":{"gitId":"wwweert123"},"content":" if (removedStock \u003d\u003d null) {","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(\"Does not Exist in Watchlist\");","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"wwweert123"},"content":" return removedStock.getStockName();","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":174,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":175,"author":{"gitId":"hshiah"},"content":" public int size() {","lastModifiedDate":"2023-10-12"},{"lineNumber":176,"author":{"gitId":"hshiah"},"content":" return stocks.size();","lastModifiedDate":"2023-10-12"},{"lineNumber":177,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":178,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":179,"author":{"gitId":"hshiah"},"content":" public Stock get(int index) {","lastModifiedDate":"2023-10-12"},{"lineNumber":180,"author":{"gitId":"hshiah"},"content":" return stocks.get(index);","lastModifiedDate":"2023-10-12"},{"lineNumber":181,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":182,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":183,"author":{"gitId":"wwweert123"},"content":" public HashMap\u003cString, Stock\u003e getStocks() {","lastModifiedDate":"2023-10-29"},{"lineNumber":184,"author":{"gitId":"wwweert123"},"content":" return stocks;","lastModifiedDate":"2023-10-22"},{"lineNumber":185,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":186,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":187,"author":{"gitId":"wwweert123"},"content":" public void setStocks(HashMap\u003cString, Stock\u003e stocks) {","lastModifiedDate":"2023-10-29"},{"lineNumber":188,"author":{"gitId":"wwweert123"},"content":" this.stocks \u003d stocks;","lastModifiedDate":"2023-10-23"},{"lineNumber":189,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":190,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"wwweert123":181,"YFshadaow":1,"hshiah":8}},{"path":"src/main/java/seedu/financialplanner/reminder/Reminder.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.reminder;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"public class Reminder {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":" private String type;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" private String date;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" private boolean isDone \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" public Reminder(String type, String date) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" public String toString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"hshiah"},"content":" return \"Reminder: \" + this.type + \" | \" + this.date + \" | \" + status;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"hshiah"},"content":" public void markAsDone() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"hshiah"},"content":" this.isDone \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"hshiah"},"content":" /*","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"hshiah"},"content":" * Returns a string that can be saved to a file.","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"hshiah"},"content":" * Format: type | date | isDone","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"hshiah"},"content":" * Example: \"Reminder: Birthday | 2020-10-10 | false\"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"hshiah"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"hshiah"},"content":" public String formatString() {","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"hshiah"},"content":" String status \u003d isDone ? \"Done\" : \"Not Done\";","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"hshiah"},"content":" return this.type + \" | \" + this.date + \" | \" + this.isDone;","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":29,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/reminder/ReminderList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"hshiah"},"content":"package seedu.financialplanner.reminder;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"hshiah"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"hshiah"},"content":"public class ReminderList {","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"hshiah"},"content":" public static final ReminderList INSTANCE \u003d new ReminderList();","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"hshiah"},"content":" public ArrayList\u003cReminder\u003e list \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"hshiah"},"content":" private ReminderList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"hshiah"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"hshiah"},"content":" public void load(Reminder reminder) {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"hshiah"},"content":" list.add(reminder);","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"hshiah"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"hshiah"},"content":" //TODO deleteReminder","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"hshiah"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"hshiah":13,"ryan1604":1}},{"path":"src/main/java/seedu/financialplanner/storage/LoadData.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.Stock;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.io.StreamCorruptedException;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.io.FileInputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"import java.io.FileReader;","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.io.ObjectInputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"public abstract class LoadData {","lastModifiedDate":"2023-10-10"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" private static final String FILE_PATH \u003d \"data/watchlist.txt\";","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" private static final Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" public static void load(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" Scanner inputFile \u003d new Scanner(new FileReader(filePath));","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" String line;","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Loading existing file...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" while(inputFile.hasNext()) {","lastModifiedDate":"2023-10-10"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" line \u003d inputFile.nextLine();","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" String[] split \u003d line.split(\"\\\\|\");","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" String type \u003d split[0].trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" switch (type) {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" case \"I\":","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" case \"E\":","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" final Cashflow entry \u003d getEntry(type, split);","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" cashflowList.load(entry);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" case \"B\":","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" loadBudget(split);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error loading file\");","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" inputFile.close();","lastModifiedDate":"2023-10-10"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"File not found. Creating new file...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException | FinancialPlannerException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" String message \u003d e.getMessage();","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" handleCorruptedFile(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" private static void handleCorruptedFile(String message) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"File appears to be corrupted. Do you want to create a new file? (Y/N)\");","lastModifiedDate":"2023-10-10"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" if (createNewFile()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" Cashflow.clearBalance();","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" } else {","lastModifiedDate":"2023-10-10"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Please fix the corrupted file, \" +","lastModifiedDate":"2023-10-10"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" \"which can be found in data/data.txt.\\nError message: \" + message);","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" private static void loadBudget(String[] split) throws IllegalArgumentException {","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" double initial \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" double current \u003d Double.parseDouble(split[2].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" if (initial \u003d\u003d 0 \u0026\u0026 current \u003d\u003d 0) {","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" return;","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" if (initial \u003c 0 || current \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Negative values for budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" if (initial \u003e Cashflow.getBalance() || current \u003e Cashflow.getBalance()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Budget exceeds balance\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" if (initial \u003c current) {","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Current budget exceeds initial budget\");","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" Budget.load(initial, current);","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" private static boolean createNewFile() {","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" String line \u003d ui.input();","lastModifiedDate":"2023-10-10"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" while (!line.equalsIgnoreCase(\"y\") \u0026\u0026 !line.equalsIgnoreCase(\"n\")) {","lastModifiedDate":"2023-10-10"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" ui.showMessage(\"Unknown input. Please enter Y or N only.\");","lastModifiedDate":"2023-10-10"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" line \u003d ui.input();","lastModifiedDate":"2023-10-10"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" return line.equalsIgnoreCase(\"y\");","lastModifiedDate":"2023-10-10"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":98,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":99,"author":{"gitId":"NeoMinWei"},"content":" private static Cashflow getEntry(String type, String[] split)","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"NeoMinWei"},"content":" throws FinancialPlannerException, IllegalArgumentException {","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":" double value;","lastModifiedDate":"2023-10-10"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":" int recur;","lastModifiedDate":"2023-10-10"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" Cashflow entry;","lastModifiedDate":"2023-10-10"},{"lineNumber":104,"author":{"gitId":"NeoMinWei"},"content":" String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" switch (type) {","lastModifiedDate":"2023-10-10"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" case \"I\":","lastModifiedDate":"2023-10-10"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" value \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" recur \u003d Integer.parseInt(split[3].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" description \u003d getDescription(split);","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" checkValidInput(value, recur);","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" IncomeType incomeType;","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" incomeType \u003d IncomeType.valueOf(split[2].trim().toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Invalid income type\");","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" entry \u003d new Income(value, incomeType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-10"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" case \"E\":","lastModifiedDate":"2023-10-10"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" value \u003d Double.parseDouble(split[1].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":" recur \u003d Integer.parseInt(split[3].trim());","lastModifiedDate":"2023-10-10"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" description \u003d getDescription(split);","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" checkValidInput(value, recur);","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":" ExpenseType expenseType;","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" expenseType \u003d ExpenseType.valueOf(split[2].trim().toUpperCase());","lastModifiedDate":"2023-10-23"},{"lineNumber":128,"author":{"gitId":"NeoMinWei"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" throw new IllegalArgumentException(\"Invalid expense type\");","lastModifiedDate":"2023-10-23"},{"lineNumber":130,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":131,"author":{"gitId":"NeoMinWei"},"content":" entry \u003d new Expense(value, expenseType, recur, description);","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-10"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-10"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error loading file\");","lastModifiedDate":"2023-10-10"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":" return entry;","lastModifiedDate":"2023-10-10"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":139,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"NeoMinWei"},"content":" private static String getDescription(String[] split) {","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"NeoMinWei"},"content":" String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"NeoMinWei"},"content":" if (split.length \u003e 4) {","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"NeoMinWei"},"content":" description \u003d split[4].trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"NeoMinWei"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"NeoMinWei"},"content":" description \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"NeoMinWei"},"content":" return description;","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"wwweert123"},"content":" public static HashMap\u003cString, Stock\u003e loadWatchList() {","lastModifiedDate":"2023-10-29"},{"lineNumber":151,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":152,"author":{"gitId":"wwweert123"},"content":" HashMap\u003cString, Stock\u003e stocksData \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":153,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":154,"author":{"gitId":"wwweert123"},"content":" ObjectInputStream watchListStocksInputStream","lastModifiedDate":"2023-10-23"},{"lineNumber":155,"author":{"gitId":"wwweert123"},"content":" \u003d new ObjectInputStream(","lastModifiedDate":"2023-10-23"},{"lineNumber":156,"author":{"gitId":"wwweert123"},"content":" new FileInputStream(FILE_PATH)","lastModifiedDate":"2023-10-23"},{"lineNumber":157,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-23"},{"lineNumber":158,"author":{"gitId":"wwweert123"},"content":" stocksData \u003d (HashMap\u003cString, Stock\u003e) watchListStocksInputStream.readObject();","lastModifiedDate":"2023-10-29"},{"lineNumber":159,"author":{"gitId":"wwweert123"},"content":" watchListStocksInputStream.close();","lastModifiedDate":"2023-10-23"},{"lineNumber":160,"author":{"gitId":"wwweert123"},"content":" } catch (StreamCorruptedException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":161,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Watchlist file corrupted.. Rebuilding\");","lastModifiedDate":"2023-10-23"},{"lineNumber":162,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Watchlist file not found... Creating\");","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"wwweert123"},"content":" } catch (ClassNotFoundException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"FIle appears to be corrupted...\");","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":167,"author":{"gitId":"wwweert123"},"content":" return stocksData;","lastModifiedDate":"2023-10-23"},{"lineNumber":168,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":" private static void checkValidInput(double value, int recur) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":" if (value \u003c 0 || recur \u003c 0) {","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Amount and number of days cannot be negative\");","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":27,"NeoMinWei":31,"ryan1604":115,"YFshadaow":2}},{"path":"src/main/java/seedu/financialplanner/storage/SaveData.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.io.FileOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-10"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.io.ObjectOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public abstract class SaveData {","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private static final String FILE_PATH \u003d \"data/watchlist.txt\";","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" private static final CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public static void save(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" FileWriter fw \u003d new FileWriter(filePath);","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" for (Cashflow entry : cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" fw.write(entry.formatString() + \"\\n\");","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" fw.write(Budget.formatString() + \"\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" fw.close();","lastModifiedDate":"2023-10-10"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" throw new FinancialPlannerException(\"Error saving file.\");","lastModifiedDate":"2023-10-10"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" public static void saveWatchList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" ObjectOutputStream watchListStocksOutput","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" \u003d new ObjectOutputStream(new FileOutputStream(FILE_PATH));","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" watchListStocksOutput.writeObject(wl.getStocks());","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" watchListStocksOutput.close();","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" ui.showMessage(\"Unable to save watchlist to file\");","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":21,"NeoMinWei":3,"ryan1604":22,"YFshadaow":1}},{"path":"src/main/java/seedu/financialplanner/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-10"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-10"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-10"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-10"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-10"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import java.nio.file.Paths;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"public class Storage {","lastModifiedDate":"2023-10-10"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":" private static Storage storage \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":" private final Path path \u003d Paths.get(\"data\");","lastModifiedDate":"2023-10-10"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":14,"author":{"gitId":"YFshadaow"},"content":" private Storage() {","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" if (!Files.exists(path)) {","lastModifiedDate":"2023-10-10"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-10"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" System.out.println(\"Directory doesn\u0027t exist. Creating directory...\");","lastModifiedDate":"2023-10-10"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" Files.createDirectory(path);","lastModifiedDate":"2023-10-10"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-10"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" System.out.println(\"Error creating directory: \" + e.getMessage());","lastModifiedDate":"2023-10-10"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" public static Storage getInstance() {","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" if (storage \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" storage \u003d new Storage();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" return storage;","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" public void load(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" LoadData.load(filePath);","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" public void save(String filePath) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" SaveData.save(filePath);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" SaveData.saveWatchList();","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-10"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-10"}],"authorContributionMap":{"wwweert123":2,"ryan1604":37,"YFshadaow":2}},{"path":"src/main/java/seedu/financialplanner/utils/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.utils;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.Command;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.AddStockCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.OverviewCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.AddCashflowCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.DeleteCashflowCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.FindCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.InvalidCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.ListCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.commands.RawCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.WatchListCommand;","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.VisCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.BudgetCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.commands.AddReminderCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"hshiah"},"content":"import seedu.financialplanner.commands.SetGoalCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.commands.BalanceCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.commands.DeleteStockCommand;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":"import java.util.Iterator;","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"YFshadaow"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"YFshadaow"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"public class Parser {","lastModifiedDate":"2023-10-07"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" private static final String EXIT_COMMAND \u003d \"exit\";","lastModifiedDate":"2023-10-07"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" private static final String WATCHLIST_COMMAND \u003d \"watchlist\";","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" private static final String ADD_CASHFLOW_COMMAND \u003d \"add\";","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" private static final String DELETE_CASHFLOW_COMMAND \u003d \"delete\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" private static final String ADD_STOCK_COMMAND \u003d \"addstock\";","lastModifiedDate":"2023-10-09"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" private static final String DELETE_STOCK_COMMAND \u003d \"deletestock\";","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"hshiah"},"content":" private static final String FIND_COMMAND \u003d \"find\";","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" private static final String OVERVIEW_COMMAND \u003d \"overview\";","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" private static final String BUDGET_COMMAND \u003d \"budget\";","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" private static final String VISUALIZATION_COMMAND \u003d \"vis\";","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"hshiah"},"content":" private static final String ADD_REMINDER_COMMAND \u003d \"addreminder\";","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" private static final String LIST_COMMAND \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"hshiah"},"content":" private static final String SET_GOAL_COMMAND \u003d \"set\";","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" private static final String BALANCE_COMMAND \u003d \"balance\";","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" public static Command parseCommand(String input) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"YFshadaow"},"content":" RawCommand rawCommand \u003d parseRawCommand(input);","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"YFshadaow"},"content":" return parseCommand(rawCommand);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public static Command parseCommand(RawCommand rawCommand) throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"YFshadaow"},"content":" switch (rawCommand.getCommandName()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" case EXIT_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"YFshadaow"},"content":" return new ExitCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" case WATCHLIST_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"YFshadaow"},"content":" return new WatchListCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" case ADD_CASHFLOW_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" return new AddCashflowCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" case DELETE_CASHFLOW_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" return new DeleteCashflowCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" case ADD_STOCK_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"YFshadaow"},"content":" return new AddStockCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" case DELETE_STOCK_COMMAND:","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" return new DeleteStockCommand(rawCommand);","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" case FIND_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"YFshadaow"},"content":" return new FindCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" case BUDGET_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" return new BudgetCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" case VISUALIZATION_COMMAND:","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" return new VisCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" case OVERVIEW_COMMAND:","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" return new OverviewCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"hshiah"},"content":" case ADD_REMINDER_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"hshiah"},"content":" return new AddReminderCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"YFshadaow"},"content":" case LIST_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"YFshadaow"},"content":" return new ListCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"hshiah"},"content":" case SET_GOAL_COMMAND:","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"hshiah"},"content":" return new SetGoalCommand(rawCommand);","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" case BALANCE_COMMAND:","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" return new BalanceCommand(rawCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-07"},{"lineNumber":81,"author":{"gitId":"YFshadaow"},"content":" return new InvalidCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"YFshadaow"},"content":" public static RawCommand parseRawCommand(String input) throws IllegalArgumentException{","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"YFshadaow"},"content":" Iterator\u003cString\u003e iterator \u003d Arrays.stream(input.split(\" \")).iterator();","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"YFshadaow"},"content":" if (!iterator.hasNext()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Command cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":90,"author":{"gitId":"YFshadaow"},"content":" String commandName \u003d iterator.next();","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"YFshadaow"},"content":" List\u003cString\u003e args \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"YFshadaow"},"content":" Map\u003cString, String\u003e extraArgs \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"YFshadaow"},"content":" List\u003cString\u003e extraArgumentContentBuffer \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"YFshadaow"},"content":" String currentExtraArgumentName \u003d null;","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"YFshadaow"},"content":" while (iterator.hasNext()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"YFshadaow"},"content":" String next \u003d iterator.next();","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"YFshadaow"},"content":" if (next.startsWith(\"/\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"YFshadaow"},"content":" // Save previous extra argument when next extra argument is found","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"NeoMinWei"},"content":" savePreviousExtraArgument(extraArgs, currentExtraArgumentName, extraArgumentContentBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"YFshadaow"},"content":" if (next.length() \u003d\u003d 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(\"Extra argument name cannot be empty\");","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"YFshadaow"},"content":" currentExtraArgumentName \u003d next.substring(1);","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName \u003d\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"YFshadaow"},"content":" args.add(next);","lastModifiedDate":"2023-10-15"},{"lineNumber":113,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"YFshadaow"},"content":" extraArgumentContentBuffer.add(next);","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"YFshadaow"},"content":" // Save previous extra argument at the very end","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"YFshadaow"},"content":" if (currentExtraArgumentName !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":" savePreviousExtraArgument(extraArgs, currentExtraArgumentName, extraArgumentContentBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":122,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"NeoMinWei"},"content":" return new RawCommand(commandName, args, extraArgs);","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"NeoMinWei"},"content":" private static void savePreviousExtraArgument(Map\u003cString, String\u003e extraArgs","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"NeoMinWei"},"content":" , String currentExtraArgumentName, List\u003cString\u003e extraArgumentContentBuffer) {","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"YFshadaow"},"content":" if (extraArgs.containsKey(currentExtraArgumentName)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"YFshadaow"},"content":" throw new IllegalArgumentException(","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"YFshadaow"},"content":" String.format(\"Duplicate extra argument name: %s\", currentExtraArgumentName));","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"YFshadaow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":132,"author":{"gitId":"YFshadaow"},"content":" extraArgs.put(currentExtraArgumentName, String.join(\" \", extraArgumentContentBuffer));","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"YFshadaow"},"content":" extraArgumentContentBuffer.clear();","lastModifiedDate":"2023-10-15"},{"lineNumber":134,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"wwweert123":14,"NeoMinWei":24,"ryan1604":29,"YFshadaow":60,"hshiah":9}},{"path":"src/main/java/seedu/financialplanner/utils/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.utils;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.apache.commons.lang3.StringUtils;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.Stock;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public class Ui {","lastModifiedDate":"2023-10-07"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" private static Ui ui \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" private static final String RED \u003d \"\\u001B[31m\";","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" private static final String GREEN \u003d \"\\u001B[32m\";","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" private static final String RESET \u003d \"\\u001B[0m\";","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private static final String YELLOW \u003d \"\\u001B[33m\";","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"YFshadaow"},"content":" private Scanner Scanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"YFshadaow"},"content":" private Ui() {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" public static Ui getInstance() {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" if (ui \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" return ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"YFshadaow"},"content":" public static void printCorruptedFileError(String message) {","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" public Scanner getScanner() {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"YFshadaow"},"content":" return Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"YFshadaow"},"content":" public void setScanner(Scanner scanner) {","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"YFshadaow"},"content":" this.Scanner \u003d scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"YFshadaow"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" public void showMessage(String message) {","lastModifiedDate":"2023-10-07"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" assert !message.isEmpty();","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-07"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public void welcomeMessage() {","lastModifiedDate":"2023-10-07"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Welcome to your Financial Planner. Type something to get started.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" public void exitMessage() {","lastModifiedDate":"2023-10-07"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Exiting Financial Planner. Goodbye.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-07"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" public String input() {","lastModifiedDate":"2023-10-07"},{"lineNumber":59,"author":{"gitId":"YFshadaow"},"content":" return Scanner.nextLine().trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-07"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":" public void printWatchListHeader() {","lastModifiedDate":"2023-10-09"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"Symbol\");","lastModifiedDate":"2023-10-09"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"Market\");","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" System.out.print(YELLOW + \"Price\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" System.out.print(GREEN + \"Daily High\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" System.out.print(RED + \"Daily Low\" + RESET);","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-09"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"EquityName\");","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" System.out.print(\"Last Updated\");","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" System.out.print(\" \");","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" System.out.println();","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" public void printStocksInfo(WatchList watchList) {","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":" for (Map.Entry\u003cString, Stock\u003e set : watchList.getStocks().entrySet()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"wwweert123"},"content":" Stock stock \u003d set.getValue();","lastModifiedDate":"2023-10-29"},{"lineNumber":83,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"wwweert123"},"content":" String symbol \u003d StringUtils.rightPad(stock.getSymbol(), 10);","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"wwweert123"},"content":" String market \u003d StringUtils.rightPad(stock.getExchange(), 10);","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"wwweert123"},"content":" String price \u003d YELLOW + StringUtils.rightPad(stock.getPrice(), 10) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"wwweert123"},"content":" String dayHigh \u003d GREEN + StringUtils.rightPad(stock.getDayHigh(), 15) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"wwweert123"},"content":" String dayLow \u003d RED + StringUtils.rightPad(stock.getDayLow(), 14) + RESET;","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"wwweert123"},"content":" String name \u003d StringUtils.rightPad(stock.getStockName(), 30);","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"wwweert123"},"content":" String date \u003d new SimpleDateFormat(\"E, MMM dd yyyy HH:mm:ss\")","lastModifiedDate":"2023-10-29"},{"lineNumber":91,"author":{"gitId":"wwweert123"},"content":" .format(stock.getLastUpdated());","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"wwweert123"},"content":" String lastUpdate \u003d StringUtils.rightPad(date, 10);","lastModifiedDate":"2023-10-29"},{"lineNumber":93,"author":{"gitId":"wwweert123"},"content":" System.out.println(symbol + market + price + dayHigh + dayLow + name + lastUpdate);","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":95,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":97,"author":{"gitId":"wwweert123"},"content":" public void printAddStock(String stockName) {","lastModifiedDate":"2023-10-09"},{"lineNumber":98,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"You have successfully added:\");","lastModifiedDate":"2023-10-09"},{"lineNumber":99,"author":{"gitId":"wwweert123"},"content":" System.out.println(stockName);","lastModifiedDate":"2023-10-09"},{"lineNumber":100,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Use Watchlist to view it!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":101,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-10"},{"lineNumber":103,"author":{"gitId":"wwweert123"},"content":" public void printDeleteStock(String stockName) {","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"You have successfully deleted: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"wwweert123"},"content":" System.out.println(stockName);","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"wwweert123"},"content":" System.out.println(\"Use watchlist command to view updated Watchlist\");","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"NeoMinWei"},"content":" public void printAddedCashflow(Cashflow entry) {","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"NeoMinWei"},"content":" System.out.print(\"You have added an \");","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(entry);","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"to the Financial Planner.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":113,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"Balance: \" + entry.formatBalance());","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"NeoMinWei"},"content":" public void printDeletedCashflow(Cashflow entry) {","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"NeoMinWei"},"content":" System.out.print(\"You have removed an \");","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(entry);","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"from the Financial Planner.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"NeoMinWei"},"content":" System.out.println(\"Balance: \" + entry.formatBalance());","lastModifiedDate":"2023-10-15"},{"lineNumber":121,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"ryan1604"},"content":" public void printBudgetBeforeUpdate() {","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been updated:\\nOld initial budget: \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"ryan1604"},"content":" Budget.getInitialBudgetString() + \"\\nOld current budget: \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"ryan1604"},"content":" Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"ryan1604"},"content":" public void printBudgetAfterUpdate() {","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"ryan1604"},"content":" showMessage(\"New initial budget: \" + Budget.getInitialBudgetString() +","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"ryan1604"},"content":" \"\\nNew current budget: \" + Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"ryan1604"},"content":" if (Budget.getCurrentBudget() \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"ryan1604"},"content":" showMessage(\"You have exceeded your budget, please update to a larger budget or \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"ryan1604"},"content":" \"reset the current budget to initial budget.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"ryan1604"},"content":" public void printBudgetAfterDeduction() {","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"ryan1604"},"content":" StringBuilder message \u003d new StringBuilder();","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"ryan1604"},"content":" if (Budget.getCurrentBudget() \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"ryan1604"},"content":" message.append(\"You have exceeded your current budget by: \");","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"ryan1604"},"content":" } else if (Budget.getCurrentBudget() \u003e 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"ryan1604"},"content":" message.append(\"Your remaining budget for the month is: \");","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"ryan1604"},"content":" message.append(Budget.getCurrentBudgetString());","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"ryan1604"},"content":" showMessage(message.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":149,"author":{"gitId":"ryan1604"},"content":" public void printBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":150,"author":{"gitId":"ryan1604"},"content":" showMessage(\"You have a remaining budget of \" + Budget.getCurrentBudgetString() + \".\");","lastModifiedDate":"2023-10-23"},{"lineNumber":151,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":152,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":153,"author":{"gitId":"ryan1604"},"content":" public void printDeleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":154,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been deleted.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":155,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":156,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":157,"author":{"gitId":"ryan1604"},"content":" public void printResetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":158,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has been reset to \" + Budget.getInitialBudgetString() + \".\");","lastModifiedDate":"2023-10-23"},{"lineNumber":159,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":160,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"wwweert123"},"content":" public void printDisplayChart(String type, String chart) {","lastModifiedDate":"2023-10-24"},{"lineNumber":162,"author":{"gitId":"wwweert123"},"content":" showMessage(\"Displaying \" + chart + \"chart for \" + type);","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"ryan1604"},"content":" public void printOverview(String... args) {","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"ryan1604"},"content":" String balance \u003d args[0];","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"ryan1604"},"content":" String income \u003d args[1];","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"ryan1604"},"content":" String expense \u003d args[2];","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"ryan1604"},"content":" String budget \u003d args[3];","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"ryan1604"},"content":" String reminders \u003d args[4];","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Here is an overview of your financials:\\n\" + \"Total balance: \" + balance + \"\\n\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"ryan1604"},"content":" \"Highest income: \" + income + \"\\n\" + \"Highest expense: \" + expense + \"\\n\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"ryan1604"},"content":" \"Remaining budget for the month: \" + budget + \"\\n\\n\" + \"Reminders:\\n\" + reminders);","lastModifiedDate":"2023-10-25"},{"lineNumber":175,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"ryan1604"},"content":" public void printSetBudget() {","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"ryan1604"},"content":" showMessage(\"A monthly budget of \" + Budget.getInitialBudgetString() + \" has been set.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":181,"author":{"gitId":"ryan1604"},"content":" public void printBudgetExceedBalance() {","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Since initial budget exceeds current balance, budget will be reset to current balance.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"ryan1604"},"content":" public void printBudgetError(String errorType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"ryan1604"},"content":" switch (errorType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"ryan1604"},"content":" case \"delete\":","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has not been set yet.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":189,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"ryan1604"},"content":" case \"reset\":","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Budget has not been spent yet.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":192,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":193,"author":{"gitId":"ryan1604"},"content":" case \"view\":","lastModifiedDate":"2023-10-25"},{"lineNumber":194,"author":{"gitId":"ryan1604"},"content":" showMessage(\"There is no existing budget.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":195,"author":{"gitId":"ryan1604"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":196,"author":{"gitId":"ryan1604"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":197,"author":{"gitId":"ryan1604"},"content":" logger.log(Level.SEVERE, \"Unreachable default case reached\");","lastModifiedDate":"2023-10-27"},{"lineNumber":198,"author":{"gitId":"ryan1604"},"content":" showMessage(\"Unknown command\");","lastModifiedDate":"2023-10-25"},{"lineNumber":199,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":200,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":201,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-07"}],"authorContributionMap":{"wwweert123":59,"NeoMinWei":22,"ryan1604":106,"YFshadaow":14}},{"path":"src/main/java/seedu/financialplanner/visualisations/Categorizer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.visualisations;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"public class Categorizer {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortType(CashflowList cashflowList, String type)","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" switch (type) {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" case \"expense\":","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"categorizing expenses\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" return sortExpenses(cashflowList);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" case \"income\":","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"categorizing income\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" return sortIncome(cashflowList);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(type + \" Type not found\");","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortExpenses(CashflowList cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" Map\u003cString, Double\u003e expensesByCat \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" for (Cashflow e: cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" if (e instanceof Expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" String key \u003d e.getExpenseType().toString().toLowerCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" double value \u003d expensesByCat.getOrDefault(key, 0.0) + e.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" assert value \u003e\u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" expensesByCat.put(key, value);","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" return expensesByCat;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" public static Map\u003cString, Double\u003e sortIncome(CashflowList cashflowList) {","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" Map\u003cString, Double\u003e incomeByCat \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" for (Cashflow e: cashflowList.list) {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" if (e instanceof Income) {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" String key \u003d e.getIncomeType().toString().toLowerCase();","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" double value \u003d incomeByCat.getOrDefault(key, 0.0) + e.getAmount();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" assert value \u003e\u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":" incomeByCat.put(key, value);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" return incomeByCat;","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":46,"NeoMinWei":8,"ryan1604":2}},{"path":"src/main/java/seedu/financialplanner/visualisations/Visualizer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.visualisations;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.CategoryChart;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.CategoryChartBuilder;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.PieChart;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.PieChartBuilder;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.SwingWrapper;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import org.knowm.xchart.style.Styler;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import javax.swing.JFrame;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"import java.awt.Color;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":"public class Visualizer {","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" private static final Logger logger \u003d Logger.getLogger(\"Financial Planner Logger\");","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" public static void displayChart(String chart, Map\u003cString, Double\u003e cashFlowByCat, String type)","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" throws FinancialPlannerException {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" switch (chart) {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" case \"pie\":","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":" displayPieChart(cashFlowByCat, type);","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" case \"bar\":","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" displayBarChart(cashFlowByCat, type);","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" default:","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" throw new FinancialPlannerException(chart + \" Chart Type Not Found\");","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" public static void displayPieChart (Map\u003cString, Double\u003e expensesByCat, String type) {","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" PieChart chart \u003d new PieChartBuilder().width(800).height(600).title(type).build();","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" // Customize Chart","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" Color[] sliceColors \u003d new Color[] {","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" new Color(21, 224, 14),","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":" new Color(62, 154, 230),","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"wwweert123"},"content":" new Color(236, 186, 110),","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"wwweert123"},"content":" new Color(243, 159, 242),","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"wwweert123"},"content":" new Color(246, 182, 197),","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"wwweert123"},"content":" new Color(210, 24, 24),","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"wwweert123"},"content":" new Color(211, 164, 8),","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"wwweert123"},"content":" };","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setSeriesColors(sliceColors);","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"wwweert123"},"content":" for (Map.Entry\u003cString, Double\u003e set: expensesByCat.entrySet()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"wwweert123"},"content":" chart.addSeries(set.getKey(), set.getValue());","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Displaying Pie Chart\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"wwweert123"},"content":" // Show it","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"wwweert123"},"content":" JFrame swHR \u003d new SwingWrapper\u003c\u003e(chart).displayChart();","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"wwweert123"},"content":" javax.swing.SwingUtilities.invokeLater(","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"wwweert123"},"content":" ()-\u003eswHR.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"wwweert123"},"content":" public static void displayBarChart (Map\u003cString, Double\u003e expensesByCat, String type) {","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"wwweert123"},"content":" CategoryChart chart \u003d new CategoryChartBuilder().width(800).height(600)","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"wwweert123"},"content":" .title(type).xAxisTitle(\"Type\").yAxisTitle(\"Value\").build();","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"wwweert123"},"content":" // Customize Chart","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setLegendPosition(Styler.LegendPosition.InsideNW);","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"wwweert123"},"content":" chart.getStyler().setHasAnnotations(true);","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"wwweert123"},"content":" assert !expensesByCat.isEmpty();","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"wwweert123"},"content":" // Series","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"wwweert123"},"content":" List\u003cDouble\u003e values \u003d new ArrayList\u003cDouble\u003e(expensesByCat.values());","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"wwweert123"},"content":" List\u003cString\u003e keys \u003d new ArrayList\u003cString\u003e(expensesByCat.keySet());","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"wwweert123"},"content":" chart.addSeries(\"Expense\", keys, values);","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"wwweert123"},"content":" logger.log(Level.INFO, \"Displaying Bar Chart\");","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"wwweert123"},"content":" JFrame swHR \u003d new SwingWrapper\u003c\u003e(chart).displayChart();","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"wwweert123"},"content":" javax.swing.SwingUtilities.invokeLater(","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"wwweert123"},"content":" ()-\u003eswHR.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"wwweert123"},"content":" );","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"wwweert123":79,"ryan1604":2}},{"path":"src/test/java/seedu/financialplanner/FinancialPlannerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner;","lastModifiedDate":"2023-10-07"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"class FinancialPlannerTest {","lastModifiedDate":"2023-10-07"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"-":10,"ryan1604":2}},{"path":"src/test/java/seedu/financialplanner/cashflow/BudgetTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.commands.AddCashflowCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"@TestMethodOrder(OrderAnnotation.class)","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"public class BudgetTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":" @Order(1)","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" public void testSetBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(500);","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" assertTrue(Budget.hasBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" assertEquals(500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" assertEquals(500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" @Order(2)","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" public void testNewExpense() {","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand testExpense \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 50 /t dining\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" testExpense.execute();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" assertEquals(450, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" @Order(3)","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" public void testUpdateBudget() {","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(300);","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" assertEquals(300, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" assertEquals(250, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" Budget.updateBudget(1000);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" assertEquals(950, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" @Order(4)","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" public void testSetInitialBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" Budget.setInitialBudget(1500);","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" @Order(5)","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" public void testUpdateCurrentBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" Budget.updateCurrentBudget(50);","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" @Order(6)","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" public void testResetBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":" Budget.resetBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" @Order(7)","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" public void testDeleteBudget() {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" assertEquals(0, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" assertEquals(0, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" @Order(8)","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":" public void testLoadBudget() {","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" Budget.load(100, 100);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" assertEquals(100, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" assertEquals(100, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"NeoMinWei":3,"ryan1604":82}},{"path":"src/test/java/seedu/financialplanner/cashflow/CashflowListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.CashflowCategory;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import java.text.DecimalFormat;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"class CashflowListTest {","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList testList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":" private DecimalFormat decimalFormat \u003d new DecimalFormat(\"####0.00\");","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" void testAddIncomeAndExpense() {","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" testList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Cashflow.balance \u003d 0;","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" testList.addIncome(15, IncomeType.SALARY, 30, \"part time job\");","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" Cashflow testIncome \u003d testList.list.get(0);","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"NeoMinWei"},"content":" double roundedValue \u003d Cashflow.round(testIncome.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" double roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testIncome instanceof Income);","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"15.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.SALARY, testIncome.getIncomeType());","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testIncome.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"15.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"part time job\", testIncome.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" testList.addIncome(15.999, IncomeType.INVESTMENTS, 0, \"AAPL\");","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" testIncome \u003d testList.list.get(1);","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testIncome.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testIncome instanceof Income);","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"16.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.INVESTMENTS, testIncome.getIncomeType());","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testIncome.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"31.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"AAPL\", testIncome.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" testList.addExpense(10, ExpenseType.DINING, 0, \"double mcspicy\");","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"NeoMinWei"},"content":" Cashflow testExpense \u003d testList.list.get(2);","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testExpense.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testExpense instanceof Expense);","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"10.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.DINING, testExpense.getExpenseType());","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testExpense.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"21.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"double mcspicy\", testExpense.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"NeoMinWei"},"content":" testList.addExpense(19.999, ExpenseType.ENTERTAINMENT, 30, \"netflix\");","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"NeoMinWei"},"content":" testExpense \u003d testList.list.get(3);","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"NeoMinWei"},"content":" roundedValue \u003d Cashflow.round(testExpense.amount, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"NeoMinWei"},"content":" assertTrue(testExpense instanceof Expense);","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"20.00\", decimalFormat.format(roundedValue));","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.ENTERTAINMENT, testExpense.getExpenseType());","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testExpense.recur);","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"1.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"netflix\", testExpense.description);","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"NeoMinWei"},"content":" void testDeleteIncomeAndExpense() {","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithCategory(CashflowCategory.INCOME, 2);","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(3, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"NeoMinWei"},"content":" double roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-15.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithoutCategory(1);","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(2, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-30.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithCategory(CashflowCategory.EXPENSE, 2);","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(1, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"-10.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"NeoMinWei"},"content":" testList.deleteCashflowWithoutCategory(1);","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testList.list.size());","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"NeoMinWei"},"content":" roundedBalance \u003d Cashflow.round(Cashflow.balance, 2);","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(\"0.00\", decimalFormat.format(roundedBalance));","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"NeoMinWei":86,"ryan1604":2,"YFshadaow":1}},{"path":"src/test/java/seedu/financialplanner/commands/AddCashflowCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"NeoMinWei"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"NeoMinWei"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.investments.WatchList;","lastModifiedDate":"2023-10-13"},{"lineNumber":7,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"YFshadaow"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"NeoMinWei"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"NeoMinWei"},"content":"class AddCashflowCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"NeoMinWei"},"content":" private Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"NeoMinWei"},"content":" private CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":" private WatchList watchList \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":18,"author":{"gitId":"NeoMinWei"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"NeoMinWei"},"content":" void testExecute() {","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"YFshadaow"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"NeoMinWei"},"content":" AddCashflowCommand testEntry \u003d new AddCashflowCommand(Parser","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"NeoMinWei"},"content":" .parseRawCommand(\"add income /a 300 /t salary /r 30\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"YFshadaow"},"content":" testEntry.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"YFshadaow"},"content":" assertEquals(300, testEntry.amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(IncomeType.SALARY, testEntry.incomeType);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(30, testEntry.recur);","lastModifiedDate":"2023-10-13"},{"lineNumber":28,"author":{"gitId":"NeoMinWei"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"NeoMinWei"},"content":" testEntry \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 15 /t dining\"));","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"YFshadaow"},"content":" testEntry.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" assertEquals(15, testEntry.amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(ExpenseType.DINING, testEntry.expenseType);","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"NeoMinWei"},"content":" assertEquals(0, testEntry.recur);","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"NeoMinWei"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"NeoMinWei"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"wwweert123":1,"NeoMinWei":28,"YFshadaow":6}},{"path":"src/test/java/seedu/financialplanner/commands/BudgetCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Budget;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Cashflow;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"@TestMethodOrder(OrderAnnotation.class)","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"ryan1604"},"content":"public class BudgetCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":" @Order(1)","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":" public void testSetBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":" Cashflow.setBalance(2000);","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 1000\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" assertTrue(Budget.hasBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"ryan1604"},"content":" @Order(2)","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" public void testUpdateBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget update /b 1500\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Order(3)","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public void testResetBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget reset\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" AddCashflowCommand testExpense \u003d new AddCashflowCommand(Parser.parseRawCommand(\"add expense /a 50 /t dining\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"ryan1604"},"content":" testExpense.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" assertEquals(1500, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":" Budget.deduct(50);","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" Cashflow.setBalance(1000);","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudgetExceedBalance \u003d new BudgetCommand(Parser.parseRawCommand(\"budget reset\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"ryan1604"},"content":" testBudgetExceedBalance.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getInitialBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" assertEquals(1000, Budget.getCurrentBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":" @Order(4)","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" public void testDeleteBudget() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget delete\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"ryan1604"},"content":" testBudget.execute();","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" assertFalse(Budget.hasBudget());","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"ryan1604"},"content":" @Order(5)","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"ryan1604"},"content":" public void testInvalidCommandFormat_throwsException() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testExtraArgument \u003d new BudgetCommand(Parser.parseRawCommand(\"budget\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"ryan1604"},"content":" \" set /b 500 /t sdf\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Unknown extra argument: t\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testInvalidCommand \u003d new BudgetCommand(Parser.parseRawCommand(\"budget random /b 5\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget command must be one of the following: set, update, \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"ryan1604"},"content":" \"delete, reset, view.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"ryan1604"},"content":" Budget.setBudget(5);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testSetAndHasBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 55\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"There is an existing budget, did you mean update?\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"ryan1604"},"content":" Budget.deleteBudget();","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testUpdateAndNoBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget update \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"ryan1604"},"content":" \"/b 500\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"There is no budget set yet, did you mean set?\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testMissingArgument \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Missing /b argument.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"ryan1604"},"content":" @Order(6)","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"ryan1604"},"content":" public void testInvalidBudget_throwsException() throws FinancialPlannerException {","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testStringBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b f\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"ryan1604"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget must be a number.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testNegativeBudget \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b -5\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget should be greater than 0.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"ryan1604"},"content":" Cashflow.clearBalance();","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"ryan1604"},"content":" try {","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"ryan1604"},"content":" BudgetCommand testBudgetExceedBalance \u003d new BudgetCommand(Parser.parseRawCommand(\"budget set /b 500\"));","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"ryan1604"},"content":" } catch (FinancialPlannerException e) {","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"ryan1604"},"content":" assertEquals(\"Budget should be lower than total balance.\", e.getMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"NeoMinWei":2,"ryan1604":120}},{"path":"src/test/java/seedu/financialplanner/investments/WatchListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"wwweert123"},"content":"package seedu.financialplanner.investments;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.MethodOrderer;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.Order;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"wwweert123"},"content":"import org.junit.jupiter.api.TestMethodOrder;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"wwweert123"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"wwweert123"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"wwweert123"},"content":"import static org.junit.jupiter.api.Assertions.assertNotNull;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"wwweert123"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"wwweert123"},"content":"@TestMethodOrder(MethodOrderer.OrderAnnotation.class)","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"wwweert123"},"content":"class WatchListTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"wwweert123"},"content":" @Order(1)","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"wwweert123"},"content":" void fetchFMPStockPrices() throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"wwweert123"},"content":" wl.getLatestWatchlistInfo();","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"wwweert123"},"content":" HashMap\u003cString, Stock\u003e stocks \u003d wl.getStocks();","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"wwweert123"},"content":" assertNotNull(stocks.get(\"AAPL\").getPrice());","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"wwweert123"},"content":" assertNotNull(stocks.get(\"GOOGL\").getPrice());","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"wwweert123"},"content":" // Might need to update this test","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"wwweert123"},"content":" @Order(2)","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"wwweert123"},"content":" void addStock() throws Exception {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"wwweert123"},"content":" String stockCode \u003d \"GME\";","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"wwweert123"},"content":" assertEquals(\"Gamestop Corporation - Class A\", wl.addStock(stockCode));","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"wwweert123"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"wwweert123"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"wwweert123"},"content":" @Order(3)","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"wwweert123"},"content":" void deleteStock() throws FinancialPlannerException {","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"wwweert123"},"content":" WatchList wl \u003d WatchList.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"wwweert123"},"content":" String stockCode \u003d \"GME\";","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"wwweert123"},"content":" assertEquals(\"Gamestop Corporation - Class A\", wl.deleteStock(stockCode));","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"wwweert123"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"wwweert123"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"wwweert123":43}},{"path":"src/test/java/seedu/financialplanner/storage/StorageTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"ryan1604"},"content":"package seedu.financialplanner.storage;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"ryan1604"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.ExpenseType;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.enumerations.IncomeType;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.exceptions.FinancialPlannerException;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Expense;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.CashflowList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"NeoMinWei"},"content":"import seedu.financialplanner.cashflow.Income;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"ryan1604"},"content":"import seedu.financialplanner.utils.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"ryan1604"},"content":"import java.io.ByteArrayInputStream;","lastModifiedDate":"2023-10-13"},{"lineNumber":14,"author":{"gitId":"ryan1604"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-13"},{"lineNumber":15,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"ryan1604"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"YFshadaow"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":19,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"ryan1604"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-13"},{"lineNumber":21,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"ryan1604"},"content":"public class StorageTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"ryan1604"},"content":" @TempDir","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"ryan1604"},"content":" public static Path testFolder;","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"NeoMinWei"},"content":" protected CashflowList cashflowList \u003d CashflowList.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"NeoMinWei"},"content":" protected Ui ui \u003d Ui.getInstance();","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"ryan1604"},"content":" protected Storage storage \u003d Storage.getInstance();","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"ryan1604"},"content":" public void loadValidData() throws FinancialPlannerException {","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"ryan1604"},"content":" storage.load(\"src/test/testData/ValidData.txt\");","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"YFshadaow"},"content":" String actual \u003d cashflowList.getList();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"YFshadaow"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"YFshadaow"},"content":" String expected \u003d cashflowList.getList();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"YFshadaow"},"content":" assertEquals(expected, actual);","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":41,"author":{"gitId":"ryan1604"},"content":" public void loadInvalidData_userInputNo() {","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"ryan1604"},"content":" ByteArrayInputStream in \u003d new ByteArrayInputStream(\"n\".getBytes());","lastModifiedDate":"2023-10-13"},{"lineNumber":44,"author":{"gitId":"NeoMinWei"},"content":" ui.setScanner(new Scanner(in));","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"ryan1604"},"content":" assertThrows(FinancialPlannerException.class,","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"ryan1604"},"content":" () -\u003e storage.load(\"src/test/testData/InvalidData.txt\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":48,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":49,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":50,"author":{"gitId":"ryan1604"},"content":" public void saveValidData() throws FinancialPlannerException, IOException {","lastModifiedDate":"2023-10-13"},{"lineNumber":51,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.list.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"ryan1604"},"content":" storage.save(String.valueOf(testFolder.resolve(\"temp.txt\")));","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"ryan1604"},"content":" assertEquals(Files.readAllLines(Path.of(\"src/test/testData/ValidData.txt\")),","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"ryan1604"},"content":" Files.readAllLines(testFolder.resolve(\"temp.txt\")));","lastModifiedDate":"2023-10-13"},{"lineNumber":56,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"ryan1604"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":59,"author":{"gitId":"ryan1604"},"content":" public void saveNonExistentFile() {","lastModifiedDate":"2023-10-13"},{"lineNumber":60,"author":{"gitId":"YFshadaow"},"content":" getTestData();","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"ryan1604"},"content":" assertThrows(FinancialPlannerException.class, () -\u003e storage.save(\"\"));","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":63,"author":{"gitId":"ryan1604"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"YFshadaow"},"content":" private void getTestData() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.load(new Income(123.12, IncomeType.ALLOWANCE, 0, null));","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"NeoMinWei"},"content":" cashflowList.load(new Expense(100, ExpenseType.SHOPPING, 30, \"shopee\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"ryan1604"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"ryan1604"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"NeoMinWei":12,"ryan1604":46,"YFshadaow":10}}] diff --git a/AY2324S1-CS2113-T18-2_tp_master/commits.json b/AY2324S1-CS2113-T18-2_tp_master/commits.json index 956f35d..7f3555d 100644 --- a/AY2324S1-CS2113-T18-2_tp_master/commits.json +++ b/AY2324S1-CS2113-T18-2_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"wwweert123":[{"date":"2023-10-05","commitResults":[{"hash":"491c9238e3c2b52f8ddaa10ba332e9566a8b7e9e","isMergeCommit":false,"messageTitle":"Add aboutus links and add my my own md file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":7}}},{"hash":"2712d42c6b6d4552c9a0ea7bcc75de166bdf1546","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into Frederick-AboutUs","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"11db7a69a38c31d6f7658163f69ac8726f80a0b0","isMergeCommit":true,"messageTitle":"Merge pull request #3 from wwweert123/Frederick-AboutUs","messageBody":"Add aboutus links and add my my own md file","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"68d635974b5493f20ba1ffaa1b953cf0b798a5ae","isMergeCommit":false,"messageTitle":"Add new watchlist command and pull from FMP api for stock data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"5f7d5ba1fafae93224d2ae0559edae789e3747bd","isMergeCommit":false,"messageTitle":"Add simple JSON library to parse response body and print to UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"bfa75c44ff77cc7824fb4a072c8d4a8e94a19e09","isMergeCommit":false,"messageTitle":"Use string format to create request URI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"d5ac9fceb7e20c02055b08cff4c73c88830bb993","isMergeCommit":false,"messageTitle":"Add a stock class and have the watchlist query API endpoint using stock classes created","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":2}}},{"hash":"66c6dc6ad21cbde9abe158bb32b30160a572021d","isMergeCommit":false,"messageTitle":"Add commons lang library to allow for padding of string when printing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":7},"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-09","commitResults":[{"hash":"9a32030207906b044fd774d1afcc8768c2f52b51","isMergeCommit":false,"messageTitle":"Create a watchlist class to reference stocks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":0},"other":{"insertions":12,"deletions":35}}},{"hash":"a311199b47d9c35e55f5509eaba762545283cd61","isMergeCommit":false,"messageTitle":"Create method in UI to print stock prices","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":0}}},{"hash":"84fb7092fb5158ab4e8aeb7b0e00b521bdd981df","isMergeCommit":false,"messageTitle":"Add watchlist parameter to execute","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":6}}},{"hash":"2977b5bb71d186cf5ba1d7e15eb4c59e029f88c3","isMergeCommit":false,"messageTitle":"Initialize watchlist on startup","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"df5605a78870802546be8dc5b852348e41405f8c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickWatchlist","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/commands/Command.java\n#\tsrc/main/java/seedu/financialplanner/commands/Exit.java\n#\tsrc/main/java/seedu/financialplanner/commands/Invalid.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"74e0b77d800eb36b21b1534bb75611548d2b2164","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":16}}},{"hash":"fab0ae11bdae69d18f598f87848130409af67551","isMergeCommit":true,"messageTitle":"Merge pull request #33 from wwweert123/FrederickWatchlist","messageBody":"Frederick watchlist","fileTypesAndContributionMap":{}},{"hash":"a778bb54cf3c686fc074b019c292a87b7beeb3dd","isMergeCommit":false,"messageTitle":"Add command for adding stock to watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":5}}},{"hash":"bece3c1c0e553317e4fa0715467f3a782b274f1c","isMergeCommit":false,"messageTitle":"Add some minor error handling for response from API endpoint","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":9}}}]},{"date":"2023-10-10","commitResults":[{"hash":"c6df4b251e96eda6f8271f3b1c9d4a7c8c5cd6f3","isMergeCommit":true,"messageTitle":"Merge pull request #37 from wwweert123/FrederickAddStock","messageBody":"Frederick add stock","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"bef5bea11ba3f9ee327b12830092670706eb6c8c","isMergeCommit":false,"messageTitle":"Add testcases for addstock and fetchFMPStockPrices","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":31,"deletions":0}}},{"hash":"92df6fe7a3c18bfd7283694eafeee6fb0e82f070","isMergeCommit":false,"messageTitle":"Fix Code styles","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":3}}},{"hash":"1afcc973197329792f60e23295c485d963590453","isMergeCommit":false,"messageTitle":"Fix imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":0}}},{"hash":"5471bf86202514018adf0251d3811de39949cdde","isMergeCommit":true,"messageTitle":"Merge pull request #44 from wwweert123/JUnitWatchlist","messageBody":"Add testcases for addstock and fetchFMPStockPrices","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"00f4c3f960e81461c36262c92bbd2dfa2a9d8541","isMergeCommit":false,"messageTitle":"Fix bug by changing api endpoint and changing api key","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":21},"test-code":{"insertions":1,"deletions":1}}},{"hash":"52856fb2cda836fc593956eca93d3d2e7cab04ea","isMergeCommit":true,"messageTitle":"Merge pull request #52 from wwweert123/FrederickStockAPIChange","messageBody":"Fix bug by changing api endpoint and changing api key","fileTypesAndContributionMap":{}},{"hash":"f4935d893db62558f2c75ebdddd419e7b39f15b6","isMergeCommit":false,"messageTitle":"Fix test and remove market from add stock","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"0782c150bb1bb098038134bdbf37d56e35bee902","isMergeCommit":true,"messageTitle":"Merge pull request #53 from wwweert123/FrederickStockAPIChange","messageBody":"Fix test and remove market from add stock","fileTypesAndContributionMap":{}},{"hash":"acb5bdbfd096302f98eea97c01f4a6e360c1395b","isMergeCommit":false,"messageTitle":"Fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"test-code":{"insertions":1,"deletions":1}}},{"hash":"da1f2d50202a960b187bbbebcf4514c9aa128d68","isMergeCommit":true,"messageTitle":"Merge pull request #54 from wwweert123/FrederickStockAPIChange","messageBody":"Fix bug","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"7d495e4009402389b717de162fc78f288ba88fc1","isMergeCommit":false,"messageTitle":"Add new dependency for creating data plots and test it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"763e137a04d856abc406e8795f0bf5f91d904d1e","isMergeCommit":false,"messageTitle":"Remove unnecessary classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":31}}},{"hash":"d03b9438f621db15a83610c3ce199c6ee840675c","isMergeCommit":false,"messageTitle":"Add getters for cashflow type and value","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"4fc4df2db821fb4d8cdd5f3eb3093400f5e0d297","isMergeCommit":false,"messageTitle":"Add vis command to the parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":10}}},{"hash":"7f31985cd4ae39b8944d2df5d424aad1616742c0","isMergeCommit":false,"messageTitle":"Add categorizer utility class to sort expenses or income entry based on type","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":0}}},{"hash":"afc246440d8eca06ede599770fa363a0a5549f3e","isMergeCommit":false,"messageTitle":"Add visualizer class to visualize data in bar graph or pie chart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":0}}},{"hash":"8631e18975c8beabae651b826d9c0a6a6a798aeb","isMergeCommit":false,"messageTitle":"Fix Import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"7fe6dc007f9a4c50dd6d6e431834641688608bd3","isMergeCommit":false,"messageTitle":"Fix code style issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":10}}},{"hash":"68fc9ae55171009c217fc93e846fa88e4c0b913a","isMergeCommit":false,"messageTitle":"Fix identation in visualizer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"42b5794f6f94595b399e3e97640cd986e617d529","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickVisualisation","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/list/CashflowList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"c689389905882a16a1e1aa27a4fbfd4936ba22a3","isMergeCommit":false,"messageTitle":"Remove dead code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7}}},{"hash":"f97b44048a9b7b92fcb0abbd4ca91161a7d965f5","isMergeCommit":false,"messageTitle":"Add functionality to do visualization for both income and expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":3}}},{"hash":"671802cad084f4b455b79718f5de9dd35ec9f322","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickVisualisation","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"2a0a2fb3bf353c2ec7d9faf9f4b26be38addb9cb","isMergeCommit":false,"messageTitle":"Fix code style","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"9b0642a136c10c64880e1c6e3d7f7ad74c46c4b5","isMergeCommit":true,"messageTitle":"Merge pull request #69 from wwweert123/FrederickVisualisation","messageBody":"Frederick visualisation","fileTypesAndContributionMap":{}},{"hash":"4c12a33358390c7833882cb4ff8856c639a0e0d9","isMergeCommit":false,"messageTitle":"Add logger for visualizer and categorizer class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"d37e2a293714b82b7d9f79e06cecb35599196bce","isMergeCommit":false,"messageTitle":"Add logging for Vis Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2}}},{"hash":"c7897b1d61ad607722a0af7243c2c0412cbb6074","isMergeCommit":false,"messageTitle":"Add assert for visualizations related classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":6}}},{"hash":"a3dd93f6e66d04efcc7f61d57df01c3e05772535","isMergeCommit":false,"messageTitle":"Fix error in check style","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"793ce105ddb0c8508ec605fe40f273cd5b4cce5d","isMergeCommit":true,"messageTitle":"Merge pull request #93 from wwweert123/LoggingAssertVis","messageBody":"Logging assert vis","fileTypesAndContributionMap":{}},{"hash":"5562991591bfeb1bc8e0cf33b9e4d9ef55ee5a11","isMergeCommit":false,"messageTitle":"Add logging and assert for watchlist command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"3de6f7e633a56dea1df03c9b4daf3a112a6212c3","isMergeCommit":false,"messageTitle":"Add logging and assert to AddStockCommand, Stock and Watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"1659e06bfa224f44344d3c005cf878e12c8adaf8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into LoggingAssertWatchlist","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/investments/WatchList.java\n","fileTypesAndContributionMap":{}},{"hash":"8d06dc08254699a08a4fff6922f9b7194c4a1dbb","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"15f9d47404e37efa56d679a640a19715f6fb9b83","isMergeCommit":false,"messageTitle":"Add handling for API limit reach and logging in constructor fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":2}}},{"hash":"0ee9efd58624b16160b1d2427a129cc636383756","isMergeCommit":false,"messageTitle":"Standardize logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"6161f6a7773821576d303d4690b81263e271d4dc","isMergeCommit":false,"messageTitle":"Remove commented code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"2d3e1047a9e7c595813b65c80728e187227dbcd5","isMergeCommit":true,"messageTitle":"Merge pull request #94 from wwweert123/LoggingAssertWatchlist","messageBody":"Logging assert watchlist","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"9f4a09be63259c43bd6fce4a55332a13d793ec68","isMergeCommit":false,"messageTitle":"Add functionality to delete stock from watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":1}}},{"hash":"7e21749289f35e37f0c83c8f6ce72d2958d8c635","isMergeCommit":false,"messageTitle":"Isolate JSON object to a single method to reduce chances of bug and give possibility of caching","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":46,"deletions":14}}},{"hash":"b49d747d818583fd3cca5bac61ffcf61ab59c94e","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":3}}},{"hash":"0f3b189cd17093c5ac7e60d63934b0446d19dda4","isMergeCommit":false,"messageTitle":"Update JUnit test due to changes in method implementation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":16,"deletions":11}}}]},{"date":"2023-10-23","commitResults":[{"hash":"0cb2c8190942d33ae0f6a9e094dbbcd02a50ce9d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into DeleteWatchList","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/WatchListCommand.java\n","fileTypesAndContributionMap":{}},{"hash":"fc2a9f8444ad097c48f388f6a0510c94481b575e","isMergeCommit":false,"messageTitle":"Change watchlist singleton access method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7},"test-code":{"insertions":4,"deletions":4}}},{"hash":"d73a5d597b5a1bff82e031898ab0cf938e5ae620","isMergeCommit":false,"messageTitle":"Improve code quality in accordance to reviewers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"c0d66053cd92b47cb444435e2f30e55047b9d210","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":7}}},{"hash":"a00abae470787cca65c55f6c4a867faa3e1d8a5c","isMergeCommit":true,"messageTitle":"Merge pull request #98 from wwweert123/DeleteWatchList","messageBody":"Delete watch list","fileTypesAndContributionMap":{}},{"hash":"890fc0d7877d7e156bc7303d84168b085542471f","isMergeCommit":false,"messageTitle":"Create method to save and load watchlist data to file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":0}}},{"hash":"8700572d1c9a8ddad641307b473f8a2b39a03bf5","isMergeCommit":false,"messageTitle":"Add calls to load and save methods in required areas","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":6}}},{"hash":"23a689f8e1269eb0c7bf84282a588da8d65b8256","isMergeCommit":false,"messageTitle":"Make stock serializable","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"55101bf4b40825d68ee3cbe3881590a37ab77385","isMergeCommit":false,"messageTitle":"Fix Test case for fetching stock prices","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"232ce50c57d8211e808b7e4cb44c33a3393c40c4","isMergeCommit":false,"messageTitle":"Change colour for visualizer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"534928547ad577210773c1f7dc3e8d4fb1ff6a82","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WatchlistStoraage","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/storage/LoadData.java\n#\tsrc/main/java/seedu/financialplanner/storage/SaveData.java\n","fileTypesAndContributionMap":{}},{"hash":"3f962dd0ac6a834e997ce2c77c602f80cdb3b8e4","isMergeCommit":false,"messageTitle":"Change to save watchlist only when exiting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"7f8f76935e4a066fddfdbd7f1950d5ab0caa5002","isMergeCommit":false,"messageTitle":"fix checkstly error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2bf5672bb389312c948d2408216b6e1cccf27159","isMergeCommit":false,"messageTitle":"Remove unused Imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"3c6d3a091066c1e4ad736ed49761f23b168b4a0b","isMergeCommit":true,"messageTitle":"Merge pull request #104 from wwweert123/WatchlistStoraage","messageBody":"Watchlist storaage","fileTypesAndContributionMap":{}},{"hash":"99c4cc5129b3da88815448476934d4dc8f1d3e2e","isMergeCommit":false,"messageTitle":"Add description for the visualization feature in developers guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":0}}},{"hash":"30e7abb6afe5a788025b4cc9bf276bc4016a7e7f","isMergeCommit":false,"messageTitle":"Add necessity to the error handling","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"351638778793c0b541ba6688cdc165881a54b0e5","isMergeCommit":false,"messageTitle":"Add title display for visualization of charats","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":9}}},{"hash":"3066e3ac34446a5739eafda8ee2f116aaf4238c0","isMergeCommit":false,"messageTitle":"Add class UML diagram for visualization","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":0}}},{"hash":"93663628a169524515042589762b2622c091bdb3","isMergeCommit":false,"messageTitle":"Rename directory","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":0}}},{"hash":"9f50d88b075dbb702266bb4a0e6727040b421d47","isMergeCommit":false,"messageTitle":"Add acknowledgement for sources used by Frederick","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":15,"deletions":0}}},{"hash":"a45215efa03cc5b8a382f5996e8863c5634a9136","isMergeCommit":false,"messageTitle":"Add description for visualization feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":22,"deletions":2}}},{"hash":"abac801dc6610f4bb5d4e02736db135b90556b33","isMergeCommit":false,"messageTitle":"Add printing of message using ui singleton when visualizing cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":2}}}]},{"date":"2023-10-25","commitResults":[{"hash":"d314f8e128228bb2a4e313048d4d3800e5354069","isMergeCommit":false,"messageTitle":"Create Sequence UML for overall visualisation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":0}}},{"hash":"fcf64449e34c5f7cd5bdaf35611dc0d3d63a2b29","isMergeCommit":false,"messageTitle":"Create Sequence UML for categorizer","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":0}}},{"hash":"9d446349ea9f6b7a710820f7147e0dcdf84a3b20","isMergeCommit":false,"messageTitle":"Create Sequence UML for visualizer","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":0}}},{"hash":"3e334b94e49411de9db19303f6e4d80814ad1919","isMergeCommit":false,"messageTitle":"Add diagrams images to developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":2}}},{"hash":"ab5707322c4b7541d3c6e38eff04caf9a6ccc5d8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into VisDG","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"47c5b75463c2531b95c009f0906c75905fe3e79c","isMergeCommit":true,"messageTitle":"Merge pull request #108 from wwweert123/VisDG","messageBody":"Vis dg","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"21773315b5b33b1bad51a78c1b17678fc4e98fe8","isMergeCommit":false,"messageTitle":"Fix Junit for stock delete","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":9,"deletions":2}}},{"hash":"521139faa1b05419956e7ec6d07a1177d61a879f","isMergeCommit":false,"messageTitle":"Add cap to watchlist max stocks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"6dda9db4161d3ccb8042e28f3317e341d777be7f","isMergeCommit":false,"messageTitle":"Add disallowing of adding multiple of duplicate stocks to watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"d94d5d4abaa0a4c0f5b06b5536858ebb32058b90","isMergeCommit":false,"messageTitle":"Add check for correct size of JSON array response received","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"7d0d95006240c96ec6ecd789699dcbe9bf8622f2","isMergeCommit":false,"messageTitle":"Add check for the correct matching of JSON stock object to stock class object","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"e589a22a98e287186ce9ef35210fb0325136e0ce","isMergeCommit":false,"messageTitle":"Add the getting and printing of additional watchlist information (Market, daily high, daily low)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":61,"deletions":7}}},{"hash":"ec6fefc088fb562e542bd3cf64be9ab02cbe1f09","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}}]},{"date":"2023-10-27","commitResults":[{"hash":"d928fba83fed3e42c33e03f98565b84a3fcd3a59","isMergeCommit":true,"messageTitle":"Merge pull request #115 from wwweert123/FIxTestStock","messageBody":"Fix Junit for stock delete","fileTypesAndContributionMap":{}},{"hash":"f966c522ed58082edd1aead60e9efc1df674e51b","isMergeCommit":false,"messageTitle":"Refactor Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":20}}},{"hash":"bb468952fc09cfb8c41a9e010ddbb5130e4dbc3f","isMergeCommit":true,"messageTitle":"Merge pull request #116 from wwweert123/watchlistEnhancement","messageBody":"Watchlist enhancement","fileTypesAndContributionMap":{}}]}],"NeoMinWei":[{"date":"2023-10-05","commitResults":[{"hash":"4f47ae40234b912a4c5b7dc60382509629d101a3","isMergeCommit":false,"messageTitle":"Add name to AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":8,"deletions":8}}},{"hash":"f2c1d37c4806aa17f190a32959ef65e5687b4aee","isMergeCommit":true,"messageTitle":"Merge pull request #1 from ryan1604/ryanChua-AboutUs","messageBody":"Update AboutUs","fileTypesAndContributionMap":{}},{"hash":"2c62d715ae126cdd37eb029c1637b350c38be6de","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into NeoMinWei-AboutUs","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"22503c3b8de7c4b1a38b85131f14e6b63162ded7","isMergeCommit":true,"messageTitle":"Merge pull request #2 from NeoMinWei/NeoMinWei-AboutUs","messageBody":"Add name to AboutUs","fileTypesAndContributionMap":{}},{"hash":"068afbff53a8490ae4d79d8b323ea58f34470cf9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"df39139c6b034e42f46f335dcc8064168ac563aa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2d7049b261c1db9ee9b2fd302da80eac4f32b989","isMergeCommit":false,"messageTitle":"Create cashflow and income classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":0}}},{"hash":"f8e310a44b9827b00635f829dd8d1fd8a11224e9","isMergeCommit":false,"messageTitle":"Create ArrayList to store entries","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":0}}},{"hash":"ae8527bbe3908a49eee3eeba95bb39a9778f275b","isMergeCommit":false,"messageTitle":"Add ability to add income to the ArrayList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"c09c55e2fbf921cb8794c0eac6512dbc9b291f2a","isMergeCommit":false,"messageTitle":"Add ability to add income through user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":5}}},{"hash":"17fea1ee0b01d0acd6fa797bca86c66770974214","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":5}}},{"hash":"d5200ef10bf45e451d5057995598577e58195500","isMergeCommit":false,"messageTitle":"Add rounding of double values to 2 decimal places","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":2}}},{"hash":"c9daed435f0538014db06c642d487427e73b1ac8","isMergeCommit":false,"messageTitle":"Add expense class and ability to add expense through user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":3}}},{"hash":"26b06f9c92c6a293c902d83d8de8f4fa7434c443","isMergeCommit":false,"messageTitle":"Fix bug of not recognising description of parameters","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7}}},{"hash":"9e54041da9ee4d502cf0869ecbf0f32571491295","isMergeCommit":true,"messageTitle":"Merge pull request #32 from NeoMinWei/branch-income","messageBody":"Add Income and Expense","fileTypesAndContributionMap":{}},{"hash":"08684d0c749a38b97d55e31a5bf525fded9a7136","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"699cb40438315f404663b969d8a7e9330fa58887","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"62d46f719a6d2b1a8b804ac1a54b3ef6cc03b943","isMergeCommit":false,"messageTitle":"Add JUnit tests for addIncome() and addExpense()","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":56,"deletions":0}}},{"hash":"9dfd51ea57f7888e0c8eac32cc354313950d3c0c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into Branch-JUnit","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"c9fa29cd6aa140362bfaacdf93ae5c98b7ddf5b0","isMergeCommit":false,"messageTitle":"Add JUnit test for execute() in Entry","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":5},"test-code":{"insertions":29,"deletions":0}}},{"hash":"7e7c94aa80486995c938dc65216cb96d1b290fcc","isMergeCommit":true,"messageTitle":"Merge pull request #47 from NeoMinWei/Branch-JUnit","messageBody":"JUnit for addIncome and addExpense and execute","fileTypesAndContributionMap":{}},{"hash":"1c88d2ac4c68c1d9f7335cc5beb4b858e966467f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2990de0cc5378b9586045413ccd2bb3a8a259ff9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"fe1b5953d0fd0d3767e5ed5a5ce7f748651598ba","isMergeCommit":false,"messageTitle":"Rename FinancialList to CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":32},"other":{"insertions":24,"deletions":6},"test-code":{"insertions":12,"deletions":12}}},{"hash":"2be22452273938923c4666e0b1af0c17acfca335","isMergeCommit":false,"messageTitle":"Add toString method in Cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":12},"test-code":{"insertions":8,"deletions":8}}},{"hash":"73b1c64059a1ea52fcd4bac81d45be61ce1c621e","isMergeCommit":false,"messageTitle":"Add printAddedCashflow and printDeletedCashflow methods to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"7f0ff6575178c82185acd34370ed280d0ff9c9bb","isMergeCommit":false,"messageTitle":"Rename Entry class to AddCashflowCommand class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1},"other":{"insertions":6,"deletions":6}}},{"hash":"93058ea23bd016c655986c6368673c965819d4e8","isMergeCommit":false,"messageTitle":"Rename Entry class to AddCashflowCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":4}}},{"hash":"b8d5f995f6592fbb2e9a0f5f9525bf27f82b527c","isMergeCommit":false,"messageTitle":"Extract parsing method from AddCashflowCommand class to Parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":28},"test-code":{"insertions":0,"deletions":29}}},{"hash":"ef33866779c2999ab88f18d234af45c1ae46cf1c","isMergeCommit":false,"messageTitle":"Rename list to cashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"6b30cdad90948467b5fe2cd12651aa04467304a5","isMergeCommit":false,"messageTitle":"Add delete income/expense functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":128,"deletions":49}}},{"hash":"38dbc030b566522fd0f329ba247221284b2ed4af","isMergeCommit":false,"messageTitle":"Add JUnit testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3},"test-code":{"insertions":31,"deletions":8}}}]},{"date":"2023-10-16","commitResults":[{"hash":"781779dca09f480fe69d15dcdfcbd955af8c56d6","isMergeCommit":false,"messageTitle":"Delete unused constructor","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"20be5d31d905fc8458bc03b5bbe07a43b69cda7a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"372f730c17048dbfeef6a9573a4eb1178755f724","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/commands/AddStockCommand.java\n#\tsrc/main/java/seedu/financialplanner/commands/Command.java\n#\tsrc/main/java/seedu/financialplanner/commands/Exit.java\n#\tsrc/main/java/seedu/financialplanner/commands/Find.java\n#\tsrc/main/java/seedu/financialplanner/commands/Invalid.java\n#\tsrc/main/java/seedu/financialplanner/commands/WatchListCommand.java\n#\tsrc/main/java/seedu/financialplanner/list/CashflowList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n#\tsrc/test/java/seedu/financialplanner/commands/EntryTest.java\n#\tsrc/test/java/seedu/financialplanner/storage/StorageTest.java\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"7084894811134dccb133b5b495c4bc0c0c96c9ea","isMergeCommit":false,"messageTitle":"Wrap line to reduce line length","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":3,"deletions":2}}},{"hash":"2c874bb132ea38c1bef7df1c6d9b8ebdf8fdeb93","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"756fefab390978a479cca40dd1df6931800d245d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/AddCashflowCommand.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"1f0dd2ff73b0f8937c646a97b15280bbf1a4962f","isMergeCommit":false,"messageTitle":"Resolve renaming issues","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"0091535cb31b76adf7958cd54d4d4feac1048ab0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f5624bbdb0c6339bb71fc19b4ba56fb8b948be05","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/list/Cashflow.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"e9cd0d0fb2b11f8f93a515a31a980110d30f6597","isMergeCommit":true,"messageTitle":"Merge pull request #71 from NeoMinWei/Branch-DeleteIncome","messageBody":"Delete income and expense","fileTypesAndContributionMap":{}},{"hash":"77f97a183a9dad909f9a74bbf3755ca8ff7df89e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"61401f04364506993e3ba06fa4e9d52d9a4669a0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7d8d56d6e6c99dc005c3d68649bf6960d65284d2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteBugFix","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c39094ff72f2ff8fa468ec804cd3dfb3016fe480","isMergeCommit":false,"messageTitle":"Fix bug where wrong message is showing for error handling and when user inputs delete 0","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"169a0adc623031468978ad883a41a8862150d138","isMergeCommit":false,"messageTitle":"Add assertions for AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"c32e4c62168dba8284fb862f1bdcebd8ceaad008","isMergeCommit":false,"messageTitle":"Add error handling for empty type string","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":2}}},{"hash":"ffe8271a4dc18b4c8b4490697931915343ac4c08","isMergeCommit":false,"messageTitle":"Revert \"Add error handling for empty type string\"","messageBody":"This reverts commit c32e4c62168dba8284fb862f1bdcebd8ceaad008.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":14}}},{"hash":"6bcfea610b1d4ff267638f51777a3095c2f4686b","isMergeCommit":false,"messageTitle":"Add error handling of negative amount and recur value and empty type string","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":2}}},{"hash":"6124a059151ca2174be69affe593633855519e0e","isMergeCommit":false,"messageTitle":"Add assertions for DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"6ddac1f153c6f64db63f72da8612452b2573fbec","isMergeCommit":false,"messageTitle":"Add assertions to CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":2}}},{"hash":"2b845eaedab4f7b60b6c49cd14788b0880ad0e4f","isMergeCommit":false,"messageTitle":"Change message shown when recurring value is negative","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"b3e0e452479fb4240679bab91046264ca2ea19d8","isMergeCommit":true,"messageTitle":"Merge pull request #90 from NeoMinWei/Branch-DeleteBugFix","messageBody":"Branch delete bug fix","fileTypesAndContributionMap":{}},{"hash":"2d9688e30c0c074ef4147b14a5ad27494ce48506","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7adc4fbbec1014c742e32d1388eb3106eb1d2060","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"02fdad409ee5ae84faed74f3dbab5b53fca89bda","isMergeCommit":false,"messageTitle":"Add logging for AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0}}},{"hash":"951cab2e9360ac30ec87e1a28343e9ed0942a20d","isMergeCommit":false,"messageTitle":"Add logging for DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1}}},{"hash":"37c006a162c8d924bf64485b7c7712e7fbbc1b2e","isMergeCommit":false,"messageTitle":"Add logging for CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"93b4095f0b68d6d7f32f1596a8ee627a79bfb05f","isMergeCommit":false,"messageTitle":"Add logging for try statements in DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"82e3d8c5fd251bb8e1486bdb6f6c3e95399a0864","isMergeCommit":false,"messageTitle":"Add logging for try statements in AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"54479b36eabc35a3f621e042138e59d445c91f99","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"68bda88f9c684d8c4a4b8b0dc6df61873109a0eb","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/AddCashflowCommand.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7c3e3e695bfb2c6af6de09d685d668f1857922bc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8b673dc53f4e4559f6ae72d819eccce881ee8ff8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d267f8af00aaf208b518f698d83f5f218937d394","isMergeCommit":true,"messageTitle":"Merge pull request #92 from NeoMinWei/Branch-LogAndAssert","messageBody":"Branch log and assert","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"1c7a198c54a94f55dbd16c1f888835ebe0772fb8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"99e9427b0418815aefec44af8fe242507e05b5bd","isMergeCommit":false,"messageTitle":"Add getInstance() method for singleton CashflowList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":13}}},{"hash":"19547febc66f3905749b7b3e6e9eb27db45ee85f","isMergeCommit":false,"messageTitle":"Add income and expense type enums","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"2afd67b5f1cd51357312a17c58947cfd71a242be","isMergeCommit":false,"messageTitle":"Add getInstance() method to Ui singleton class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":10},"test-code":{"insertions":13,"deletions":13}}},{"hash":"25cd60a45336566458b9a16ab9ad66c084aa92ae","isMergeCommit":false,"messageTitle":"Change access to CashflowList and Ui classes to getInstance()","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":13}}},{"hash":"e92ba9b9c5e429c604f141abe33fd05c6d91d23a","isMergeCommit":false,"messageTitle":"Change Income and Expense type from String to enum","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":131,"deletions":50}}},{"hash":"c4e41d83fd1e92fe05a4537f7a569dfb27adaa5d","isMergeCommit":false,"messageTitle":"Update JUnit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":22,"deletions":18}}}]},{"date":"2023-10-23","commitResults":[{"hash":"968f1a0bb09190f2bce3fdb8acfa5dc8963253e0","isMergeCommit":false,"messageTitle":"Add necessities to expensetype enum","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"a1ca760be3ac8d12e7a8ecbfbb780d44a2b86685","isMergeCommit":true,"messageTitle":"Merge pull request #97 from NeoMinWei/Branch-IncomeCategory","messageBody":"Branch income category","fileTypesAndContributionMap":{}},{"hash":"df13bf64fe71770b01403a0c69a89f465db87410","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4727ec201e21927e13f40a0c34c6bc8fe80d0460","isMergeCommit":false,"messageTitle":"Fix assertion bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"78e885388c0e166556932ee690e23a7208580b4c","isMergeCommit":true,"messageTitle":"Merge pull request #103 from NeoMinWei/Branch-IncomeCategoryBugFix","messageBody":"Branch income category bug fix","fileTypesAndContributionMap":{}},{"hash":"1edb7f0f4213a367b3de9548a7a2833ac629d3f6","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"bc66820c21c502609fa59ff04a06d86d73d5b834","isMergeCommit":false,"messageTitle":"Add acknowledgements to DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":0}}},{"hash":"2045e223d05df6f20dcc1a89adcb4b9240bcdc62","isMergeCommit":false,"messageTitle":"Add sequence diagram for add cashflow mechanism","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"371a4be0a130b7a04e282c65ffeb8c393aed42d6","isMergeCommit":false,"messageTitle":"Add Cashflow class diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":33,"deletions":0}}},{"hash":"e9b34745a291deb58c999b29946bc642bd096279","isMergeCommit":false,"messageTitle":"Add Cashflow sequence diagram image","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ed48bd06fb1058ff32ae61558b3970bcb25cdbfa","isMergeCommit":false,"messageTitle":"Update sequence","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":8}}},{"hash":"74f6960448f47adae6b4bdbd4dcc1163f72843da","isMergeCommit":false,"messageTitle":"Update class diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ba4027efe30bb026162c36a165a2d18d735282ee","isMergeCommit":false,"messageTitle":"Update UG with add income/expense feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":45,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"7c95abd280fb99cbc170653776856a389685314e","isMergeCommit":false,"messageTitle":"Fix typo","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ae8761b1898e80dc0f6a5754ed181125a251abce","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fb5043a60275972bb89c129cee4e39ce92ea1888","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-UMLforIncomeAndExpense","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"f4b51909654a690c3b2ecb2bd620926dd1326940","isMergeCommit":true,"messageTitle":"Merge pull request #111 from NeoMinWei/Branch-UMLforIncomeAndExpense","messageBody":"UML for income and expense","fileTypesAndContributionMap":{}},{"hash":"15ae6707427c114509ffd3b62294c199b8facb41","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d3ca0986187d0ea6822080bd28e0ac98ab7c0143","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"656d50e12e416b164337282e07aeee816146ad7d","isMergeCommit":false,"messageTitle":"Add description argument","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":13}}},{"hash":"b5acf6d892eec6e5b7ea16ecd331f011408758c0","isMergeCommit":false,"messageTitle":"Update tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":10,"deletions":6}}},{"hash":"96645cb039afa0245efc92e148f14b590b2a9e88","isMergeCommit":false,"messageTitle":"Update storage for cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":4}}},{"hash":"4a5cdc73d8b300be5b22d81a4756f7a0aa7b14d2","isMergeCommit":false,"messageTitle":"Add logging for getting description","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"e27031ba253b578571b583d6e6e92634e07a416a","isMergeCommit":false,"messageTitle":"Rename list package to cashflow for clarity","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":36},"other":{"insertions":13,"deletions":13},"test-code":{"insertions":6,"deletions":6}}},{"hash":"54173570879976b60ac2874a428cd6f6b0eb7862","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a0a57fb7be86a7c43635d9e92627f5e496c18819","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-IncomeDescription","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e73f490a7dadf73874a656daa8cb828c2a1b5b30","isMergeCommit":false,"messageTitle":"Refactor code to make it more neat","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":14}}},{"hash":"d7b3cf055cd0887b10ce1eea72c80c3909a8fe93","isMergeCommit":false,"messageTitle":"Add exception when description is empty","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"543ea73335c896efae2325529f1f2835c70b1e35","isMergeCommit":true,"messageTitle":"Merge pull request #118 from NeoMinWei/Branch-IncomeDescription","messageBody":"Branch income description","fileTypesAndContributionMap":{}}]}],"ryan1604":[{"date":"2023-10-05","commitResults":[{"hash":"eab7be4bcbb2bd13648ec4f347d0278a5b33b3b1","isMergeCommit":false,"messageTitle":"Update AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-07","commitResults":[{"hash":"e8da8d09f6900bdcf1299dabba13d3177794676f","isMergeCommit":false,"messageTitle":"Setup Ui and rename Duke to FinancialPlanner","messageBody":"Fixes #5\n","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":22},"other":{"insertions":3,"deletions":3}}},{"hash":"d5be6d4bae825dbb2ba49c20588e7d1ecfaa8f7e","isMergeCommit":false,"messageTitle":"Add FinancialPlannerException","messageBody":"Fixes #8\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"41909a10cf9d822fabd58091788fa8d898615517","isMergeCommit":false,"messageTitle":"Add Parser, add \u0027exit\u0027 and \u0027invalid\u0027 command to Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"d926641278054652b6bf5faba4d7a71495ad91b9","isMergeCommit":true,"messageTitle":"Merge pull request #26 from ryan1604/branch-setup","messageBody":"Branch setup","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"4b7aa80bfe1c46aac6581012cfe57fe4efd37ab2","isMergeCommit":false,"messageTitle":"Update test file and multiple code refactorings","messageBody":"Fixes #34\n","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":26}}},{"hash":"91c6f28655a8d39e1d9b3067075e1ef6c6b3f2c0","isMergeCommit":false,"messageTitle":"Remove unused import in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"636fa41f0e93e2a58fac846ff766483ae2845427","isMergeCommit":true,"messageTitle":"Merge pull request #35 from ryan1604/branch-code-quality","messageBody":"Update test file and multiple code refactorings","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"dfffa4ac58a33413fbc45a1fa59b2d4faed0bcac","isMergeCommit":false,"messageTitle":"Setup storage","messageBody":"Fixes #7\n","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":0}}},{"hash":"8c328c6af2a61181bc07c1bcf8677e49b31630e8","isMergeCommit":false,"messageTitle":"Add save functionality for income and expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":1}}},{"hash":"75847cd1846bd27dab82dbc0dab5da96cf596d33","isMergeCommit":false,"messageTitle":"Add load functionality and edit EXPECTED.TXT","messageBody":"Fixes #38\n","fileTypesAndContributionMap":{"functional-code":{"insertions":70,"deletions":4}}},{"hash":"95cd96179ef5466fadecdc7027762af2af1e1c43","isMergeCommit":false,"messageTitle":"Add error handling for storage","messageBody":"Fixes #39\n","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":9}}},{"hash":"b8b88c5b065e937a31978ae306c56d41a2b75706","isMergeCommit":false,"messageTitle":"Update catch block in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"0eca8f566599608a2dd256f9aef4a8147595722f","isMergeCommit":false,"messageTitle":"Add in \u0027run\u0027 method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"91787a92b2a4b4ba60fcbd4762f03d583cf55720","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-storage","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Ui.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"cfd188be4932c9db8da02c85f943ba2c26a2e5aa","isMergeCommit":true,"messageTitle":"Merge pull request #40 from ryan1604/branch-storage","messageBody":"Add storage","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"3501ede398172c065fabdf26f4e4706df23686c9","isMergeCommit":false,"messageTitle":"Add storage test for loading valid data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":17},"test-code":{"insertions":29,"deletions":0}}}]},{"date":"2023-10-13","commitResults":[{"hash":"a61e59da1fb118eb86fdedbbafcb124bfef873a5","isMergeCommit":false,"messageTitle":"Add storage test for:","messageBody":"- load invalid data\n- save valid data\n- save non-existent file\n\nFixes #46\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":19},"test-code":{"insertions":37,"deletions":1}}},{"hash":"d048f440dbb5e3fe9617dda4c50edab3904307c3","isMergeCommit":false,"messageTitle":"Follow coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":1,"deletions":1}}},{"hash":"6bdf7e453019f8b40fb962822b1db0652308ce57","isMergeCommit":false,"messageTitle":"Rename data to testData folder","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"398fc42b1fc6bee7ca4825f966ddfd61fb400eef","isMergeCommit":true,"messageTitle":"Merge pull request #48 from ryan1604/branch-JUnit","messageBody":"Junit tests for storage","fileTypesAndContributionMap":{}},{"hash":"1c81748388c8834d4ad2125d39dbb70a8e192d51","isMergeCommit":false,"messageTitle":"Make objects private in test classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":5}}},{"hash":"09c4f10ef1b93b7d4006e4e9ee8e7530db81438c","isMergeCommit":false,"messageTitle":"Clears list at the end of method","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":0}}},{"hash":"b6f7a7cbb9a8fd3b9830aa4aebd3d360bbf5f6d3","isMergeCommit":false,"messageTitle":"Undo clearing of list and set cashflow balance to 0 in testAddIncomeAndExpense","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":3}}},{"hash":"1437d9a753198822b0f8c0881ee6858194829c66","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"653b5feac428aa3eb4a8799b199ad6fc937cb2d4","isMergeCommit":true,"messageTitle":"Merge pull request #49 from ryan1604/branch-JUnit-2","messageBody":"Fix CI failing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"28cfe5345285e27661812b3a3a21ff1dafebf0af","isMergeCommit":false,"messageTitle":"Add Budget class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"f166d899d4192414e397be9695f7ab466ed91ceb","isMergeCommit":false,"messageTitle":"Add BudgetCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":0}}},{"hash":"5acc2f839e4007ad39ee4fbb069e023c00456cfc","isMergeCommit":false,"messageTitle":"Add setBudget to FinancialList and update test files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"0ca7eeac266bc0a105ef37e9c58e1834f5d25850","isMergeCommit":false,"messageTitle":"Add overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"ff40a9b9b08d48c6dbcb89fb637fa403e8f9f89c","isMergeCommit":false,"messageTitle":"Update overview to show:","messageBody":"- Total balance\n- Highest income\n- Highest expense\n- Watchlist\n\nFixes #29\n","fileTypesAndContributionMap":{"functional-code":{"insertions":46,"deletions":2}}},{"hash":"1c099725de56ae0fe7476dd7294229998340ed16","isMergeCommit":false,"messageTitle":"Edit setBudget method in FinancialList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":5}}}]},{"date":"2023-10-16","commitResults":[{"hash":"3e1db303a86296ac9eea5229d4af38e65b6ee86a","isMergeCommit":true,"messageTitle":"Merge pull request #70 from YFshadaow/branch-refactor-command-parse-logic","messageBody":"Refactor code: Restructure command parse logic","fileTypesAndContributionMap":{}},{"hash":"e197a46699b33e0ee4f1c0158d32d24edd8e0fe1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-budget","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"9790808efd401a0add9b17e445f73e792823dbca","isMergeCommit":false,"messageTitle":"Add storage and exceptions for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":24}}},{"hash":"b6a93fdf77d18006ed5b8af749def38bc5b1a6b1","isMergeCommit":false,"messageTitle":"Update Budget","messageBody":"Fixes #59\n","fileTypesAndContributionMap":{"functional-code":{"insertions":90,"deletions":50}}},{"hash":"7dc589fac79d029a9161b1e73f9dd6c09b230cff","isMergeCommit":false,"messageTitle":"Update budget when new expense is added","messageBody":"Fixes #60\n","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":4}}},{"hash":"aa68bb059f3bf8201c0830bd13a714577428adbd","isMergeCommit":false,"messageTitle":"Add ability to update budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":72,"deletions":39}}},{"hash":"4a25982c9f7dea52d0d5b50b0b9ed4c6da622a22","isMergeCommit":false,"messageTitle":"Update test files and format printing of double to 2d.p","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":6}}},{"hash":"8ff7b412958e60cf34968d32ce1d8b2e0a17d58c","isMergeCommit":false,"messageTitle":"Add JUnit tests for Budget and update ValidData.txt","messageBody":"Fixes #73\n","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":0}}},{"hash":"6bfd86e9bf988f2b31c9683606facdc1550f2475","isMergeCommit":false,"messageTitle":"Update code to follow coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1},"test-code":{"insertions":0,"deletions":1}}},{"hash":"c45bba6e16e98a3ca9c500a5ec64c598ec444c49","isMergeCommit":false,"messageTitle":"Remove redundant get() and size() methods in cashFlowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":11}}},{"hash":"e417fcac442470226432184427bd86a06da278f7","isMergeCommit":false,"messageTitle":"Update error handling for update budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"89d5babd83af99396efcc453995b7002edf6f988","isMergeCommit":false,"messageTitle":"Standardise case statements","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":16}}},{"hash":"f5a16724e320f6246beb2eff33076b79661cb44b","isMergeCommit":true,"messageTitle":"Merge pull request #57 from ryan1604/branch-budget","messageBody":"Add budget functionality","fileTypesAndContributionMap":{}},{"hash":"c73982cb0a6c78b95ec5f1e30e7fdf6213da690b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"ab2f4ada4e7927c3e547ff23c80429d5fa018a85","isMergeCommit":false,"messageTitle":"Update overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":24}}},{"hash":"75d7c453aa561d32dc04f507920e91866cd3cd42","isMergeCommit":false,"messageTitle":"Refactor code in budget and overview","messageBody":"Fixes #29\n","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":16}}},{"hash":"8e970f586211c98a67104e2e5e60c1467290283f","isMergeCommit":false,"messageTitle":"Fix bug in loading storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":7}}},{"hash":"3574b3c588bb57865216155149965ac36741d658","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"01fbdd18f50dc01d6273bb8ae0f716d76658c798","isMergeCommit":false,"messageTitle":"Update error handling for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"b33a0c71e3a82cedd3deac14b53ee8c881b63934","isMergeCommit":false,"messageTitle":"Refactor code:","messageBody":"- Refactor formatting of double to string\n- Reduce nesting in overviewcommand\n- Clean up code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":27}}}]},{"date":"2023-10-17","commitResults":[{"hash":"f46a0628faea24ba86aaa54141916d104fbe1f3a","isMergeCommit":false,"messageTitle":"Add logger storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":0}}},{"hash":"3705db0f6ea636d00d7f362a21c577710a687ccf","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"b10f74a3137f0b43f7a486e06506a6cc47ba5ae1","isMergeCommit":false,"messageTitle":"Add logging and assertions for budget","messageBody":"Fixes #87\n","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":0}}},{"hash":"5b25ce5873e76f7c67e8c61128f2ef939c22f7f7","isMergeCommit":false,"messageTitle":"Update warning message in logger","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f63d6e938171d41ab2214df06a989a882819fe7","isMergeCommit":false,"messageTitle":"Add error handling and standardise logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":5}}},{"hash":"c97daf2496479364271d54c2da1b3e6466e9fa8c","isMergeCommit":false,"messageTitle":"Extract print statement to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":8}}},{"hash":"324016184917721a91fc9b91fcb06c0eb783ef89","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"6bf095c5e50f765fd3765a3a7fd859ecbc01591b","isMergeCommit":true,"messageTitle":"Merge pull request #58 from ryan1604/branch-overview","messageBody":"Add overview functionality","fileTypesAndContributionMap":{}},{"hash":"df007a1a9b2bc34f17c112cefc2cf3eea948896a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-logger","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/BudgetCommand.java\n","fileTypesAndContributionMap":{}},{"hash":"19dcfc60b44a315ae74f99f0b8cf12b161ce7d81","isMergeCommit":false,"messageTitle":"Add error handling for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":4}}},{"hash":"446763c7940b0fb0237c2ac6b976bec1c9d1156b","isMergeCommit":true,"messageTitle":"Merge pull request #91 from ryan1604/branch-logger","messageBody":"Add logging and assertions for BudgetCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"f4bb78cbbff71e0d1074ca5c73a2173463dea77e","isMergeCommit":false,"messageTitle":"Remove logger from showing on terminal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0}}},{"hash":"c0ecc3c340179354b78b359112397dc30790f305","isMergeCommit":true,"messageTitle":"Merge pull request #95 from ryan1604/branch-logger","messageBody":"Remove logger from showing on terminal","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"ee85fdd3450c29e6f2fa8ea93bc9d3aa8a7ee4ac","isMergeCommit":false,"messageTitle":"Update error handling for storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":14}}},{"hash":"e33e09d9d6bca826602f6a0a646029f3ff5f69f3","isMergeCommit":false,"messageTitle":"Rename AbstractCommand to Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":18},"other":{"insertions":1,"deletions":1}}},{"hash":"21edafcc87654ea480d1c35ab2ec453623792070","isMergeCommit":false,"messageTitle":"Update singleton and error handling for storage, refactor storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":17},"test-code":{"insertions":6,"deletions":8}}},{"hash":"b4bf06354ec1e651df2c1b0835e8c82c2c4d796b","isMergeCommit":false,"messageTitle":"Add ability to delete, reset and view budget","messageBody":"Fixes #74\n","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":14}}},{"hash":"2ad5082d556bde5cd1dacfa4c3f9abcdf11f49a5","isMergeCommit":false,"messageTitle":"Refactor Budget, fix bug and clean up code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":78}}},{"hash":"f3d525423735d5a193da257d3b598f941e8a3a4b","isMergeCommit":false,"messageTitle":"Add JUnit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":69,"deletions":0}}},{"hash":"ea37034ac84b421b3b6038ea67cc563809a4ba80","isMergeCommit":false,"messageTitle":"Add balance command","messageBody":"Fixes #100\n","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}},{"hash":"4f0d456e878d1f1cab572bcd372c767ddcad1c25","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"7d46886ffb53b08a1cd0ac3da012cf32dad037cd","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-budget","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/investments/WatchList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"67fddc3c6856207ecdb706ba890e3351cd224e96","isMergeCommit":false,"messageTitle":"Edit FinancialPlanner","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"50e26e9bff8931193e94816246a8442e86620007","isMergeCommit":true,"messageTitle":"Merge pull request #101 from ryan1604/branch-budget","messageBody":"Update budget and clean up code","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"dc34fb4f3597f37652bbf91bb168e07ebfbea8ee","isMergeCommit":false,"messageTitle":"Add sequence diagrams for budgetcommand","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":75,"deletions":0}}},{"hash":"614c03bccff12e4aeb95e9cf908b81db9760f46c","isMergeCommit":false,"messageTitle":"Fix bug in loadBudget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"96fe8e91919e5f59141946ed846c5cd4d3804c43","isMergeCommit":false,"messageTitle":"Add class diagram for storage","messageBody":"Add style.puml from addressbook-level3\n","fileTypesAndContributionMap":{"docs":{"insertions":117,"deletions":0}}},{"hash":"98db3870b2a1642d81b534a75b87f89cbb095ed1","isMergeCommit":false,"messageTitle":"Update DG and diagrams","messageBody":"Fixes #106\n","fileTypesAndContributionMap":{"docs":{"insertions":58,"deletions":4}}},{"hash":"46f08fe1df842f6d9a3e2a66e809e49bc1061e96","isMergeCommit":false,"messageTitle":"Fix error in storage diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"364cd90ab3889d86ba988ddec7c0bccc890e5c48","isMergeCommit":false,"messageTitle":"Change names in diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":9}}},{"hash":"53ec46b8455c109fbca2162f43ea911d5199efb5","isMergeCommit":true,"messageTitle":"Merge pull request #107 from ryan1604/branch-bugfix","messageBody":"Fix bug in loadBudget","fileTypesAndContributionMap":{}},{"hash":"c3b9f2891401df69d30c54d1661cf3c73fa78ce5","isMergeCommit":true,"messageTitle":"Merge pull request #110 from ryan1604/branch-uml","messageBody":"Add diagrams for budgetcommand and storage","fileTypesAndContributionMap":{}},{"hash":"db195afb3523823484f75b050f34047deeb7d5a5","isMergeCommit":false,"messageTitle":"Fix visual in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":3}}},{"hash":"f3448a2440740014b14b206a8e2d881ca217b47f","isMergeCommit":true,"messageTitle":"Merge pull request #113 from ryan1604/branch-uml","messageBody":"Fix visual in DG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"11b2b150107f908f239f2469ec021ebd049f9a80","isMergeCommit":false,"messageTitle":"Update storage diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":12}}},{"hash":"6d04cb1d2126251eff52ef166980bc558c51f506","isMergeCommit":false,"messageTitle":"Update DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":19}}},{"hash":"2a16939ea19a75e7be88095960d6d869f369ce06","isMergeCommit":false,"messageTitle":"Update overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":14}}},{"hash":"2ee59837d6969e00885d562bf8af21898bf7a84f","isMergeCommit":false,"messageTitle":"Extract method in budget command and update DG","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":17},"docs":{"insertions":5,"deletions":5}}},{"hash":"6fa7dc87d5df38ce68d2ee34261b65c9249d5951","isMergeCommit":false,"messageTitle":"Add assertion to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-27","commitResults":[{"hash":"7590b789233a6734bdc9d6c105001eb4a077d540","isMergeCommit":false,"messageTitle":"Add logging to ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1}}},{"hash":"02571fe412b0507a0021ac111ef1371cda6b7d15","isMergeCommit":false,"messageTitle":"Add variables to improve readability","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2}}},{"hash":"c92ed860899ec19d3845231e1c01266fae39553f","isMergeCommit":false,"messageTitle":"Update sequence diagrams","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":12,"deletions":13}}},{"hash":"646af5464658b7ea77bcbefc51057c0b97005830","isMergeCommit":true,"messageTitle":"Merge pull request #114 from ryan1604/branch-overvieww","messageBody":"Update overview command and DG","fileTypesAndContributionMap":{}},{"hash":"412fc190e1de534e10dd256066463d2ea4fe7937","isMergeCommit":false,"messageTitle":"Update JUnit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":97,"deletions":0}}}]},{"date":"2023-10-28","commitResults":[{"hash":"a3fc3c5b0968c530439ef2f345088f3161f70ce7","isMergeCommit":false,"messageTitle":"Update UG and fix minor bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7},"docs":{"insertions":160,"deletions":16}}},{"hash":"261dfa7799f523f1b961c1b70782fe590f570b91","isMergeCommit":false,"messageTitle":"Fix sentence in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e379b2a147d4ffc4d27cb3f4d955c7a5d4b1c8da","isMergeCommit":true,"messageTitle":"Merge pull request #117 from ryan1604/branch-JUnit","messageBody":"Update JUnit tests","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"715d104667aefc79944d664c609de2f22381a734","isMergeCommit":false,"messageTitle":"Add table of contents to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":1}}},{"hash":"f84cb8f899f63448a08a00588bef6f5b2f5968aa","isMergeCommit":true,"messageTitle":"Merge pull request #119 from ryan1604/branch-UG","messageBody":"Update UG and fix minor bugs","fileTypesAndContributionMap":{}}]}],"YFshadaow":[{"date":"2023-10-13","commitResults":[{"hash":"7828ae3395aae5d90d22f6743b43b03445b289a9","isMergeCommit":false,"messageTitle":"Refactor code: Use singleton instead","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":38},"test-code":{"insertions":15,"deletions":15}}},{"hash":"a126234d9b789bbeb6ac1ed4def47833d3356e48","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"89366d90a98581607b043727aa7a8eaf05227920","isMergeCommit":true,"messageTitle":"Merge pull request #50 from YFshadaow/master","messageBody":"Refactor code: Use singleton instead","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"a7b5722ca73a4b15a5c0e25b783a9fb827b30f28","isMergeCommit":false,"messageTitle":"Refactor code: Restructure command parse logic","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":254,"deletions":151},"other":{"insertions":21,"deletions":14},"test-code":{"insertions":9,"deletions":9}}}]},{"date":"2023-10-16","commitResults":[{"hash":"7ed9cafa3c7bd26a4641c1ec66c018e371c42434","isMergeCommit":false,"messageTitle":"Update code to pass style checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":26}}},{"hash":"28dd7ef23c898f7c9a91969a499e1463e6f12b2e","isMergeCommit":false,"messageTitle":"Update test files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":24},"other":{"insertions":7,"deletions":5},"test-code":{"insertions":29,"deletions":21}}},{"hash":"989068feb2dd79c2e54c25b3b6d3965507ea1cef","isMergeCommit":false,"messageTitle":"Add list commands. Minor changes include: - Remove EMPTY cash flow category - Refactor delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":90,"deletions":16}}},{"hash":"76ef2f72103f0f0e994d3cb8440b4bd9775feaf0","isMergeCommit":false,"messageTitle":"Minor change: Remove redundant else block","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"1c5bad2c052f99ee730902c95ee31b39655aa240","isMergeCommit":true,"messageTitle":"Resolve merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2a7a8aa2c20b6fb8e871c81322c8d3c5f42fc4fc","isMergeCommit":false,"messageTitle":"Fix style error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"b0110338046a582dea04a00eb12c6ff4ab682574","isMergeCommit":true,"messageTitle":"Merge pull request #89 from YFshadaow/branch-list-command","messageBody":"Add list command","tags":["v1.0"],"fileTypesAndContributionMap":{}}]}],"hshiah":[{"date":"2023-10-05","commitResults":[{"hash":"f4e110ae257a2d4b5945b76e92c4f67b53a9b9c9","isMergeCommit":false,"messageTitle":"Test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"483fb3d416dea3f0ae1999b544aaa379f9eb6575","isMergeCommit":true,"messageTitle":"Merge pull request #4 from hshiah/hshiah","messageBody":"Shi,Haochen","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"22508414ff64c714b8c24237a8ab30432ade3775","isMergeCommit":false,"messageTitle":"implement function find","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":0}}},{"hash":"8553ea5738eaa15aacfd028fd0832607330e3a48","isMergeCommit":true,"messageTitle":"Merge pull request #45 from hshiah/master","messageBody":"implement function find","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"2c4321ec694fab448316d4670acb2409d60896d6","isMergeCommit":false,"messageTitle":"Add reminder","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":88,"deletions":1}}},{"hash":"436ee1eebba2e020d95e82cdc8089a335fafdcfb","isMergeCommit":true,"messageTitle":"Merge pull request #86 from hshiah/hshiah","messageBody":"Add reminder","fileTypesAndContributionMap":{}},{"hash":"5e6072c3cfd8377d6401e4aa8656c4abf71508fe","isMergeCommit":false,"messageTitle":"Finish setting goals Fix bugs of find command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"401308ac27b8077cd80a9378c8938e2b258ed136","isMergeCommit":false,"messageTitle":"Fix some points mentioned by groupmates","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":27}}},{"hash":"e9a6466bf2b37b67c9b63997e1fc4c3a042688ff","isMergeCommit":false,"messageTitle":"Solve conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":11}}},{"hash":"835cc572869e4c70387ca9ba0e5bc42721c228d9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into hshiah","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f87a53b2a70f909bafc095d6c425d023c4e5c8e9","isMergeCommit":false,"messageTitle":"Delete getValue function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":6}}},{"hash":"cd9ad14c299d2642e1d7737dc8e675d7b4cee4a3","isMergeCommit":true,"messageTitle":"Merge pull request #88 from hshiah/hshiah","messageBody":"Finish setting goals","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"wwweert123":{"docs":178,"functional-code":680,"test-code":43,"other":3},"NeoMinWei":{"docs":119,"functional-code":593,"test-code":131},"ryan1604":{"docs":421,"functional-code":817,"test-code":252,"other":2},"YFshadaow":{"docs":0,"functional-code":294,"test-code":17},"hshiah":{"docs":0,"functional-code":205,"test-code":0}},"authorContributionVariance":{"wwweert123":4509.1733,"NeoMinWei":12832.444,"ryan1604":20606.352,"YFshadaow":7598.486,"hshiah":1004.79504},"authorDisplayNameMap":{"wwweert123":"CS2113-T18-2 PUA ..RICK","NeoMinWei":"CS2113-T18-2 NEO .. WEI","ryan1604":"CS2113-T18-2 CHUA..RYAN","YFshadaow":"CS2113-T18-2 REN ..GDAO","hshiah":"CS2113-T18-2 SHI ..CHEN"}} +{"authorDailyContributionsMap":{"wwweert123":[{"date":"2023-10-05","commitResults":[{"hash":"491c9238e3c2b52f8ddaa10ba332e9566a8b7e9e","isMergeCommit":false,"messageTitle":"Add aboutus links and add my my own md file","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":7}}},{"hash":"2712d42c6b6d4552c9a0ea7bcc75de166bdf1546","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into Frederick-AboutUs","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"11db7a69a38c31d6f7658163f69ac8726f80a0b0","isMergeCommit":true,"messageTitle":"Merge pull request #3 from wwweert123/Frederick-AboutUs","messageBody":"Add aboutus links and add my my own md file","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"68d635974b5493f20ba1ffaa1b953cf0b798a5ae","isMergeCommit":false,"messageTitle":"Add new watchlist command and pull from FMP api for stock data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"5f7d5ba1fafae93224d2ae0559edae789e3747bd","isMergeCommit":false,"messageTitle":"Add simple JSON library to parse response body and print to UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"bfa75c44ff77cc7824fb4a072c8d4a8e94a19e09","isMergeCommit":false,"messageTitle":"Use string format to create request URI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"d5ac9fceb7e20c02055b08cff4c73c88830bb993","isMergeCommit":false,"messageTitle":"Add a stock class and have the watchlist query API endpoint using stock classes created","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":2}}},{"hash":"66c6dc6ad21cbde9abe158bb32b30160a572021d","isMergeCommit":false,"messageTitle":"Add commons lang library to allow for padding of string when printing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":7},"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-09","commitResults":[{"hash":"9a32030207906b044fd774d1afcc8768c2f52b51","isMergeCommit":false,"messageTitle":"Create a watchlist class to reference stocks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":0},"other":{"insertions":12,"deletions":35}}},{"hash":"a311199b47d9c35e55f5509eaba762545283cd61","isMergeCommit":false,"messageTitle":"Create method in UI to print stock prices","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":0}}},{"hash":"84fb7092fb5158ab4e8aeb7b0e00b521bdd981df","isMergeCommit":false,"messageTitle":"Add watchlist parameter to execute","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":6}}},{"hash":"2977b5bb71d186cf5ba1d7e15eb4c59e029f88c3","isMergeCommit":false,"messageTitle":"Initialize watchlist on startup","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"df5605a78870802546be8dc5b852348e41405f8c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickWatchlist","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/commands/Command.java\n#\tsrc/main/java/seedu/financialplanner/commands/Exit.java\n#\tsrc/main/java/seedu/financialplanner/commands/Invalid.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"74e0b77d800eb36b21b1534bb75611548d2b2164","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":16}}},{"hash":"fab0ae11bdae69d18f598f87848130409af67551","isMergeCommit":true,"messageTitle":"Merge pull request #33 from wwweert123/FrederickWatchlist","messageBody":"Frederick watchlist","fileTypesAndContributionMap":{}},{"hash":"a778bb54cf3c686fc074b019c292a87b7beeb3dd","isMergeCommit":false,"messageTitle":"Add command for adding stock to watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":5}}},{"hash":"bece3c1c0e553317e4fa0715467f3a782b274f1c","isMergeCommit":false,"messageTitle":"Add some minor error handling for response from API endpoint","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":9}}}]},{"date":"2023-10-10","commitResults":[{"hash":"c6df4b251e96eda6f8271f3b1c9d4a7c8c5cd6f3","isMergeCommit":true,"messageTitle":"Merge pull request #37 from wwweert123/FrederickAddStock","messageBody":"Frederick add stock","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"bef5bea11ba3f9ee327b12830092670706eb6c8c","isMergeCommit":false,"messageTitle":"Add testcases for addstock and fetchFMPStockPrices","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":31,"deletions":0}}},{"hash":"92df6fe7a3c18bfd7283694eafeee6fb0e82f070","isMergeCommit":false,"messageTitle":"Fix Code styles","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":3}}},{"hash":"1afcc973197329792f60e23295c485d963590453","isMergeCommit":false,"messageTitle":"Fix imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":0}}},{"hash":"5471bf86202514018adf0251d3811de39949cdde","isMergeCommit":true,"messageTitle":"Merge pull request #44 from wwweert123/JUnitWatchlist","messageBody":"Add testcases for addstock and fetchFMPStockPrices","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"00f4c3f960e81461c36262c92bbd2dfa2a9d8541","isMergeCommit":false,"messageTitle":"Fix bug by changing api endpoint and changing api key","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":21},"test-code":{"insertions":1,"deletions":1}}},{"hash":"52856fb2cda836fc593956eca93d3d2e7cab04ea","isMergeCommit":true,"messageTitle":"Merge pull request #52 from wwweert123/FrederickStockAPIChange","messageBody":"Fix bug by changing api endpoint and changing api key","fileTypesAndContributionMap":{}},{"hash":"f4935d893db62558f2c75ebdddd419e7b39f15b6","isMergeCommit":false,"messageTitle":"Fix test and remove market from add stock","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":3}}},{"hash":"0782c150bb1bb098038134bdbf37d56e35bee902","isMergeCommit":true,"messageTitle":"Merge pull request #53 from wwweert123/FrederickStockAPIChange","messageBody":"Fix test and remove market from add stock","fileTypesAndContributionMap":{}},{"hash":"acb5bdbfd096302f98eea97c01f4a6e360c1395b","isMergeCommit":false,"messageTitle":"Fix bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"test-code":{"insertions":1,"deletions":1}}},{"hash":"da1f2d50202a960b187bbbebcf4514c9aa128d68","isMergeCommit":true,"messageTitle":"Merge pull request #54 from wwweert123/FrederickStockAPIChange","messageBody":"Fix bug","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"7d495e4009402389b717de162fc78f288ba88fc1","isMergeCommit":false,"messageTitle":"Add new dependency for creating data plots and test it","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":1},"other":{"insertions":1,"deletions":0}}},{"hash":"763e137a04d856abc406e8795f0bf5f91d904d1e","isMergeCommit":false,"messageTitle":"Remove unnecessary classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":31}}},{"hash":"d03b9438f621db15a83610c3ce199c6ee840675c","isMergeCommit":false,"messageTitle":"Add getters for cashflow type and value","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"4fc4df2db821fb4d8cdd5f3eb3093400f5e0d297","isMergeCommit":false,"messageTitle":"Add vis command to the parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":10}}},{"hash":"7f31985cd4ae39b8944d2df5d424aad1616742c0","isMergeCommit":false,"messageTitle":"Add categorizer utility class to sort expenses or income entry based on type","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":0}}},{"hash":"afc246440d8eca06ede599770fa363a0a5549f3e","isMergeCommit":false,"messageTitle":"Add visualizer class to visualize data in bar graph or pie chart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":0}}},{"hash":"8631e18975c8beabae651b826d9c0a6a6a798aeb","isMergeCommit":false,"messageTitle":"Fix Import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"7fe6dc007f9a4c50dd6d6e431834641688608bd3","isMergeCommit":false,"messageTitle":"Fix code style issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":10}}},{"hash":"68fc9ae55171009c217fc93e846fa88e4c0b913a","isMergeCommit":false,"messageTitle":"Fix identation in visualizer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"42b5794f6f94595b399e3e97640cd986e617d529","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickVisualisation","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/list/CashflowList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"c689389905882a16a1e1aa27a4fbfd4936ba22a3","isMergeCommit":false,"messageTitle":"Remove dead code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":7}}},{"hash":"f97b44048a9b7b92fcb0abbd4ca91161a7d965f5","isMergeCommit":false,"messageTitle":"Add functionality to do visualization for both income and expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":3}}},{"hash":"671802cad084f4b455b79718f5de9dd35ec9f322","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into FrederickVisualisation","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"2a0a2fb3bf353c2ec7d9faf9f4b26be38addb9cb","isMergeCommit":false,"messageTitle":"Fix code style","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"9b0642a136c10c64880e1c6e3d7f7ad74c46c4b5","isMergeCommit":true,"messageTitle":"Merge pull request #69 from wwweert123/FrederickVisualisation","messageBody":"Frederick visualisation","fileTypesAndContributionMap":{}},{"hash":"4c12a33358390c7833882cb4ff8856c639a0e0d9","isMergeCommit":false,"messageTitle":"Add logger for visualizer and categorizer class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"d37e2a293714b82b7d9f79e06cecb35599196bce","isMergeCommit":false,"messageTitle":"Add logging for Vis Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2}}},{"hash":"c7897b1d61ad607722a0af7243c2c0412cbb6074","isMergeCommit":false,"messageTitle":"Add assert for visualizations related classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":6}}},{"hash":"a3dd93f6e66d04efcc7f61d57df01c3e05772535","isMergeCommit":false,"messageTitle":"Fix error in check style","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"793ce105ddb0c8508ec605fe40f273cd5b4cce5d","isMergeCommit":true,"messageTitle":"Merge pull request #93 from wwweert123/LoggingAssertVis","messageBody":"Logging assert vis","fileTypesAndContributionMap":{}},{"hash":"5562991591bfeb1bc8e0cf33b9e4d9ef55ee5a11","isMergeCommit":false,"messageTitle":"Add logging and assert for watchlist command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"3de6f7e633a56dea1df03c9b4daf3a112a6212c3","isMergeCommit":false,"messageTitle":"Add logging and assert to AddStockCommand, Stock and Watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"1659e06bfa224f44344d3c005cf878e12c8adaf8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into LoggingAssertWatchlist","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/investments/WatchList.java\n","fileTypesAndContributionMap":{}},{"hash":"8d06dc08254699a08a4fff6922f9b7194c4a1dbb","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"15f9d47404e37efa56d679a640a19715f6fb9b83","isMergeCommit":false,"messageTitle":"Add handling for API limit reach and logging in constructor fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":2}}},{"hash":"0ee9efd58624b16160b1d2427a129cc636383756","isMergeCommit":false,"messageTitle":"Standardize logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"6161f6a7773821576d303d4690b81263e271d4dc","isMergeCommit":false,"messageTitle":"Remove commented code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"2d3e1047a9e7c595813b65c80728e187227dbcd5","isMergeCommit":true,"messageTitle":"Merge pull request #94 from wwweert123/LoggingAssertWatchlist","messageBody":"Logging assert watchlist","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"9f4a09be63259c43bd6fce4a55332a13d793ec68","isMergeCommit":false,"messageTitle":"Add functionality to delete stock from watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":1}}},{"hash":"7e21749289f35e37f0c83c8f6ce72d2958d8c635","isMergeCommit":false,"messageTitle":"Isolate JSON object to a single method to reduce chances of bug and give possibility of caching","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":46,"deletions":14}}},{"hash":"b49d747d818583fd3cca5bac61ffcf61ab59c94e","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":3}}},{"hash":"0f3b189cd17093c5ac7e60d63934b0446d19dda4","isMergeCommit":false,"messageTitle":"Update JUnit test due to changes in method implementation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":16,"deletions":11}}}]},{"date":"2023-10-23","commitResults":[{"hash":"0cb2c8190942d33ae0f6a9e094dbbcd02a50ce9d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into DeleteWatchList","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/WatchListCommand.java\n","fileTypesAndContributionMap":{}},{"hash":"fc2a9f8444ad097c48f388f6a0510c94481b575e","isMergeCommit":false,"messageTitle":"Change watchlist singleton access method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7},"test-code":{"insertions":4,"deletions":4}}},{"hash":"d73a5d597b5a1bff82e031898ab0cf938e5ae620","isMergeCommit":false,"messageTitle":"Improve code quality in accordance to reviewers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"c0d66053cd92b47cb444435e2f30e55047b9d210","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":7}}},{"hash":"a00abae470787cca65c55f6c4a867faa3e1d8a5c","isMergeCommit":true,"messageTitle":"Merge pull request #98 from wwweert123/DeleteWatchList","messageBody":"Delete watch list","fileTypesAndContributionMap":{}},{"hash":"890fc0d7877d7e156bc7303d84168b085542471f","isMergeCommit":false,"messageTitle":"Create method to save and load watchlist data to file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":0}}},{"hash":"8700572d1c9a8ddad641307b473f8a2b39a03bf5","isMergeCommit":false,"messageTitle":"Add calls to load and save methods in required areas","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":6}}},{"hash":"23a689f8e1269eb0c7bf84282a588da8d65b8256","isMergeCommit":false,"messageTitle":"Make stock serializable","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"55101bf4b40825d68ee3cbe3881590a37ab77385","isMergeCommit":false,"messageTitle":"Fix Test case for fetching stock prices","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"232ce50c57d8211e808b7e4cb44c33a3393c40c4","isMergeCommit":false,"messageTitle":"Change colour for visualizer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"534928547ad577210773c1f7dc3e8d4fb1ff6a82","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WatchlistStoraage","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/storage/LoadData.java\n#\tsrc/main/java/seedu/financialplanner/storage/SaveData.java\n","fileTypesAndContributionMap":{}},{"hash":"3f962dd0ac6a834e997ce2c77c602f80cdb3b8e4","isMergeCommit":false,"messageTitle":"Change to save watchlist only when exiting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"7f8f76935e4a066fddfdbd7f1950d5ab0caa5002","isMergeCommit":false,"messageTitle":"fix checkstly error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2bf5672bb389312c948d2408216b6e1cccf27159","isMergeCommit":false,"messageTitle":"Remove unused Imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"3c6d3a091066c1e4ad736ed49761f23b168b4a0b","isMergeCommit":true,"messageTitle":"Merge pull request #104 from wwweert123/WatchlistStoraage","messageBody":"Watchlist storaage","fileTypesAndContributionMap":{}},{"hash":"99c4cc5129b3da88815448476934d4dc8f1d3e2e","isMergeCommit":false,"messageTitle":"Add description for the visualization feature in developers guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":0}}},{"hash":"30e7abb6afe5a788025b4cc9bf276bc4016a7e7f","isMergeCommit":false,"messageTitle":"Add necessity to the error handling","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"351638778793c0b541ba6688cdc165881a54b0e5","isMergeCommit":false,"messageTitle":"Add title display for visualization of charats","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":9}}},{"hash":"3066e3ac34446a5739eafda8ee2f116aaf4238c0","isMergeCommit":false,"messageTitle":"Add class UML diagram for visualization","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":0}}},{"hash":"93663628a169524515042589762b2622c091bdb3","isMergeCommit":false,"messageTitle":"Rename directory","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":0}}},{"hash":"9f50d88b075dbb702266bb4a0e6727040b421d47","isMergeCommit":false,"messageTitle":"Add acknowledgement for sources used by Frederick","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":15,"deletions":0}}},{"hash":"a45215efa03cc5b8a382f5996e8863c5634a9136","isMergeCommit":false,"messageTitle":"Add description for visualization feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":22,"deletions":2}}},{"hash":"abac801dc6610f4bb5d4e02736db135b90556b33","isMergeCommit":false,"messageTitle":"Add printing of message using ui singleton when visualizing cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":2}}}]},{"date":"2023-10-25","commitResults":[{"hash":"d314f8e128228bb2a4e313048d4d3800e5354069","isMergeCommit":false,"messageTitle":"Create Sequence UML for overall visualisation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":0}}},{"hash":"fcf64449e34c5f7cd5bdaf35611dc0d3d63a2b29","isMergeCommit":false,"messageTitle":"Create Sequence UML for categorizer","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":0}}},{"hash":"9d446349ea9f6b7a710820f7147e0dcdf84a3b20","isMergeCommit":false,"messageTitle":"Create Sequence UML for visualizer","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":0}}},{"hash":"3e334b94e49411de9db19303f6e4d80814ad1919","isMergeCommit":false,"messageTitle":"Add diagrams images to developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":2}}},{"hash":"ab5707322c4b7541d3c6e38eff04caf9a6ccc5d8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into VisDG","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"47c5b75463c2531b95c009f0906c75905fe3e79c","isMergeCommit":true,"messageTitle":"Merge pull request #108 from wwweert123/VisDG","messageBody":"Vis dg","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"21773315b5b33b1bad51a78c1b17678fc4e98fe8","isMergeCommit":false,"messageTitle":"Fix Junit for stock delete","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":9,"deletions":2}}},{"hash":"521139faa1b05419956e7ec6d07a1177d61a879f","isMergeCommit":false,"messageTitle":"Add cap to watchlist max stocks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"6dda9db4161d3ccb8042e28f3317e341d777be7f","isMergeCommit":false,"messageTitle":"Add disallowing of adding multiple of duplicate stocks to watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"d94d5d4abaa0a4c0f5b06b5536858ebb32058b90","isMergeCommit":false,"messageTitle":"Add check for correct size of JSON array response received","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"7d0d95006240c96ec6ecd789699dcbe9bf8622f2","isMergeCommit":false,"messageTitle":"Add check for the correct matching of JSON stock object to stock class object","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"e589a22a98e287186ce9ef35210fb0325136e0ce","isMergeCommit":false,"messageTitle":"Add the getting and printing of additional watchlist information (Market, daily high, daily low)","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":61,"deletions":7}}},{"hash":"ec6fefc088fb562e542bd3cf64be9ab02cbe1f09","isMergeCommit":false,"messageTitle":"Fix checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}}]},{"date":"2023-10-27","commitResults":[{"hash":"d928fba83fed3e42c33e03f98565b84a3fcd3a59","isMergeCommit":true,"messageTitle":"Merge pull request #115 from wwweert123/FIxTestStock","messageBody":"Fix Junit for stock delete","fileTypesAndContributionMap":{}},{"hash":"f966c522ed58082edd1aead60e9efc1df674e51b","isMergeCommit":false,"messageTitle":"Refactor Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":20}}},{"hash":"bb468952fc09cfb8c41a9e010ddbb5130e4dbc3f","isMergeCommit":true,"messageTitle":"Merge pull request #116 from wwweert123/watchlistEnhancement","messageBody":"Watchlist enhancement","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"adf67a619a295e8354e3e1b591b7abe709b3a3ed","isMergeCommit":false,"messageTitle":"Update class diagram for Visualization","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":18}}},{"hash":"5c48a7cca355a518af5837bfc50b568c9c9b2982","isMergeCommit":false,"messageTitle":"Update visualization sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-29","commitResults":[{"hash":"19d3b69db5bc5063bfde4d6be606912953666e50","isMergeCommit":false,"messageTitle":"Fix class diagram for visualization","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"d229be59baa1ba1901364c90f23a4af5a11efe67","isMergeCommit":false,"messageTitle":"Changed colour scheme for visualization class","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"d4b107ff42dea1cdcaa71ade1a8e3fe28bd517a9","isMergeCommit":true,"messageTitle":"Merge pull request #122 from wwweert123/VisDG","messageBody":"Update class diagram for Visualization","fileTypesAndContributionMap":{}},{"hash":"6dedfb58f1ed47f44aa8951b14ef7a989e27afeb","isMergeCommit":false,"messageTitle":"Add hyperlink to DG acknowlegdements","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"eada3bc5138a8060034ab0eca3e3e83340af6bb7","isMergeCommit":false,"messageTitle":"Update parameter name to chart for standardization","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"876b05664326f560f0600b5f1c6c877a238a7deb","isMergeCommit":false,"messageTitle":"Update diagrams to match code","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ecc19c8e4323a0e8298428ce6387251919a07eee","isMergeCommit":false,"messageTitle":"Update UG for visualization feature and watchlist features","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":71,"deletions":0}}},{"hash":"12b45c55eb06fbb16f038d7210d9203a8d1afb68","isMergeCommit":false,"messageTitle":"Refactor code and add 2 additonal fields (last updated and last fetched) to watchlist","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":25}}},{"hash":"57fc65e18f26ad8dec4f4a3f9efd395914a2b6a4","isMergeCommit":false,"messageTitle":"Chang watchlist data structure to hashmap for easy access and exception handling","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":37},"test-code":{"insertions":5,"deletions":3}}},{"hash":"23f49b5022c4b5c357678720e93855eac0a406d2","isMergeCommit":false,"messageTitle":"Add check for up to date stock to prevent overloading API","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":11},"test-code":{"insertions":1,"deletions":1}}},{"hash":"18197d715fbe34314eb6997aa20e65280dc5fc1b","isMergeCommit":false,"messageTitle":"Remove todos that is completed","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"a4a02044920878ea4ec1587b5b275dd8e7687071","isMergeCommit":false,"messageTitle":"Fix bug and Fix checkstylemain","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":15}}},{"hash":"22dee000f82c19accb5f7c4c8fe5758571d76ba2","isMergeCommit":false,"messageTitle":"Fix Typo and description","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"3ea07df65421c3d8cce2b46e0c6196bb7614c89b","isMergeCommit":false,"messageTitle":"Remove unused import","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"3fc916744042b73f3a7d98cddf66bbfc7223538f","isMergeCommit":true,"messageTitle":"Merge pull request #124 from wwweert123/DGUGFrederick","messageBody":"DDUG frederick","fileTypesAndContributionMap":{}},{"hash":"a53c1984e9308604b54991a5ac4b799544638a96","isMergeCommit":true,"messageTitle":"Merge pull request #125 from wwweert123/WatchlistCaching","messageBody":"Watchlist caching","fileTypesAndContributionMap":{}}]}],"NeoMinWei":[{"date":"2023-10-05","commitResults":[{"hash":"4f47ae40234b912a4c5b7dc60382509629d101a3","isMergeCommit":false,"messageTitle":"Add name to AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":8,"deletions":8}}},{"hash":"f2c1d37c4806aa17f190a32959ef65e5687b4aee","isMergeCommit":true,"messageTitle":"Merge pull request #1 from ryan1604/ryanChua-AboutUs","messageBody":"Update AboutUs","fileTypesAndContributionMap":{}},{"hash":"2c62d715ae126cdd37eb029c1637b350c38be6de","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into NeoMinWei-AboutUs","messageBody":"# Conflicts:\n#\tdocs/AboutUs.md\n","fileTypesAndContributionMap":{}},{"hash":"22503c3b8de7c4b1a38b85131f14e6b63162ded7","isMergeCommit":true,"messageTitle":"Merge pull request #2 from NeoMinWei/NeoMinWei-AboutUs","messageBody":"Add name to AboutUs","fileTypesAndContributionMap":{}},{"hash":"068afbff53a8490ae4d79d8b323ea58f34470cf9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"df39139c6b034e42f46f335dcc8064168ac563aa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2d7049b261c1db9ee9b2fd302da80eac4f32b989","isMergeCommit":false,"messageTitle":"Create cashflow and income classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":0}}},{"hash":"f8e310a44b9827b00635f829dd8d1fd8a11224e9","isMergeCommit":false,"messageTitle":"Create ArrayList to store entries","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":0}}},{"hash":"ae8527bbe3908a49eee3eeba95bb39a9778f275b","isMergeCommit":false,"messageTitle":"Add ability to add income to the ArrayList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"c09c55e2fbf921cb8794c0eac6512dbc9b291f2a","isMergeCommit":false,"messageTitle":"Add ability to add income through user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":5}}},{"hash":"17fea1ee0b01d0acd6fa797bca86c66770974214","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":5}}},{"hash":"d5200ef10bf45e451d5057995598577e58195500","isMergeCommit":false,"messageTitle":"Add rounding of double values to 2 decimal places","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":2}}},{"hash":"c9daed435f0538014db06c642d487427e73b1ac8","isMergeCommit":false,"messageTitle":"Add expense class and ability to add expense through user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":3}}},{"hash":"26b06f9c92c6a293c902d83d8de8f4fa7434c443","isMergeCommit":false,"messageTitle":"Fix bug of not recognising description of parameters","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7}}},{"hash":"9e54041da9ee4d502cf0869ecbf0f32571491295","isMergeCommit":true,"messageTitle":"Merge pull request #32 from NeoMinWei/branch-income","messageBody":"Add Income and Expense","fileTypesAndContributionMap":{}},{"hash":"08684d0c749a38b97d55e31a5bf525fded9a7136","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"699cb40438315f404663b969d8a7e9330fa58887","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"62d46f719a6d2b1a8b804ac1a54b3ef6cc03b943","isMergeCommit":false,"messageTitle":"Add JUnit tests for addIncome() and addExpense()","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":56,"deletions":0}}},{"hash":"9dfd51ea57f7888e0c8eac32cc354313950d3c0c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp into Branch-JUnit","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"c9fa29cd6aa140362bfaacdf93ae5c98b7ddf5b0","isMergeCommit":false,"messageTitle":"Add JUnit test for execute() in Entry","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":5},"test-code":{"insertions":29,"deletions":0}}},{"hash":"7e7c94aa80486995c938dc65216cb96d1b290fcc","isMergeCommit":true,"messageTitle":"Merge pull request #47 from NeoMinWei/Branch-JUnit","messageBody":"JUnit for addIncome and addExpense and execute","fileTypesAndContributionMap":{}},{"hash":"1c88d2ac4c68c1d9f7335cc5beb4b858e966467f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2990de0cc5378b9586045413ccd2bb3a8a259ff9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"fe1b5953d0fd0d3767e5ed5a5ce7f748651598ba","isMergeCommit":false,"messageTitle":"Rename FinancialList to CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":32},"other":{"insertions":24,"deletions":6},"test-code":{"insertions":12,"deletions":12}}},{"hash":"2be22452273938923c4666e0b1af0c17acfca335","isMergeCommit":false,"messageTitle":"Add toString method in Cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":54,"deletions":12},"test-code":{"insertions":8,"deletions":8}}},{"hash":"73b1c64059a1ea52fcd4bac81d45be61ce1c621e","isMergeCommit":false,"messageTitle":"Add printAddedCashflow and printDeletedCashflow methods to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":2}}},{"hash":"7f0ff6575178c82185acd34370ed280d0ff9c9bb","isMergeCommit":false,"messageTitle":"Rename Entry class to AddCashflowCommand class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1},"other":{"insertions":6,"deletions":6}}},{"hash":"93058ea23bd016c655986c6368673c965819d4e8","isMergeCommit":false,"messageTitle":"Rename Entry class to AddCashflowCommand class","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":4}}},{"hash":"b8d5f995f6592fbb2e9a0f5f9525bf27f82b527c","isMergeCommit":false,"messageTitle":"Extract parsing method from AddCashflowCommand class to Parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":28},"test-code":{"insertions":0,"deletions":29}}},{"hash":"ef33866779c2999ab88f18d234af45c1ae46cf1c","isMergeCommit":false,"messageTitle":"Rename list to cashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"6b30cdad90948467b5fe2cd12651aa04467304a5","isMergeCommit":false,"messageTitle":"Add delete income/expense functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":128,"deletions":49}}},{"hash":"38dbc030b566522fd0f329ba247221284b2ed4af","isMergeCommit":false,"messageTitle":"Add JUnit testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3},"test-code":{"insertions":31,"deletions":8}}}]},{"date":"2023-10-16","commitResults":[{"hash":"781779dca09f480fe69d15dcdfcbd955af8c56d6","isMergeCommit":false,"messageTitle":"Delete unused constructor","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"20be5d31d905fc8458bc03b5bbe07a43b69cda7a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"372f730c17048dbfeef6a9573a4eb1178755f724","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/commands/AddStockCommand.java\n#\tsrc/main/java/seedu/financialplanner/commands/Command.java\n#\tsrc/main/java/seedu/financialplanner/commands/Exit.java\n#\tsrc/main/java/seedu/financialplanner/commands/Find.java\n#\tsrc/main/java/seedu/financialplanner/commands/Invalid.java\n#\tsrc/main/java/seedu/financialplanner/commands/WatchListCommand.java\n#\tsrc/main/java/seedu/financialplanner/list/CashflowList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n#\tsrc/test/java/seedu/financialplanner/commands/EntryTest.java\n#\tsrc/test/java/seedu/financialplanner/storage/StorageTest.java\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"7084894811134dccb133b5b495c4bc0c0c96c9ea","isMergeCommit":false,"messageTitle":"Wrap line to reduce line length","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":3,"deletions":2}}},{"hash":"2c874bb132ea38c1bef7df1c6d9b8ebdf8fdeb93","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"756fefab390978a479cca40dd1df6931800d245d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/AddCashflowCommand.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"1f0dd2ff73b0f8937c646a97b15280bbf1a4962f","isMergeCommit":false,"messageTitle":"Resolve renaming issues","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"0091535cb31b76adf7958cd54d4d4feac1048ab0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f5624bbdb0c6339bb71fc19b4ba56fb8b948be05","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteIncome","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/list/Cashflow.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"e9cd0d0fb2b11f8f93a515a31a980110d30f6597","isMergeCommit":true,"messageTitle":"Merge pull request #71 from NeoMinWei/Branch-DeleteIncome","messageBody":"Delete income and expense","fileTypesAndContributionMap":{}},{"hash":"77f97a183a9dad909f9a74bbf3755ca8ff7df89e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"61401f04364506993e3ba06fa4e9d52d9a4669a0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7d8d56d6e6c99dc005c3d68649bf6960d65284d2","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-DeleteBugFix","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c39094ff72f2ff8fa468ec804cd3dfb3016fe480","isMergeCommit":false,"messageTitle":"Fix bug where wrong message is showing for error handling and when user inputs delete 0","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"169a0adc623031468978ad883a41a8862150d138","isMergeCommit":false,"messageTitle":"Add assertions for AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"c32e4c62168dba8284fb862f1bdcebd8ceaad008","isMergeCommit":false,"messageTitle":"Add error handling for empty type string","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":2}}},{"hash":"ffe8271a4dc18b4c8b4490697931915343ac4c08","isMergeCommit":false,"messageTitle":"Revert \"Add error handling for empty type string\"","messageBody":"This reverts commit c32e4c62168dba8284fb862f1bdcebd8ceaad008.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":14}}},{"hash":"6bcfea610b1d4ff267638f51777a3095c2f4686b","isMergeCommit":false,"messageTitle":"Add error handling of negative amount and recur value and empty type string","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":2}}},{"hash":"6124a059151ca2174be69affe593633855519e0e","isMergeCommit":false,"messageTitle":"Add assertions for DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"6ddac1f153c6f64db63f72da8612452b2573fbec","isMergeCommit":false,"messageTitle":"Add assertions to CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":2}}},{"hash":"2b845eaedab4f7b60b6c49cd14788b0880ad0e4f","isMergeCommit":false,"messageTitle":"Change message shown when recurring value is negative","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"b3e0e452479fb4240679bab91046264ca2ea19d8","isMergeCommit":true,"messageTitle":"Merge pull request #90 from NeoMinWei/Branch-DeleteBugFix","messageBody":"Branch delete bug fix","fileTypesAndContributionMap":{}},{"hash":"2d9688e30c0c074ef4147b14a5ad27494ce48506","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7adc4fbbec1014c742e32d1388eb3106eb1d2060","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"02fdad409ee5ae84faed74f3dbab5b53fca89bda","isMergeCommit":false,"messageTitle":"Add logging for AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0}}},{"hash":"951cab2e9360ac30ec87e1a28343e9ed0942a20d","isMergeCommit":false,"messageTitle":"Add logging for DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1}}},{"hash":"37c006a162c8d924bf64485b7c7712e7fbbc1b2e","isMergeCommit":false,"messageTitle":"Add logging for CashflowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"93b4095f0b68d6d7f32f1596a8ee627a79bfb05f","isMergeCommit":false,"messageTitle":"Add logging for try statements in DeleteCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"82e3d8c5fd251bb8e1486bdb6f6c3e95399a0864","isMergeCommit":false,"messageTitle":"Add logging for try statements in AddCashflowCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"54479b36eabc35a3f621e042138e59d445c91f99","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"68bda88f9c684d8c4a4b8b0dc6df61873109a0eb","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/AddCashflowCommand.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"7c3e3e695bfb2c6af6de09d685d668f1857922bc","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8b673dc53f4e4559f6ae72d819eccce881ee8ff8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-LogAndAssert","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d267f8af00aaf208b518f698d83f5f218937d394","isMergeCommit":true,"messageTitle":"Merge pull request #92 from NeoMinWei/Branch-LogAndAssert","messageBody":"Branch log and assert","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"1c7a198c54a94f55dbd16c1f888835ebe0772fb8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"99e9427b0418815aefec44af8fe242507e05b5bd","isMergeCommit":false,"messageTitle":"Add getInstance() method for singleton CashflowList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":13}}},{"hash":"19547febc66f3905749b7b3e6e9eb27db45ee85f","isMergeCommit":false,"messageTitle":"Add income and expense type enums","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"2afd67b5f1cd51357312a17c58947cfd71a242be","isMergeCommit":false,"messageTitle":"Add getInstance() method to Ui singleton class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":10},"test-code":{"insertions":13,"deletions":13}}},{"hash":"25cd60a45336566458b9a16ab9ad66c084aa92ae","isMergeCommit":false,"messageTitle":"Change access to CashflowList and Ui classes to getInstance()","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":13}}},{"hash":"e92ba9b9c5e429c604f141abe33fd05c6d91d23a","isMergeCommit":false,"messageTitle":"Change Income and Expense type from String to enum","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":131,"deletions":50}}},{"hash":"c4e41d83fd1e92fe05a4537f7a569dfb27adaa5d","isMergeCommit":false,"messageTitle":"Update JUnit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":22,"deletions":18}}}]},{"date":"2023-10-23","commitResults":[{"hash":"968f1a0bb09190f2bce3fdb8acfa5dc8963253e0","isMergeCommit":false,"messageTitle":"Add necessities to expensetype enum","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"a1ca760be3ac8d12e7a8ecbfbb780d44a2b86685","isMergeCommit":true,"messageTitle":"Merge pull request #97 from NeoMinWei/Branch-IncomeCategory","messageBody":"Branch income category","fileTypesAndContributionMap":{}},{"hash":"df13bf64fe71770b01403a0c69a89f465db87410","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4727ec201e21927e13f40a0c34c6bc8fe80d0460","isMergeCommit":false,"messageTitle":"Fix assertion bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"78e885388c0e166556932ee690e23a7208580b4c","isMergeCommit":true,"messageTitle":"Merge pull request #103 from NeoMinWei/Branch-IncomeCategoryBugFix","messageBody":"Branch income category bug fix","fileTypesAndContributionMap":{}},{"hash":"1edb7f0f4213a367b3de9548a7a2833ac629d3f6","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"bc66820c21c502609fa59ff04a06d86d73d5b834","isMergeCommit":false,"messageTitle":"Add acknowledgements to DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":0}}},{"hash":"2045e223d05df6f20dcc1a89adcb4b9240bcdc62","isMergeCommit":false,"messageTitle":"Add sequence diagram for add cashflow mechanism","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"371a4be0a130b7a04e282c65ffeb8c393aed42d6","isMergeCommit":false,"messageTitle":"Add Cashflow class diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":33,"deletions":0}}},{"hash":"e9b34745a291deb58c999b29946bc642bd096279","isMergeCommit":false,"messageTitle":"Add Cashflow sequence diagram image","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ed48bd06fb1058ff32ae61558b3970bcb25cdbfa","isMergeCommit":false,"messageTitle":"Update sequence","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":8}}},{"hash":"74f6960448f47adae6b4bdbd4dcc1163f72843da","isMergeCommit":false,"messageTitle":"Update class diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ba4027efe30bb026162c36a165a2d18d735282ee","isMergeCommit":false,"messageTitle":"Update UG with add income/expense feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":45,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"7c95abd280fb99cbc170653776856a389685314e","isMergeCommit":false,"messageTitle":"Fix typo","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ae8761b1898e80dc0f6a5754ed181125a251abce","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fb5043a60275972bb89c129cee4e39ce92ea1888","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-UMLforIncomeAndExpense","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"f4b51909654a690c3b2ecb2bd620926dd1326940","isMergeCommit":true,"messageTitle":"Merge pull request #111 from NeoMinWei/Branch-UMLforIncomeAndExpense","messageBody":"UML for income and expense","fileTypesAndContributionMap":{}},{"hash":"15ae6707427c114509ffd3b62294c199b8facb41","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d3ca0986187d0ea6822080bd28e0ac98ab7c0143","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"656d50e12e416b164337282e07aeee816146ad7d","isMergeCommit":false,"messageTitle":"Add description argument","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":13}}},{"hash":"b5acf6d892eec6e5b7ea16ecd331f011408758c0","isMergeCommit":false,"messageTitle":"Update tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":10,"deletions":6}}},{"hash":"96645cb039afa0245efc92e148f14b590b2a9e88","isMergeCommit":false,"messageTitle":"Update storage for cashflow","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":4}}},{"hash":"4a5cdc73d8b300be5b22d81a4756f7a0aa7b14d2","isMergeCommit":false,"messageTitle":"Add logging for getting description","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"e27031ba253b578571b583d6e6e92634e07a416a","isMergeCommit":false,"messageTitle":"Rename list package to cashflow for clarity","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":36},"other":{"insertions":13,"deletions":13},"test-code":{"insertions":6,"deletions":6}}},{"hash":"54173570879976b60ac2874a428cd6f6b0eb7862","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-2/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a0a57fb7be86a7c43635d9e92627f5e496c18819","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Branch-IncomeDescription","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"e73f490a7dadf73874a656daa8cb828c2a1b5b30","isMergeCommit":false,"messageTitle":"Refactor code to make it more neat","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":14}}},{"hash":"d7b3cf055cd0887b10ce1eea72c80c3909a8fe93","isMergeCommit":false,"messageTitle":"Add exception when description is empty","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"543ea73335c896efae2325529f1f2835c70b1e35","isMergeCommit":true,"messageTitle":"Merge pull request #118 from NeoMinWei/Branch-IncomeDescription","messageBody":"Branch income description","fileTypesAndContributionMap":{}}]}],"ryan1604":[{"date":"2023-10-05","commitResults":[{"hash":"eab7be4bcbb2bd13648ec4f347d0278a5b33b3b1","isMergeCommit":false,"messageTitle":"Update AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-07","commitResults":[{"hash":"e8da8d09f6900bdcf1299dabba13d3177794676f","isMergeCommit":false,"messageTitle":"Setup Ui and rename Duke to FinancialPlanner","messageBody":"Fixes #5\n","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":22},"other":{"insertions":3,"deletions":3}}},{"hash":"d5be6d4bae825dbb2ba49c20588e7d1ecfaa8f7e","isMergeCommit":false,"messageTitle":"Add FinancialPlannerException","messageBody":"Fixes #8\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"41909a10cf9d822fabd58091788fa8d898615517","isMergeCommit":false,"messageTitle":"Add Parser, add \u0027exit\u0027 and \u0027invalid\u0027 command to Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"d926641278054652b6bf5faba4d7a71495ad91b9","isMergeCommit":true,"messageTitle":"Merge pull request #26 from ryan1604/branch-setup","messageBody":"Branch setup","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"4b7aa80bfe1c46aac6581012cfe57fe4efd37ab2","isMergeCommit":false,"messageTitle":"Update test file and multiple code refactorings","messageBody":"Fixes #34\n","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":26}}},{"hash":"91c6f28655a8d39e1d9b3067075e1ef6c6b3f2c0","isMergeCommit":false,"messageTitle":"Remove unused import in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"636fa41f0e93e2a58fac846ff766483ae2845427","isMergeCommit":true,"messageTitle":"Merge pull request #35 from ryan1604/branch-code-quality","messageBody":"Update test file and multiple code refactorings","fileTypesAndContributionMap":{}}]},{"date":"2023-10-10","commitResults":[{"hash":"dfffa4ac58a33413fbc45a1fa59b2d4faed0bcac","isMergeCommit":false,"messageTitle":"Setup storage","messageBody":"Fixes #7\n","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":0}}},{"hash":"8c328c6af2a61181bc07c1bcf8677e49b31630e8","isMergeCommit":false,"messageTitle":"Add save functionality for income and expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":1}}},{"hash":"75847cd1846bd27dab82dbc0dab5da96cf596d33","isMergeCommit":false,"messageTitle":"Add load functionality and edit EXPECTED.TXT","messageBody":"Fixes #38\n","fileTypesAndContributionMap":{"functional-code":{"insertions":70,"deletions":4}}},{"hash":"95cd96179ef5466fadecdc7027762af2af1e1c43","isMergeCommit":false,"messageTitle":"Add error handling for storage","messageBody":"Fixes #39\n","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":9}}},{"hash":"b8b88c5b065e937a31978ae306c56d41a2b75706","isMergeCommit":false,"messageTitle":"Update catch block in main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"0eca8f566599608a2dd256f9aef4a8147595722f","isMergeCommit":false,"messageTitle":"Add in \u0027run\u0027 method","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"91787a92b2a4b4ba60fcbd4762f03d583cf55720","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-storage","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Ui.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"cfd188be4932c9db8da02c85f943ba2c26a2e5aa","isMergeCommit":true,"messageTitle":"Merge pull request #40 from ryan1604/branch-storage","messageBody":"Add storage","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"3501ede398172c065fabdf26f4e4706df23686c9","isMergeCommit":false,"messageTitle":"Add storage test for loading valid data","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":17},"test-code":{"insertions":29,"deletions":0}}}]},{"date":"2023-10-13","commitResults":[{"hash":"a61e59da1fb118eb86fdedbbafcb124bfef873a5","isMergeCommit":false,"messageTitle":"Add storage test for:","messageBody":"- load invalid data\n- save valid data\n- save non-existent file\n\nFixes #46\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":19},"test-code":{"insertions":37,"deletions":1}}},{"hash":"d048f440dbb5e3fe9617dda4c50edab3904307c3","isMergeCommit":false,"messageTitle":"Follow coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":1,"deletions":1}}},{"hash":"6bdf7e453019f8b40fb962822b1db0652308ce57","isMergeCommit":false,"messageTitle":"Rename data to testData folder","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"398fc42b1fc6bee7ca4825f966ddfd61fb400eef","isMergeCommit":true,"messageTitle":"Merge pull request #48 from ryan1604/branch-JUnit","messageBody":"Junit tests for storage","fileTypesAndContributionMap":{}},{"hash":"1c81748388c8834d4ad2125d39dbb70a8e192d51","isMergeCommit":false,"messageTitle":"Make objects private in test classes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":5}}},{"hash":"09c4f10ef1b93b7d4006e4e9ee8e7530db81438c","isMergeCommit":false,"messageTitle":"Clears list at the end of method","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":0}}},{"hash":"b6f7a7cbb9a8fd3b9830aa4aebd3d360bbf5f6d3","isMergeCommit":false,"messageTitle":"Undo clearing of list and set cashflow balance to 0 in testAddIncomeAndExpense","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":3}}},{"hash":"1437d9a753198822b0f8c0881ee6858194829c66","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"653b5feac428aa3eb4a8799b199ad6fc937cb2d4","isMergeCommit":true,"messageTitle":"Merge pull request #49 from ryan1604/branch-JUnit-2","messageBody":"Fix CI failing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"28cfe5345285e27661812b3a3a21ff1dafebf0af","isMergeCommit":false,"messageTitle":"Add Budget class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":0}}},{"hash":"f166d899d4192414e397be9695f7ab466ed91ceb","isMergeCommit":false,"messageTitle":"Add BudgetCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":0}}},{"hash":"5acc2f839e4007ad39ee4fbb069e023c00456cfc","isMergeCommit":false,"messageTitle":"Add setBudget to FinancialList and update test files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"0ca7eeac266bc0a105ef37e9c58e1834f5d25850","isMergeCommit":false,"messageTitle":"Add overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"ff40a9b9b08d48c6dbcb89fb637fa403e8f9f89c","isMergeCommit":false,"messageTitle":"Update overview to show:","messageBody":"- Total balance\n- Highest income\n- Highest expense\n- Watchlist\n\nFixes #29\n","fileTypesAndContributionMap":{"functional-code":{"insertions":46,"deletions":2}}},{"hash":"1c099725de56ae0fe7476dd7294229998340ed16","isMergeCommit":false,"messageTitle":"Edit setBudget method in FinancialList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":5}}}]},{"date":"2023-10-16","commitResults":[{"hash":"3e1db303a86296ac9eea5229d4af38e65b6ee86a","isMergeCommit":true,"messageTitle":"Merge pull request #70 from YFshadaow/branch-refactor-command-parse-logic","messageBody":"Refactor code: Restructure command parse logic","fileTypesAndContributionMap":{}},{"hash":"e197a46699b33e0ee4f1c0158d32d24edd8e0fe1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-budget","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"9790808efd401a0add9b17e445f73e792823dbca","isMergeCommit":false,"messageTitle":"Add storage and exceptions for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":24}}},{"hash":"b6a93fdf77d18006ed5b8af749def38bc5b1a6b1","isMergeCommit":false,"messageTitle":"Update Budget","messageBody":"Fixes #59\n","fileTypesAndContributionMap":{"functional-code":{"insertions":90,"deletions":50}}},{"hash":"7dc589fac79d029a9161b1e73f9dd6c09b230cff","isMergeCommit":false,"messageTitle":"Update budget when new expense is added","messageBody":"Fixes #60\n","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":4}}},{"hash":"aa68bb059f3bf8201c0830bd13a714577428adbd","isMergeCommit":false,"messageTitle":"Add ability to update budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":72,"deletions":39}}},{"hash":"4a25982c9f7dea52d0d5b50b0b9ed4c6da622a22","isMergeCommit":false,"messageTitle":"Update test files and format printing of double to 2d.p","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":6}}},{"hash":"8ff7b412958e60cf34968d32ce1d8b2e0a17d58c","isMergeCommit":false,"messageTitle":"Add JUnit tests for Budget and update ValidData.txt","messageBody":"Fixes #73\n","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":0}}},{"hash":"6bfd86e9bf988f2b31c9683606facdc1550f2475","isMergeCommit":false,"messageTitle":"Update code to follow coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1},"test-code":{"insertions":0,"deletions":1}}},{"hash":"c45bba6e16e98a3ca9c500a5ec64c598ec444c49","isMergeCommit":false,"messageTitle":"Remove redundant get() and size() methods in cashFlowList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":11}}},{"hash":"e417fcac442470226432184427bd86a06da278f7","isMergeCommit":false,"messageTitle":"Update error handling for update budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"89d5babd83af99396efcc453995b7002edf6f988","isMergeCommit":false,"messageTitle":"Standardise case statements","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":16}}},{"hash":"f5a16724e320f6246beb2eff33076b79661cb44b","isMergeCommit":true,"messageTitle":"Merge pull request #57 from ryan1604/branch-budget","messageBody":"Add budget functionality","fileTypesAndContributionMap":{}},{"hash":"c73982cb0a6c78b95ec5f1e30e7fdf6213da690b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"ab2f4ada4e7927c3e547ff23c80429d5fa018a85","isMergeCommit":false,"messageTitle":"Update overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":24}}},{"hash":"75d7c453aa561d32dc04f507920e91866cd3cd42","isMergeCommit":false,"messageTitle":"Refactor code in budget and overview","messageBody":"Fixes #29\n","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":16}}},{"hash":"8e970f586211c98a67104e2e5e60c1467290283f","isMergeCommit":false,"messageTitle":"Fix bug in loading storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":7}}},{"hash":"3574b3c588bb57865216155149965ac36741d658","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"01fbdd18f50dc01d6273bb8ae0f716d76658c798","isMergeCommit":false,"messageTitle":"Update error handling for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0}}},{"hash":"b33a0c71e3a82cedd3deac14b53ee8c881b63934","isMergeCommit":false,"messageTitle":"Refactor code:","messageBody":"- Refactor formatting of double to string\n- Reduce nesting in overviewcommand\n- Clean up code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":27}}}]},{"date":"2023-10-17","commitResults":[{"hash":"f46a0628faea24ba86aaa54141916d104fbe1f3a","isMergeCommit":false,"messageTitle":"Add logger storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":0}}},{"hash":"3705db0f6ea636d00d7f362a21c577710a687ccf","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"b10f74a3137f0b43f7a486e06506a6cc47ba5ae1","isMergeCommit":false,"messageTitle":"Add logging and assertions for budget","messageBody":"Fixes #87\n","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":0}}},{"hash":"5b25ce5873e76f7c67e8c61128f2ef939c22f7f7","isMergeCommit":false,"messageTitle":"Update warning message in logger","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f63d6e938171d41ab2214df06a989a882819fe7","isMergeCommit":false,"messageTitle":"Add error handling and standardise logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":5}}},{"hash":"c97daf2496479364271d54c2da1b3e6466e9fa8c","isMergeCommit":false,"messageTitle":"Extract print statement to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":8}}},{"hash":"324016184917721a91fc9b91fcb06c0eb783ef89","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-overview","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"6bf095c5e50f765fd3765a3a7fd859ecbc01591b","isMergeCommit":true,"messageTitle":"Merge pull request #58 from ryan1604/branch-overview","messageBody":"Add overview functionality","fileTypesAndContributionMap":{}},{"hash":"df007a1a9b2bc34f17c112cefc2cf3eea948896a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-logger","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/commands/BudgetCommand.java\n","fileTypesAndContributionMap":{}},{"hash":"19dcfc60b44a315ae74f99f0b8cf12b161ce7d81","isMergeCommit":false,"messageTitle":"Add error handling for budget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":4}}},{"hash":"446763c7940b0fb0237c2ac6b976bec1c9d1156b","isMergeCommit":true,"messageTitle":"Merge pull request #91 from ryan1604/branch-logger","messageBody":"Add logging and assertions for BudgetCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"f4bb78cbbff71e0d1074ca5c73a2173463dea77e","isMergeCommit":false,"messageTitle":"Remove logger from showing on terminal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0}}},{"hash":"c0ecc3c340179354b78b359112397dc30790f305","isMergeCommit":true,"messageTitle":"Merge pull request #95 from ryan1604/branch-logger","messageBody":"Remove logger from showing on terminal","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"ee85fdd3450c29e6f2fa8ea93bc9d3aa8a7ee4ac","isMergeCommit":false,"messageTitle":"Update error handling for storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":14}}},{"hash":"e33e09d9d6bca826602f6a0a646029f3ff5f69f3","isMergeCommit":false,"messageTitle":"Rename AbstractCommand to Command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":18},"other":{"insertions":1,"deletions":1}}},{"hash":"21edafcc87654ea480d1c35ab2ec453623792070","isMergeCommit":false,"messageTitle":"Update singleton and error handling for storage, refactor storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":17},"test-code":{"insertions":6,"deletions":8}}},{"hash":"b4bf06354ec1e651df2c1b0835e8c82c2c4d796b","isMergeCommit":false,"messageTitle":"Add ability to delete, reset and view budget","messageBody":"Fixes #74\n","fileTypesAndContributionMap":{"functional-code":{"insertions":67,"deletions":14}}},{"hash":"2ad5082d556bde5cd1dacfa4c3f9abcdf11f49a5","isMergeCommit":false,"messageTitle":"Refactor Budget, fix bug and clean up code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":78}}},{"hash":"f3d525423735d5a193da257d3b598f941e8a3a4b","isMergeCommit":false,"messageTitle":"Add JUnit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0},"test-code":{"insertions":69,"deletions":0}}},{"hash":"ea37034ac84b421b3b6038ea67cc563809a4ba80","isMergeCommit":false,"messageTitle":"Add balance command","messageBody":"Fixes #100\n","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}},{"hash":"4f0d456e878d1f1cab572bcd372c767ddcad1c25","isMergeCommit":false,"messageTitle":"Remove unused imports","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"7d46886ffb53b08a1cd0ac3da012cf32dad037cd","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-budget","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/financialplanner/FinancialPlanner.java\n#\tsrc/main/java/seedu/financialplanner/investments/WatchList.java\n#\tsrc/main/java/seedu/financialplanner/utils/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"67fddc3c6856207ecdb706ba890e3351cd224e96","isMergeCommit":false,"messageTitle":"Edit FinancialPlanner","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"50e26e9bff8931193e94816246a8442e86620007","isMergeCommit":true,"messageTitle":"Merge pull request #101 from ryan1604/branch-budget","messageBody":"Update budget and clean up code","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"dc34fb4f3597f37652bbf91bb168e07ebfbea8ee","isMergeCommit":false,"messageTitle":"Add sequence diagrams for budgetcommand","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":75,"deletions":0}}},{"hash":"614c03bccff12e4aeb95e9cf908b81db9760f46c","isMergeCommit":false,"messageTitle":"Fix bug in loadBudget","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0}}},{"hash":"96fe8e91919e5f59141946ed846c5cd4d3804c43","isMergeCommit":false,"messageTitle":"Add class diagram for storage","messageBody":"Add style.puml from addressbook-level3\n","fileTypesAndContributionMap":{"docs":{"insertions":117,"deletions":0}}},{"hash":"98db3870b2a1642d81b534a75b87f89cbb095ed1","isMergeCommit":false,"messageTitle":"Update DG and diagrams","messageBody":"Fixes #106\n","fileTypesAndContributionMap":{"docs":{"insertions":58,"deletions":4}}},{"hash":"46f08fe1df842f6d9a3e2a66e809e49bc1061e96","isMergeCommit":false,"messageTitle":"Fix error in storage diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"364cd90ab3889d86ba988ddec7c0bccc890e5c48","isMergeCommit":false,"messageTitle":"Change names in diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":9}}},{"hash":"53ec46b8455c109fbca2162f43ea911d5199efb5","isMergeCommit":true,"messageTitle":"Merge pull request #107 from ryan1604/branch-bugfix","messageBody":"Fix bug in loadBudget","fileTypesAndContributionMap":{}},{"hash":"c3b9f2891401df69d30c54d1661cf3c73fa78ce5","isMergeCommit":true,"messageTitle":"Merge pull request #110 from ryan1604/branch-uml","messageBody":"Add diagrams for budgetcommand and storage","fileTypesAndContributionMap":{}},{"hash":"db195afb3523823484f75b050f34047deeb7d5a5","isMergeCommit":false,"messageTitle":"Fix visual in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":3}}},{"hash":"f3448a2440740014b14b206a8e2d881ca217b47f","isMergeCommit":true,"messageTitle":"Merge pull request #113 from ryan1604/branch-uml","messageBody":"Fix visual in DG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"11b2b150107f908f239f2469ec021ebd049f9a80","isMergeCommit":false,"messageTitle":"Update storage diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":12}}},{"hash":"6d04cb1d2126251eff52ef166980bc558c51f506","isMergeCommit":false,"messageTitle":"Update DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":19}}},{"hash":"2a16939ea19a75e7be88095960d6d869f369ce06","isMergeCommit":false,"messageTitle":"Update overview command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":14}}},{"hash":"2ee59837d6969e00885d562bf8af21898bf7a84f","isMergeCommit":false,"messageTitle":"Extract method in budget command and update DG","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":17},"docs":{"insertions":5,"deletions":5}}},{"hash":"6fa7dc87d5df38ce68d2ee34261b65c9249d5951","isMergeCommit":false,"messageTitle":"Add assertion to Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-27","commitResults":[{"hash":"7590b789233a6734bdc9d6c105001eb4a077d540","isMergeCommit":false,"messageTitle":"Add logging to ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":1}}},{"hash":"02571fe412b0507a0021ac111ef1371cda6b7d15","isMergeCommit":false,"messageTitle":"Add variables to improve readability","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2}}},{"hash":"c92ed860899ec19d3845231e1c01266fae39553f","isMergeCommit":false,"messageTitle":"Update sequence diagrams","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":12,"deletions":13}}},{"hash":"646af5464658b7ea77bcbefc51057c0b97005830","isMergeCommit":true,"messageTitle":"Merge pull request #114 from ryan1604/branch-overvieww","messageBody":"Update overview command and DG","fileTypesAndContributionMap":{}},{"hash":"412fc190e1de534e10dd256066463d2ea4fe7937","isMergeCommit":false,"messageTitle":"Update JUnit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":97,"deletions":0}}}]},{"date":"2023-10-28","commitResults":[{"hash":"a3fc3c5b0968c530439ef2f345088f3161f70ce7","isMergeCommit":false,"messageTitle":"Update UG and fix minor bugs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":7},"docs":{"insertions":160,"deletions":16}}},{"hash":"261dfa7799f523f1b961c1b70782fe590f570b91","isMergeCommit":false,"messageTitle":"Fix sentence in DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e379b2a147d4ffc4d27cb3f4d955c7a5d4b1c8da","isMergeCommit":true,"messageTitle":"Merge pull request #117 from ryan1604/branch-JUnit","messageBody":"Update JUnit tests","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"715d104667aefc79944d664c609de2f22381a734","isMergeCommit":false,"messageTitle":"Add table of contents to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":20,"deletions":1}}},{"hash":"f84cb8f899f63448a08a00588bef6f5b2f5968aa","isMergeCommit":true,"messageTitle":"Merge pull request #119 from ryan1604/branch-UG","messageBody":"Update UG and fix minor bugs","fileTypesAndContributionMap":{}}]}],"YFshadaow":[{"date":"2023-10-13","commitResults":[{"hash":"7828ae3395aae5d90d22f6743b43b03445b289a9","isMergeCommit":false,"messageTitle":"Refactor code: Use singleton instead","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":38},"test-code":{"insertions":15,"deletions":15}}},{"hash":"a126234d9b789bbeb6ac1ed4def47833d3356e48","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"89366d90a98581607b043727aa7a8eaf05227920","isMergeCommit":true,"messageTitle":"Merge pull request #50 from YFshadaow/master","messageBody":"Refactor code: Use singleton instead","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"a7b5722ca73a4b15a5c0e25b783a9fb827b30f28","isMergeCommit":false,"messageTitle":"Refactor code: Restructure command parse logic","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":254,"deletions":151},"other":{"insertions":21,"deletions":14},"test-code":{"insertions":9,"deletions":9}}}]},{"date":"2023-10-16","commitResults":[{"hash":"7ed9cafa3c7bd26a4641c1ec66c018e371c42434","isMergeCommit":false,"messageTitle":"Update code to pass style checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":26}}},{"hash":"28dd7ef23c898f7c9a91969a499e1463e6f12b2e","isMergeCommit":false,"messageTitle":"Update test files","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":24},"other":{"insertions":7,"deletions":5},"test-code":{"insertions":29,"deletions":21}}},{"hash":"989068feb2dd79c2e54c25b3b6d3965507ea1cef","isMergeCommit":false,"messageTitle":"Add list commands. Minor changes include: - Remove EMPTY cash flow category - Refactor delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":90,"deletions":16}}},{"hash":"76ef2f72103f0f0e994d3cb8440b4bd9775feaf0","isMergeCommit":false,"messageTitle":"Minor change: Remove redundant else block","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"1c5bad2c052f99ee730902c95ee31b39655aa240","isMergeCommit":true,"messageTitle":"Resolve merge conflicts","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2a7a8aa2c20b6fb8e871c81322c8d3c5f42fc4fc","isMergeCommit":false,"messageTitle":"Fix style error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"b0110338046a582dea04a00eb12c6ff4ab682574","isMergeCommit":true,"messageTitle":"Merge pull request #89 from YFshadaow/branch-list-command","messageBody":"Add list command","tags":["v1.0"],"fileTypesAndContributionMap":{}}]}],"hshiah":[{"date":"2023-10-05","commitResults":[{"hash":"f4e110ae257a2d4b5945b76e92c4f67b53a9b9c9","isMergeCommit":false,"messageTitle":"Test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"483fb3d416dea3f0ae1999b544aaa379f9eb6575","isMergeCommit":true,"messageTitle":"Merge pull request #4 from hshiah/hshiah","messageBody":"Shi,Haochen","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"22508414ff64c714b8c24237a8ab30432ade3775","isMergeCommit":false,"messageTitle":"implement function find","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":0}}},{"hash":"8553ea5738eaa15aacfd028fd0832607330e3a48","isMergeCommit":true,"messageTitle":"Merge pull request #45 from hshiah/master","messageBody":"implement function find","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"2c4321ec694fab448316d4670acb2409d60896d6","isMergeCommit":false,"messageTitle":"Add reminder","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":88,"deletions":1}}},{"hash":"436ee1eebba2e020d95e82cdc8089a335fafdcfb","isMergeCommit":true,"messageTitle":"Merge pull request #86 from hshiah/hshiah","messageBody":"Add reminder","fileTypesAndContributionMap":{}},{"hash":"5e6072c3cfd8377d6401e4aa8656c4abf71508fe","isMergeCommit":false,"messageTitle":"Finish setting goals Fix bugs of find command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":87,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"401308ac27b8077cd80a9378c8938e2b258ed136","isMergeCommit":false,"messageTitle":"Fix some points mentioned by groupmates","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":27}}},{"hash":"e9a6466bf2b37b67c9b63997e1fc4c3a042688ff","isMergeCommit":false,"messageTitle":"Solve conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":11}}},{"hash":"835cc572869e4c70387ca9ba0e5bc42721c228d9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into hshiah","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f87a53b2a70f909bafc095d6c425d023c4e5c8e9","isMergeCommit":false,"messageTitle":"Delete getValue function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":6}}},{"hash":"cd9ad14c299d2642e1d7737dc8e675d7b4cee4a3","isMergeCommit":true,"messageTitle":"Merge pull request #88 from hshiah/hshiah","messageBody":"Finish setting goals","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"wwweert123":{"docs":258,"functional-code":721,"test-code":44,"other":3},"NeoMinWei":{"docs":117,"functional-code":593,"test-code":131},"ryan1604":{"docs":421,"functional-code":817,"test-code":252,"other":2},"YFshadaow":{"docs":0,"functional-code":294,"test-code":17},"hshiah":{"docs":0,"functional-code":205,"test-code":0}},"authorContributionVariance":{"wwweert123":6826.6763,"NeoMinWei":12832.444,"ryan1604":20606.352,"YFshadaow":7598.486,"hshiah":1004.79504},"authorDisplayNameMap":{"wwweert123":"CS2113-T18-2 PUA ..RICK","NeoMinWei":"CS2113-T18-2 NEO .. WEI","ryan1604":"CS2113-T18-2 CHUA..RYAN","YFshadaow":"CS2113-T18-2 REN ..GDAO","hshiah":"CS2113-T18-2 SHI ..CHEN"}} diff --git a/AY2324S1-CS2113-T18-3_tp_master/authorship.json b/AY2324S1-CS2113-T18-3_tp_master/authorship.json index 7165cde..57f33aa 100644 --- a/AY2324S1-CS2113-T18-3_tp_master/authorship.json +++ b/AY2324S1-CS2113-T18-3_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" implementation group: \u0027com.google.code.gson\u0027, name: \u0027gson\u0027, version: \u00272.10.1\u0027","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"run {","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":5,"-":46}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"--------|:-----------------:|:----------------------------------------:|:---------:","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Cheung Ka Yuen | [Github](https://github.com/KenCheung18) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Lee Jun Hao Bryan | [Github](https://github.com/bljhty) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Lim Yuh Ching | [Github](https://github.com/limyuhching) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"limyuhching":1,"bljhty":2,"KenCheung18":1,"-":5}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"### IncomeManager","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"the IncomeManager is facilitated by `IncomeParser`, `IncomeManager`, `IncomeList` and `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"1. The user inputs the command to add income. This input is then passed to `IncomeParser` to be parsed.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"2. `IncomeParser` then parses the input and returns a `Income` object.","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"3. `IncomeManager` then adds the `Income` object to the `IncomeList`.","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"4. `IncomeManager` then returns a `String` to `Ui` to be printed out to the user.","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"![incomeManager_sequence_diagram.png](..%2Fimages%2FincomeManager_sequence_diagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":"### ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":"The ExpenseManager is facilitated by `ExpenseParser`, `ExpenseManager`, `ExpenseList` and `Ui`","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":"1. The user inputs the command to add expense.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":"2. This command is used to instantiate a ExpenseManager object which is executed.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":"3. During execution, the command is passed to ExpenseParser which extracts and parses the input fields.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"4. Input field information is passed to the relevant Expense constructor which returns a Expense object.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"5. Expense object is returned to ExpenseManager from ExpenseParser.","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":"6. Expense obejct is returned to Duke from ExpenseManager.","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":"![expenseManager_sequence_diagram.png](/Users/apple/Desktop/expenseManager_sequence_diagram.png)","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"### Find Command","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"The FindCommand is facilitated by `FindCommand`, `FindParser`, `Ui`,`ExpenseList` and `IncomeList`.","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"1. The user will first input the command to find the expense or income.","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":"find /t \u003ctype\u003e /cat [category] /de [description] /date [date]","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"2. The inputs will then be passed to `FindParser` to get the necessary fields such as type, category, description and date.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"3. The FindCommand is then instantiated with the necessary fields.","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"4. Users can choose to search through the expense list or income list.","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"5. If users searches through the income list, either the description or date will be used to search through the income list.","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":"6. If users searches through the expense list, either the category or date will be used to search through the expense list.","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"7. The execute method will then be called to search through the list and return the list of expenses or incomes that matches the search criteria.","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"![FindCommand_SequenceDiagram.png](..%2Fimages%2FFindCommand_SequenceDiagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":"### GetFromTxt Command","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":"The GetFromTxt Command is facilitated by `IOException`,`Scanner`, `KaChinnnnngException`, `IncomeList` and `ExpenseList`","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":"1. The user start the program and the command will start automatically with a default path","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":"2. Once the command executed, it will try to create an txt file on the default path","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":"3. If file failed to create, throw an `IOException`","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":"4. Catch the `IOExceotion` and print error messages","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":"5. Create a `Scanner` Object s to get content from txt file","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":"6. If amount in txt file exceed limit or incorrect, throw `KaChinnnningException`","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":"7. Read the content on the file and add corresponding object to incomes or expenses list","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":"![FindCommand_SequenceDiagram.png](..%2Fimages%2FGetFromTxt.png)","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":71,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"|---------|----------|------------------------------------|--------------------------------------------------------|","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"-"},"content":"| v1.0 |new user| see usage instructions | refer to them when I forget how to use the application |","lastModifiedDate":"2020-05-24"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| add new income entry | track all my incomes |","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| add new expense entry | track all of my expenses |","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| delete income entry | remove incomes that I no longer want to track |","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| delete expense entry | remove expenses that I no longer want to track |","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| list both income and expense entry | view all my expenses and incomes |","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| check my balace | better bugdet my expenditures |","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":84,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":86,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":88,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":90,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":92,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":32,"Hongzhii":13,"KenCheung18":12,"-":37}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"# Hi","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"-"},"content":"{Give product intro here}","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":1,"-":7}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"# KaChinnnng User Guide","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"welcome to KaChinnnng a personal finance tracker that helps you keep track of your expenses and income.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"2. Download the latest version of `KaChinnnng` from [here](http://link.to/duke).","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"3. Copy the downloaded file to the folder you want to use as the home folder for your KaChinnnng.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"4. open a command terminal and navigate to the folder where you have copied the file to.","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"5. type in the following to run the program","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"java -jar KaChinnnng.jar","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"6. if successful you should see the following output","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":"Welcome to KaChinnnngggg! How may i assist you today?","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"7. type in desired commands and press enter to execute them. (note: commands are not case sensitive)","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"## Features ","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"{Give detailed description of each feature}","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"### View help : help","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"Shows basic commands executable by the program.","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"help","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"### Add an entry: add","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"Creates a new entry for income or expenses in the program.","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":"Values of income and expense added has to be lower than 1000000.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"Income and Expense values takes up to 2 decimal places.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"To add an income:","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"add income /description \u003cdescription\u003e /date \u003cdate\u003e /amount \u003camount\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"To add an expense:","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"add expense /catergory \u003ccatergory\u003e /description \u003cdescription\u003e /date \u003cdate\u003e /amount \u003camount\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":"Use case:","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"- Prompts users if any of the fields are empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":"- There are only 3 categories for expenses: `Food`, `Transport`, `Utilities`.","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"- Amount is takes up to 2 decimal places.","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":"- by default, amount is set to SGD.","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"- format of date is `dd/mm/yyyy`.","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"- Date needs to be an existing date, and cannot be dates in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"add income /description salary /date 01/01/2020 /amount 1000","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":"add expense /category Food /description lunch /date 01/01/2020 /amount 10.50","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":"### List all entries: list","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":"Shows a full list of both the expenses and income created by the user.","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":"User can choose to view the list of income/expenses separately as well.","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"list","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"list income","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":"list expense","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":"### Delete an entry: delete","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":"Deletes an entry from the list of income/expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":"delete expense \u003cindex\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":"delete income \u003cindex\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":96,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer? ","lastModifiedDate":"2020-05-24"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":98,"author":{"gitId":"-"},"content":"**A**: {your answer here}","lastModifiedDate":"2020-05-24"},{"lineNumber":99,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":100,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":"{Give a \u0027cheat sheet\u0027 of commands here}","lastModifiedDate":"2020-05-24"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":"* Add todo `todo n/TODO_NAME d/DEADLINE`","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":78,"-":26}},{"path":"images/expenseManager_sequence_diagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"actor Duke","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"participant ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"participant ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"participant Expense","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"Duke -\u003e ExpenseManager: provides expense details","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"ExpenseManager -\u003e ExpenseParser: extractExpenseFields(details)","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser -\u003e ExpenseParser: parseDate(expenseDateString)","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseParser: validates date format","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser -\u003e ExpenseParser: parseExpense(argumentsByField)","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseParser: validates fields","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e Expense: calls Expense constructor","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"Expense --\u003e ExpenseParser: new Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseManager: returns Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":"ExpenseManager --\u003e Duke: returns new Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"Hongzhii":23}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.Balance;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearAll;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearExpenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearIncomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.DeleteExpenseCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.DeleteIncomeCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.ExpenseLister;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ExpenseManager;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.FindCommand;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.EditExpenseCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.EditIncomeCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.IncomeLister;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.IncomeManager;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.ListCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.UsageInstructions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.storage.GetFromTxt;","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.storage.SaveToTxt;","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.Parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.FindParser;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" * This class is the main class of the program.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" * It contains the main method that runs the program.","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" private Ui ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" private String storagePath;","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" private SaveToTxt save;","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" private GetFromTxt get;","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" public Duke() {","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" storagePath \u003d \"KaChinnnngggg.txt\";","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" save \u003d new SaveToTxt(storagePath);","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" get \u003d new GetFromTxt(storagePath);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" * This method runs the program.","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void run() {","lastModifiedDate":"2023-10-09"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" Ui.printWelcomeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" get.getFromTextFile(incomes, expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" } catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"\\tOOPS!!! File not found.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-11"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" String fullCommand \u003d ui.readCommand();","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" String command \u003d Parser.parse(fullCommand);","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" String[] parts \u003d command.split(\"-\", 2);","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" switch (parts[0]) {","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" case \"exit\":","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" isExit \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-11"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" case \"add_income\":","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" try{","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" IncomeManager incomeCommand \u003d new IncomeManager(fullCommand);","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" incomeCommand.execute();","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" Income newIncome \u003d incomeCommand.getNewIncome();","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" incomes.add(newIncome);","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" ui.printIncomeAddedMessage(newIncome);","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-12"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" case \"list_income\":","lastModifiedDate":"2023-10-12"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" new IncomeLister(incomes, ui).listIncomes();","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"Hongzhii"},"content":" case \"add_expense\":","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"Hongzhii"},"content":" try{","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"Hongzhii"},"content":" ExpenseManager expenseCommand \u003d new ExpenseManager(fullCommand);","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"Hongzhii"},"content":" expenseCommand.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"Hongzhii"},"content":" Expense newExpense \u003d expenseCommand.getNewExpense();","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"Hongzhii"},"content":" expenses.add(newExpense);","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"Hongzhii"},"content":" ui.printExpenseAddedMessage(newExpense);","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"Hongzhii"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"Hongzhii"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"Hongzhii"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" case \"list_expense\":","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"Hongzhii"},"content":" new ExpenseLister(expenses, ui).listExpenses();","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"limyuhching"},"content":" case \"list\":","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"limyuhching"},"content":" new ListCommand(incomes, expenses, ui).execute();","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"limyuhching"},"content":" case \"delete_income\":","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":116,"author":{"gitId":"limyuhching"},"content":" new DeleteIncomeCommand().execute(incomes, fullCommand, ui);","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"limyuhching"},"content":" case \"delete_expense\":","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"limyuhching"},"content":" new DeleteExpenseCommand().execute(expenses, fullCommand, ui);","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"KenCheung18"},"content":" case \"help\":","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"KenCheung18"},"content":" new UsageInstructions(ui).getHelp();","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"KenCheung18"},"content":" case \"balance\":","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"KenCheung18"},"content":" new Balance(incomes, expenses).getBalanceMessage();","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" case \"find\":","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" String[] parsedParameters \u003d FindParser.parseFindCommand(fullCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" incomes, expenses,","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" parsedParameters[0], parsedParameters[1],","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" parsedParameters[2], parsedParameters[3], ui);","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"KenCheung18"},"content":" case \"clear_incomes\":","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"KenCheung18"},"content":" new ClearIncomes(incomes).clearAllIncomes();","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"KenCheung18"},"content":" case \"clear_expenses\":","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"KenCheung18"},"content":" new ClearExpenses(expenses).clearAllIncomes();","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"KenCheung18"},"content":" case \"clear_all\":","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"KenCheung18"},"content":" new ClearAll(incomes, expenses).clearAllIncomeAndExpense();","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"limyuhching"},"content":" case \"edit_income\":","lastModifiedDate":"2023-10-26"},{"lineNumber":165,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":166,"author":{"gitId":"limyuhching"},"content":" new EditIncomeCommand(incomes, fullCommand).execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":167,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":169,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":170,"author":{"gitId":"limyuhching"},"content":" case \"edit_expense\":","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"limyuhching"},"content":" new EditExpenseCommand(expenses, fullCommand).execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":" default:","lastModifiedDate":"2023-10-11"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Invalid command. Please try again.\");","lastModifiedDate":"2023-10-11"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-11"},{"lineNumber":182,"author":{"gitId":"limyuhching"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":183,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":185,"author":{"gitId":"KenCheung18"},"content":" save.saveIncomeAndExpense(incomes,expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" ui.printGoodbyeMessage();","lastModifiedDate":"2023-10-11"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":191,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-09"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" new Duke().run();","lastModifiedDate":"2023-10-11"},{"lineNumber":193,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":195,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"limyuhching":37,"bljhty":89,"Hongzhii":14,"KenCheung18":46,"-":9}},{"path":"src/main/java/seedu/duke/commands/Balance.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" * The `Balance` class represents a financial balance calculator","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" * that calculates the balance between income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" * It takes a list of income and expense records as input and provides methods to calculate and display the balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"public class Balance {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" public Balance(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" * Calculates the financial balance by subtracting the total expenses from the total income.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * @return The calculated financial balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" public double getBalance() {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" double totalIncome \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" double totalExpense \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":" for (Income income : incomes) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" totalIncome +\u003d income.getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":" for (Expense expense : expenses) {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" totalExpense +\u003d expense.getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":" return totalIncome - totalExpense;","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" * Prints a message to the console displaying the calculated financial balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":" public void getBalanceMessage() {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"Balance: \" + getBalance());","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"KenCheung18":45}},{"path":"src/main/java/seedu/duke/commands/ClearAll.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"public class ClearAll {","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" public ClearAll(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomeAndExpense(){","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" incomes.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" expenses.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"Both income and expense list cleared\");","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":24}},{"path":"src/main/java/seedu/duke/commands/ClearExpenses.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"public class ClearExpenses {","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" public ClearExpenses(ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomes(){","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" expenses.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"You have cleared the expense list\");","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":16}},{"path":"src/main/java/seedu/duke/commands/ClearIncomes.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"public class ClearIncomes {","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" public ClearIncomes(ArrayList\u003cIncome\u003e incomes){","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomes(){","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" incomes.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"You have cleared the income list\");","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":17}},{"path":"src/main/java/seedu/duke/commands/Commands.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":" * Represents the abstract class for all commands.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific command classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"public abstract class Commands {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"limyuhching":1,"bljhty":17}},{"path":"src/main/java/seedu/duke/commands/DeleteExpenseCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" * The `DeleteExpenseCommand` class represents a command to delete an expense record from a list of expenses.","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" * It extends the `Commands` class and is used to manage expense records in the application.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"public class DeleteExpenseCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * Constructs a `DeleteExpenseCommand` object. This class does not have any specific constructor logic.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" public DeleteExpenseCommand() {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" * Executes the `DeleteExpenseCommand` to remove an expense record from the list of expenses.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" * @param expenses The list of expense records to be modified.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * @param fullcommand The full command entered by the user, including the index of the expense to be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is a problem with the command execution, such as missing arguments,","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * an invalid index, or a non-existent expense record.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" public void execute(ArrayList\u003cExpense\u003e expenses, String fullcommand, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" int index \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullcommand.split(\" \", 3);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" index \u003d Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" Expense removedExpense \u003d expenses.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" expenses.remove(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. This expense record has been deleted:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" System.out.println(removedExpense);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Expense \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":45}},{"path":"src/main/java/seedu/duke/commands/DeleteIncomeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" * The DeleteIncomeCommand class is responsible for deleting an income record from the list of incomes.","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"public class DeleteIncomeCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" * Constructs a DeleteIncomeCommand object.","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" public DeleteIncomeCommand() {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" * Executes the DeleteIncomeCommand to remove an income record from the list of incomes.","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" * @param incomes The list of income records to be modified.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" * @param fullcommand The full command entered by the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is a problem with the command execution, such as missing arguments,","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * invalid index, or a non-existent income record.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" public void execute(ArrayList\u003cIncome\u003e incomes, String fullcommand, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" int index \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullcommand.split(\" \", 3);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" index \u003d Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" Income removedIncome \u003d incomes.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" incomes.remove(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. This income record has been deleted:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" System.out.println(removedIncome);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Income \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":45}},{"path":"src/main/java/seedu/duke/commands/EditExpenseCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"public class EditExpenseCommand extends Commands {","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * Constructs an EditExpenseCommand with the specified expense records and full command.","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" * @param expenses The ArrayList of Expense objects containing expense records.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string entered by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in the command creation, such as missing arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" public EditExpenseCommand(ArrayList\u003cExpense\u003e expenses, String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" this.fullCommand \u003d fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * Executes the edit expense command. It parses the user input, retrieves the new expense information,","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * updates the expense record, and prints the changes.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in executing the command, such as missing arguments,","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * incorrect index, or if the specified expense record does not exist.","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" assert expenses !\u003d null : \"Incomes ArrayList must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" assert fullCommand !\u003d null : \"Full command string must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" index \u003d getIndex(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" ExpenseManager expenseCommand \u003d new ExpenseManager(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" expenseCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" Expense newExpense \u003d expenseCommand.getNewExpense();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" Expense removedExpense \u003d expenses.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" expenses.set(index, newExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. The expense record you\u0027ve specified has been changed:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Before: \" + removedExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"After: \" + newExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Expense \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" * Extracts and returns the index from the full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" * @return The index of the income record to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in extracting the index, such as missing arguments","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" * or if the index is not a valid integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" private int getIndex(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullCommand.split(\" \", 4);","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" assert tokens.length \u003e\u003d 4 : \"Command must have at least 4 tokens\";","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" return Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":71}},{"path":"src/main/java/seedu/duke/commands/EditIncomeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"public class EditIncomeCommand extends Commands {","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" * Constructs an EditIncomeCommand with the specified income records and full command.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" * @param incomes The ArrayList of Income objects containing income records.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string entered by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" public EditIncomeCommand(ArrayList\u003cIncome\u003e incomes, String fullCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" this.fullCommand \u003d fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * Executes the edit income command. It parses the user input, retrieves the new income information,","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" * updates the income record, and prints the changes.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in executing the command, such as missing arguments,","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" * incorrect index, or if the specified income record does not exist.","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" assert incomes !\u003d null : \"Incomes ArrayList must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" assert fullCommand !\u003d null : \"Full command string must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" index \u003d getIndex(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" IncomeManager incomeCommand \u003d new IncomeManager(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" incomeCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" Income newIncome \u003d incomeCommand.getNewIncome();","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" Income removedIncome \u003d incomes.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" incomes.set(index, newIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. The income record you\u0027ve specified has been changed:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Before: \" + removedIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"After: \" + newIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Income \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" * Extracts and returns the index from the full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" * @return The index of the income record to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in extracting the index, such as missing arguments","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" * or if the index is not a valid integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" private int getIndex(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullCommand.split(\" \", 4);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" assert tokens.length \u003e\u003d 4 : \"Command must have at least 4 tokens\";","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" return Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":72}},{"path":"src/main/java/seedu/duke/commands/ExpenseLister.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Represents the command that when executed, lists all expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * This class is a child class of the Command class.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseLister extends Commands {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * Constructor for ExpenseLister.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param expenses","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param ui","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" public ExpenseLister(ArrayList\u003cExpense\u003e expenses, Ui ui) {","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" listExpenses();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" * This method lists all incomes.","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" public void listExpenses() {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" if (expenses.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"You have no recorded expenses.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" for (int i \u003d 0; i \u003c expenses.size(); i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":" System.out.println((i + 1) + \". \" + expenses.get(i).toString());","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":53}},{"path":"src/main/java/seedu/duke/commands/ExpenseManager.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.parser.ExpenseParser;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * This is the class that manages the creation of new expense","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseManager extends Commands{","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private final String details;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":" private Expense newExpense;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" public ExpenseManager(String details) {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" this.details \u003d details;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * This method is used to execute the command","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d extractExpenseFields(details);","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" newExpense \u003d ExpenseParser.parseExpense(expenseFields);","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * This method returns new expense created","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" public Expense getNewExpense() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" return newExpense;","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" * This method extracts the fields of the expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" * @param details String containing the details of the expense","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" * @return expenseFields HashMap containing the fields of the income","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" private HashMap\u003cString, String\u003e extractExpenseFields(String details) throws KaChinnnngException{","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" HashMap\u003cString,String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":" String[] parts \u003d details.split(\"/cat | /type | /de | /date | /amt \");","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" if(parts.length !\u003d 6) {","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, parts[1].trim());","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, parts[2].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, parts[3].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, parts[4].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, parts[5].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"Hongzhii"},"content":" return expenseFields;","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":62}},{"path":"src/main/java/seedu/duke/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.time.Month;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.Year;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.format.TextStyle;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.Locale;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Represents a command to find and display financial records (either incomes or expenses) based on specific criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * The criteria include type (income/expense), category, description, and date.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This command supports searching by a specific date or by a month. If a date isn\u0027t provided, it will not be used","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" * as a filter. Similarly, if the category or description isn\u0027t provided, they won\u0027t be used as filters.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"public class FindCommand extends Commands {","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" private final String type;","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" private final String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" private final String description;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" private final LocalDate date;","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" private boolean isSearchByMonth \u003d false;","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" if(!dir.mkdirs()) {","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/FindCommand.log\", true);","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" * Constructs a new FindCommand with the given criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" * @param incomes The list of incomes to search from.","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" * @param expenses The list of expenses to search from.","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" * @param type The type of financial record to search for (either \"income\" or \"expense\").","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" * @param category The category to filter the results by.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * @param description The description to filter the results by.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" * @param dateString The date (or month) to filter the results by. Expected format: dd/MMM/yyyy.","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" * @param ui The UI component to display results.","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If an invalid type is provided or if there\u0027s an error parsing the date.","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" public FindCommand(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses, String type,","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" String category, String description, String dateString, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" if (!type.equalsIgnoreCase(\"income\") \u0026\u0026 !type.equalsIgnoreCase(\"expense\")) {","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Invalid type. Please use \u0027income\u0027 or \u0027expense\u0027.\");","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" this.date \u003d parseDate(dateString); // Convert date string to LocalDate","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, String.format(\"FindCommand initialised with type: %s\", type));","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" * Executes the find command. Searches through the provided list of incomes or expenses and displays","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" * matching results based on the given criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If there\u0027s an error during execution, such as an invalid type.","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" LOGGER.info(\"Executing FindCommand\");","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" assert incomes !\u003d null : \"incomes should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" assert expenses !\u003d null : \"expenses should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cExpense\u003e matchingExpenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cIncome\u003e matchingIncomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" if (\"expense\".equalsIgnoreCase(type)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" for (Expense e : expenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" if (matchesCriteria(e)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" matchingExpenses.add(e);","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO,String.format(\"Found %d matching expenses\", matchingExpenses.size()));","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" ui.showMatchingExpenses(matchingExpenses); // Assuming you have such a method in Ui","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" } else if (\"income\".equalsIgnoreCase(type)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" for (Income i : incomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" if (matchesCriteria(i)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" matchingIncomes.add(i);","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO,String.format(\"Found %d matching incomes\", matchingIncomes.size()));","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" ui.showMatchingIncomes(matchingIncomes); // Assuming you have such a method in Ui","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-24"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid type: \" + type);","lastModifiedDate":"2023-10-24"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" * Determines if a given date matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" * @param dateToCheck The date to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" * @return True if the date matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" private boolean matchesDate(LocalDate dateToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" if (this.date !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" if (isSearchByMonth) {","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" return dateToCheck.getMonthValue() \u003d\u003d this.date.getMonthValue();","lastModifiedDate":"2023-10-24"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" return dateToCheck.isEqual(this.date);","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" return true; // If this.date is null, then any date matches the criteria","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" * Determines if a given category matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" * @param categoryToCheck The category to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" * @return True if the category matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" private boolean matchesCategory(String categoryToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" return this.category \u003d\u003d null || (categoryToCheck !\u003d null \u0026\u0026 categoryToCheck.equalsIgnoreCase(this.category));","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":" * Determines if a given description matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":" * The description matches if it contains all the keywords specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" * If no description is specified in the command, then any description matches the criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" * @param descriptionToCheck The description to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" * @return True if the description matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" private boolean matchesDescription(String descriptionToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" if (this.description !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":" String[] keywords \u003d this.description.split(\"\\\\s+\");","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" for (String keyword : keywords) {","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" if (!descriptionToCheck.toLowerCase().contains(keyword.toLowerCase())) {","lastModifiedDate":"2023-10-24"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":" return false;","lastModifiedDate":"2023-10-24"},{"lineNumber":168,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":169,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":170,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"bljhty"},"content":" return true;","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":173,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":174,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":" * Determines if a given expense matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" * @param e The expense to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" * @return True if the expense matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" private boolean matchesCriteria(Expense e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" return matchesDate(e.getDate()) \u0026\u0026 matchesCategory(e.getCategory()) \u0026\u0026 matchesDescription(e.getDescription());","lastModifiedDate":"2023-10-24"},{"lineNumber":182,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":183,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":185,"author":{"gitId":"bljhty"},"content":" * Determines if a given income matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" * @param i The income to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" * @return True if the income matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":" private boolean matchesCriteria(Income i) {","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"bljhty"},"content":" return matchesDate(i.getDate()) \u0026\u0026 matchesCategory(i.getCategory()) \u0026\u0026 matchesDescription(i.getDescription());","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":193,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":195,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"bljhty"},"content":" * Converts a date string into a LocalDate object. Supports full date strings and month names.","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"bljhty"},"content":" * @param dateString Date as a string in the format dd/MMM/yyyy or as a month name.","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"bljhty"},"content":" * @return LocalDate representation of the provided dateString.","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If the date string is in an invalid format.","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"bljhty"},"content":" private LocalDate parseDate(String dateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":203,"author":{"gitId":"bljhty"},"content":" if (dateString \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":204,"author":{"gitId":"bljhty"},"content":" return null;","lastModifiedDate":"2023-10-23"},{"lineNumber":205,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":206,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");","lastModifiedDate":"2023-10-23"},{"lineNumber":207,"author":{"gitId":"bljhty"},"content":" LocalDate parsedDate \u003d null;","lastModifiedDate":"2023-10-24"},{"lineNumber":208,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":209,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":210,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d LocalDate.parse(dateString, formatter);","lastModifiedDate":"2023-10-24"},{"lineNumber":211,"author":{"gitId":"bljhty"},"content":" return parsedDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":212,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":213,"author":{"gitId":"bljhty"},"content":" // Check if dateString is just a month","lastModifiedDate":"2023-10-23"},{"lineNumber":214,"author":{"gitId":"bljhty"},"content":" for (Month month : Month.values()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":215,"author":{"gitId":"bljhty"},"content":" if (month.getDisplayName(TextStyle.SHORT, Locale.ENGLISH).equalsIgnoreCase(dateString)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":216,"author":{"gitId":"bljhty"},"content":" isSearchByMonth \u003d true;","lastModifiedDate":"2023-10-23"},{"lineNumber":217,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d LocalDate.of(Year.now().getValue(), month, 1);","lastModifiedDate":"2023-10-24"},{"lineNumber":218,"author":{"gitId":"bljhty"},"content":" assert parsedDate.getMonth() \u003d\u003d month : \"parsedDate month should be \" + month;","lastModifiedDate":"2023-10-24"},{"lineNumber":219,"author":{"gitId":"bljhty"},"content":" return parsedDate;","lastModifiedDate":"2023-10-24"},{"lineNumber":220,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":221,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":222,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"failed to parse date\" + dateString);","lastModifiedDate":"2023-10-24"},{"lineNumber":223,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Invalid date format. Please use format like 20/Oct/2023.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":224,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":225,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":226,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-23"},{"lineNumber":227,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"bljhty":227}},{"path":"src/main/java/seedu/duke/commands/IncomeLister.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * Represents the command that when executed, lists all incomes.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * This class is a child class of the Command class.","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class IncomeLister extends Commands {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeLister.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" * Constructor for IncomeLister.","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * @param incomes ArrayList of incomes","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * @param ui Instance of Ui","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" public IncomeLister(ArrayList\u003cIncome\u003e incomes, Ui ui) {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" assert incomes !\u003d null : \"incomes should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" assert ui !\u003d null : \"ui should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Initialised IncomeLister\"));","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" listIncomes();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" * This method lists all incomes.","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" // Updated method name to follow Java naming conventions","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" public void listIncomes() {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" if (incomes.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" System.out.println(\"You have no recorded incomes.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" for (int i \u003d 0; i \u003c incomes.size(); i++) {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" System.out.println((i + 1) + \". \" + incomes.get(i).toString());","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Incomes listed successfully\"));","lastModifiedDate":"2023-10-19"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":64}},{"path":"src/main/java/seedu/duke/commands/IncomeManager.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.IncomeParser;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Represents the class that manages the creation of a new income.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific income creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class IncomeManager extends Commands{","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeManager.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" private final String details;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" private Income newIncome;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" static{","lastModifiedDate":"2023-10-19"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/IncomeManager.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" public IncomeManager(String details) {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" assert details !\u003d null : \"details should not be null\"; // Ensure that details is not null","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" this.details \u003d details;","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d extractIncomeFields(details);","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" newIncome \u003d IncomeParser.parseIncome(incomeFields);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, \"successful parsing of income\"); // logging successful parsing of income","lastModifiedDate":"2023-10-19"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" * This method returns the new income created.","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" * @return newIncome","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" public Income getNewIncome() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" return newIncome;","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" * This method extracts the fields of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" * @param details String containing the details of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" * @return incomeFields HashMap containing the fields of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" private HashMap\u003cString, String\u003e extractIncomeFields(String details) throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" assert details !\u003d null : \"details should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" // Split the details string based on the field keywords","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" String[] parts \u003d details.split(\"/de|/date|/amt\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" // Check if all fields are present in the string","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" if (parts.length !\u003d 4) {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Missing or out-of-order fields detected in income details: \" + details);","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Expected fields `/description`, `/date`, and \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" \"`/amount` are missing or improperly formatted.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" // Populate the HashMap with extracted fields","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, parts[1].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, parts[2].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, parts[3].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" return incomeFields;","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":97}},{"path":"src/main/java/seedu/duke/commands/KaChinnnngException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":" * Represents the exception thrown when there is an error in the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"public class KaChinnnngException extends Exception{","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" public KaChinnnngException(String message) {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":" super(message);","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":10}},{"path":"src/main/java/seedu/duke/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" * The `ListCommand` class is responsible for displaying a list of income and expense records,","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" * along with the total income, total expenses, and the total balance.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":" * It extends the `Commands` class and is used to provide a summary of financial records to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class ListCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private double totalIncome;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private double totalExpenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * Constructs a `ListCommand` object with the specified income and expense lists and a user interface.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * @param incomes The list of income records to be displayed.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * @param expenses The list of expense records to be displayed.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages and financial records.","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" public ListCommand(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses, Ui ui) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" totalIncome \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" totalExpenses \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" * Executes the `ListCommand` to display a summary of income and expense records,","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" * along with the total balance.","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" public void execute() {","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" if (incomes.isEmpty() \u0026\u0026 expenses.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You do not have any records.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" // Print incomes","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" if (incomes.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You have no recorded incomes.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" for (int i \u003d 0; i \u003c incomes.size(); i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" System.out.println((i + 1) + \". \" + incomes.get(i).toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" totalIncome +\u003d incomes.get(i).getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"Total income is: $%.2f.\\n\", totalIncome);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" System.out.println();","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" // Print expenses","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" if (expenses.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You have no recorded expenses.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" for (int i \u003d 0; i \u003c expenses.size(); i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" System.out.println((i + 1) + \". \" + expenses.get(i).toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" totalExpenses +\u003d expenses.get(i).getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"Total expenses is: $%.2f.\\n\", totalExpenses);","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"\\nTotal balance is: $%.2f.\\n\", totalIncome - totalExpenses);","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":73}},{"path":"src/main/java/seedu/duke/commands/UsageInstructions.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"public class UsageInstructions {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":" // Shows a message linking the user to the user guide of our app","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" private final seedu.duke.ui.Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" * The `UsageInstructions` class provides usage instructions for the application,","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" * including command formats and a link to the user guide.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" public UsageInstructions(Ui ui) {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" * Displays usage instructions for the application, including command formats and a link to the user guide.","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" public void getHelp(){","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" // Shows a message linking the user to the user guide of our app","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" System.out.println(\"You can access our user guide by \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" \"https://docs.google.com/document/d/1BOz_v4eYQ8y7Dje6Jm6nqymi9jmrsb9MAohLCL_sLvI/edit?usp\u003dsharing\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" // Displays the various commands that user can use including the respective formats of the commands","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Functions and their format:\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Adding an entry: add\\nFormat:\\n\" + \"Add expense /category /description /value\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" \"Add income /description /value\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Listing all entries: list\\nFormat:\\n\" + \"list\\n\" + \"list income\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" \"list expense\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Deleting an entry: delete\\nFormat:\\ndelete income [index_pos]\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" \"delete expense [index_pos]\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Check balance of income: balance\\nFormat:\\n\" + \"balance\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Exiting the program: exit\\nFormat:\\n\" + \"exit\");","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":30,"KenCheung18":7}},{"path":"src/main/java/seedu/duke/financialrecords/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":" * Implementation of the Expense class","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":" * Basic expense class inherits from FinancialRecord and does not include any additional attributes","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Attribute \"amount\" contains a negative double which will make it easier to tally up the net total at the end","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"public class Expense extends FinancialRecord {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" protected String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" public Expense(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" public String getCategory() {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" return \"Expense: \" + getDescription() +","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":7,"Hongzhii":20}},{"path":"src/main/java/seedu/duke/financialrecords/FinancialRecord.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * Represents the abstract class for all financial records.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public abstract class FinancialRecord{","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FinancialRecord.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" ","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" protected String description;","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" protected LocalDate date;","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" protected double amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This method is used to create a new financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" public FinancialRecord(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" assert description !\u003d null : \"description should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" assert date !\u003d null : \"date should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" if (description.trim().isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Description is empty\");","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Description cannot be empty!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" if (amount \u003c 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Amount is negative\");","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Amount cannot be negative!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" if (date.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Date is in the future\");","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Date cannot be in the future!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public String getCategory() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" return \"\";","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" * This method is used to get the description of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" * @return String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" public String getDescription() {","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" return description;","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * This method is used to get the date of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" * @return LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" public LocalDate getDate() {","lastModifiedDate":"2023-10-12"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" return date;","lastModifiedDate":"2023-10-12"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" * This method is used to get the date of the financial record in a string format.","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" * @return String containing the date of the financial record in a string format","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" public String getDateString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");","lastModifiedDate":"2023-10-12"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" return date.format(formatter);","lastModifiedDate":"2023-10-12"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * This method is used to get the amount of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" * @return double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" public double getAmount() {","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" return amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" * This method is used to set the description of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" public void setDescription(String description) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" assert description !\u003d null : \"description should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" if (description.trim().isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Description cannot be empty!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-12"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" * This method is used to set the date of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" public void setDate(LocalDate date) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" assert date !\u003d null : \"date should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-12"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" * This method is used to set the amount of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" public void setAmount(double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" assert amount \u003e\u003d 0 : \"amount should not be negative\";","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" return \"\";","lastModifiedDate":"2023-10-12"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":152}},{"path":"src/main/java/seedu/duke/financialrecords/Food.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Food class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents food expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Food extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private MealType mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Food class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param mealType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Food(String description, LocalDate date, double amount, MealType mealType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" this.category \u003d \"food\";","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.mealType \u003d mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" * Returns meal type","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" public MealType getMealType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" return mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return \"Food Expense (\" + getMealType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":1,"Hongzhii":45}},{"path":"src/main/java/seedu/duke/financialrecords/Income.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * Implementation of the Income class","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * Basic income class inherits from FinancialRecord and does not include any additional attributes","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class Income extends FinancialRecord {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(Income.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/Income.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method is used to create a new financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" public Income(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO,(\"Income created with description: \" +","lastModifiedDate":"2023-10-19"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" description + \" date: \" + date + \" amount: \" + amount));","lastModifiedDate":"2023-10-19"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" return \"Income: \" + getDescription() + ","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" \" | Date: \" + getDateString()+ \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":64}},{"path":"src/main/java/seedu/duke/financialrecords/Transport.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Transport class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents transportation expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Transport extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private TransportationType transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Transport class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param transportationType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Transport(String description, LocalDate date, double amount,","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" TransportationType transportationType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.transportationType \u003d transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" * Returns transportation type","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" public TransportationType getTransportationType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" return transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return \"Transportation Expense (\" + getTransportationType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":46}},{"path":"src/main/java/seedu/duke/financialrecords/Utilities.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Utilities class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents utility expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Utilities extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private UtilityType utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Utilities class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param utilityType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Utilities(String description, LocalDate date, double amount,","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" UtilityType utilityType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.utilityType \u003d utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" * Returns utility type","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" public UtilityType getUtilityType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" return utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return \"Utilities Expense(\" + getUtilityType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":46}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/MealType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class to represent meal types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum MealType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, BREAKFAST, LUNCH, DINNER","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/TransportationType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class that represents all transportation types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum TransportationType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, TRAIN, BUS, TAXI, FUEL","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/UtilityType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class that represents all utility types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum UtilityType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, WATER, ELECTRICITY, GAS","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/parser/ExpenseParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.ResolverStyle;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseParser {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" public static final String CATEGORY_FIELD \u003d \"ca\";","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" public static final String TYPE_FIELD \u003d \"ty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" public static final String DESCRIPTION_FIELD \u003d \"de\";","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" public static final String DATE_FIELD \u003d \"da\";","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public static final String AMOUNT_FIELD \u003d \"am\";","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" public static final String INDEX_FIELD \u003d \"in\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" public static LocalDate parseDate(String expenseDateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" LocalDate expenseDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MM/uuuu\")","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" .withResolverStyle(ResolverStyle.STRICT);","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" expenseDate \u003d LocalDate.parse(expenseDateString, formatter);","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a valid date in the format dd/MM/yyyy\");","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" if (expenseDate.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a date that is not in the future\");","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" return expenseDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" public static Expense parseExpense(HashMap\u003cString, String\u003e argumentsByField) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" if (!argumentsByField.containsKey(CATEGORY_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(TYPE_FIELD) ||","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(DESCRIPTION_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(DATE_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(AMOUNT_FIELD)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":" String expenseCategoryString \u003d argumentsByField.get(CATEGORY_FIELD).toLowerCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" String expenseTypeString \u003d argumentsByField.get(TYPE_FIELD).toLowerCase();","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" String expenseDescriptionString \u003d argumentsByField.get(DESCRIPTION_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":" String expenseDateString \u003d argumentsByField.get(DATE_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"Hongzhii"},"content":" String expenseAmountString \u003d argumentsByField.get(AMOUNT_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"Hongzhii"},"content":" LocalDate expenseDate \u003d parseDate(expenseDateString);","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"Hongzhii"},"content":" double expenseAmount;","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"Hongzhii"},"content":" expenseAmount \u003d Double.parseDouble(expenseAmountString);","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"Hongzhii"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a valid amount\");","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"Hongzhii"},"content":" if (expenseAmount \u003e 999999.99 || expenseAmount \u003c\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Expense amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"Hongzhii"},"content":" if (expenseCategoryString.equals(\"food\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"breakfast\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.BREAKFAST);","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"lunch\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.LUNCH);","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"dinner\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.DINNER);","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"Hongzhii"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseCategoryString.equals(\"transport\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"train\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"Hongzhii"},"content":" TransportationType.TRAIN);","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"bus\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"Hongzhii"},"content":" TransportationType.BUS);","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"taxi\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"Hongzhii"},"content":" TransportationType.TAXI);","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"fuel\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"Hongzhii"},"content":" TransportationType.FUEL);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"Hongzhii"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"Hongzhii"},"content":" TransportationType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" } else if (expenseCategoryString.equals(\"utilities\")) {","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"water\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.WATER);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"electricity\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.ELECTRICITY);","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"gas\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.GAS);","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"Hongzhii"},"content":" } else{","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid category\");","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"Hongzhii"},"content":" public static int getIndex(HashMap\u003cString, String\u003e argumentsByFields) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"Hongzhii"},"content":" if (!argumentsByFields.containsKey(INDEX_FIELD)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing index field detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":113,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"Hongzhii"},"content":" return Integer.parseInt(argumentsByFields.get(INDEX_FIELD));","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"Hongzhii"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":3,"Hongzhii":117}},{"path":"src/main/java/seedu/duke/parser/FindParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"public class FindParser {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" * Parses the find command input.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * @param fullCommand The full command string input by the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * @return An array of Strings containing the parsed parameters in the order: TYPE, CATEGORY, DESCRIPTION, DATE.","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If the command format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public static String[] parseFindCommand(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" String[] tokens \u003d fullCommand.split(\" \");","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" String[] parsedParameters \u003d new String[4]; // To store TYPE, CATEGORY, DESCRIPTION, DATE","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" String[] validParameters \u003d {\"/t\", \"/cat\", \"/de\", \"/date\"}; // List of valid parameters","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" for (String token : tokens) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" if (token.startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" boolean isValidParam \u003d false;","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" for (String validParam : validParameters) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" if (token.equals(validParam)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" isValidParam \u003d true;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" if (!isValidParam) {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Unrecognized parameter \\\"\" + token + \"\\\". \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" \"Please refer to the help guide for valid parameters.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/type\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /t instead of /type for specifying the type.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/category\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /cat instead of /category for specifying the category.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/description\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /de instead of /description for specifying the description.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" if (!fullCommand.contains(\"/t\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The /t TYPE field is mandatory.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" int typeIndex \u003d indexOf(tokens, \"/t\");","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" if (typeIndex \u003d\u003d tokens.length - 1 || tokens[typeIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /t TYPE cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" parsedParameters[0] \u003d tokens[typeIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" if(\"income\".equalsIgnoreCase(parsedParameters[0])) {","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/cat\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The /cat CATEGORY field is not applicable for income.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/cat\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" int categoryIndex \u003d indexOf(tokens, \"/cat\");","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" if (categoryIndex \u003d\u003d tokens.length - 1 || tokens[categoryIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /c CATEGORY cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" parsedParameters[1] \u003d tokens[categoryIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/de\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" int descriptionIndex \u003d indexOf(tokens, \"/de\");","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" if (descriptionIndex \u003d\u003d tokens.length - 1 || tokens[descriptionIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /de DESCRIPTION cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" parsedParameters[2] \u003d tokens[descriptionIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/date\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" int dateIndex \u003d indexOf(tokens, \"/date\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" if (dateIndex \u003d\u003d tokens.length - 1 || tokens[dateIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /da DATE cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" parsedParameters[3] \u003d tokens[dateIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" // Check that at least one optional field is provided","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" if (parsedParameters[1] \u003d\u003d null \u0026\u0026 parsedParameters[2] \u003d\u003d null \u0026\u0026 parsedParameters[3] \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"At least one of the optional fields [/c CATEGORY], \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" \"[/de DESCRIPTION], [/da DATE] must be provided.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" return parsedParameters;","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * Helper method to find the index of a specific string in an array.","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" * @param array The array to search.","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" * @param value The string value to find.","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" * @return The index of the value in the array, or -1 if not found.","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" private static int indexOf(String[] array, String value) {","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" for (int i \u003d 0; i \u003c array.length; i++) {","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" if (array[i].equals(value)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" return i;","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" return -1;","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"bljhty":108}},{"path":"src/main/java/seedu/duke/parser/IncomeParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.time.format.ResolverStyle;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * Represents the parser for the Income class.","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" * This class serves to parse the user input into a format that the Income class can understand","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"public class IncomeParser {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" public static final String DESCRIPTION_FIELD \u003d \"de\";","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" public static final String DATE_FIELD \u003d \"da\";","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" public static final String AMOUNT_FIELD \u003d \"am\";","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" public static final String INDEX_FIELD \u003d \"in\";","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeParser.class.getName());","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/IncomeParser.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the date of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeParser class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeManager class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" * @param incomeDateString String containing the date of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" * @return incomeDate LocalDate containing the date of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public static LocalDate parseDate(String incomeDateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" assert incomeDateString !\u003d null : \"incomeDateString should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" LocalDate incomeDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MM/uuuu\")","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" .withResolverStyle(ResolverStyle.STRICT);","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" incomeDate \u003d LocalDate.parse(incomeDateString, formatter);","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid date format\" + incomeDateString, e);","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid date in the format dd/MM/yyyy\");","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" if (incomeDate.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Date is in the future\" + incomeDateString);","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a date that is not in the future\");","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" return incomeDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the fields of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeManager class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" * @param argumentsByField HashMap containing the description, date, and amount of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" * @return Income object created from the provided fields","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" public static Income parseIncome(HashMap\u003cString, String\u003e argumentsByField) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" if (!argumentsByField.containsKey(DESCRIPTION_FIELD) ||","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" !argumentsByField.containsKey(DATE_FIELD) ||","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" !argumentsByField.containsKey(AMOUNT_FIELD)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" String incomeDescriptionString \u003d argumentsByField.get(DESCRIPTION_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" String incomeDateString \u003d argumentsByField.get(DATE_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" String incomeAmountString \u003d argumentsByField.get(AMOUNT_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" LocalDate incomeDate \u003d parseDate(incomeDateString);","lastModifiedDate":"2023-10-12"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" double incomeAmount;","lastModifiedDate":"2023-10-12"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" incomeAmount \u003d Double.parseDouble(incomeAmountString);","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid amount format\" + incomeAmountString, e);","lastModifiedDate":"2023-10-19"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid amount\");","lastModifiedDate":"2023-10-12"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" if (incomeAmount \u003e 999999.99 || incomeAmount \u003c\u003d 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid amount\" + incomeAmountString);","lastModifiedDate":"2023-10-19"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Income amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-12"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" return new Income(incomeDescriptionString, incomeDate, incomeAmount);","lastModifiedDate":"2023-10-12"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" * This method is used to get the index of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeDeleter class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" * @param argumentsByFields HashMap containing the index of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" * @return index int containing the index of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" public static int getIndex(HashMap\u003cString, String\u003e argumentsByFields) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" assert argumentsByFields !\u003d null : \"argumentsByFields should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" if (!argumentsByFields.containsKey(INDEX_FIELD)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Missing index field detected\");","lastModifiedDate":"2023-10-12"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" int index;","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" index \u003d Integer.parseInt(argumentsByFields.get(INDEX_FIELD));","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-12"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" if (index \u003c\u003d 0) {","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" return index;","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":138}},{"path":"src/main/java/seedu/duke/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"/*","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * parser class to parse user input","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class Parser {","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" //private static final Logger LOGGER \u003d Logger.getLogger(Parser.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(Parser.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/Parser.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the user input.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method is used by the Main class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" * @param fullCommand String containing the user input","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * @return String containing the command to be executed","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" public static String parse(String fullCommand) {","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" assert fullCommand !\u003d null : \"fullCommand should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" String trimmedCommand \u003d fullCommand.trim();","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" String commandLowerCase \u003d trimmedCommand.toLowerCase();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Parsing user input:\") + fullCommand);","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" String resultCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" if (commandLowerCase.equals(\"exit\")) {","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"exit\";","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.startsWith(\"add income\")) {","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"add_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.equals(\"list income\")) {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":" } else if (commandLowerCase.startsWith(\"add expense\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"add_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"Hongzhii"},"content":" } else if (commandLowerCase.equals((\"list expense\"))) {","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.equals(\"help\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"help\";","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.equals(\"list\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list\";","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"delete income\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"delete_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"delete expense\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"delete_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.equals(\"balance\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"balance\";","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.startsWith(\"find\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"find\";","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear incomes\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_incomes\";","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear expenses\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_expenses\";","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear all\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_all\";","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"edit income\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"limyuhching"},"content":" resultCommand \u003d \"edit_income\";","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"edit expense\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"limyuhching"},"content":" resultCommand \u003d \"edit_expense\";","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"invalid\";","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO , (\"Parsed command: \") + resultCommand);","lastModifiedDate":"2023-10-19"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" return resultCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"limyuhching":7,"bljhty":77,"Hongzhii":2,"KenCheung18":8}},{"path":"src/main/java/seedu/duke/storage/GetFromTxt.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.storage;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"import java.io.File;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" * The GetFromTxt class is responsible for reading financial records data from a text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" * It parses the contents of the file and populates two ArrayLists: one for Incomes and one for Expenses.","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" * This class handles exceptions for file creation errors, parsing errors, and other issues that may arise","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * when reading data from the file.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":"public class GetFromTxt {","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" private static final String AMOUNT_NOT_SUPPORT_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" \"Amount field from this line is not supported from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" private static final String DATE_TIME_FORMAT_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" \"Date time format incorrect on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" private static final String FILE_CREATION_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" \"Something went wrong while creating the file from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" private static final String INDEX_OUT_OF_BOUND_FROM_FILE_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":" \"Details missed on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" private static final String NUMBER_FROM_FILE_INCORRECT \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" \"The expense type is incorrect on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" private final File file;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"KenCheung18"},"content":" * Construct a new object of the GetFromTxt class with the provided file path.","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" * @param path The path to the text file containing financial records data.","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":" public GetFromTxt(String path) {","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":" file \u003d new File(path);","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":" * Reads financial records data from the text file and add to the corresponding ArrayLists","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" * with Income and Expense objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList to store Income objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList to store Expense objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" * @throws FileNotFoundException If the file specified by the path cannot be found.","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"KenCheung18"},"content":" public void getFromTextFile(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) throws FileNotFoundException {","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"KenCheung18"},"content":" if (file.createNewFile()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"KenCheung18"},"content":" return; // If there is no such file in the directory, create the file and return without reading data.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"KenCheung18"},"content":" System.out.println(FILE_CREATION_ERROR);","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"KenCheung18"},"content":" Scanner s \u003d new Scanner(file); // Create a Scanner using the File as the source","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"KenCheung18"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"KenCheung18"},"content":" String textLine \u003d s.nextLine();","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" // Parse the data from the text line","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"KenCheung18"},"content":" int expenseType \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"KenCheung18"},"content":" String commandFromFile \u003d textLine.split(\" \\\\| \")[0];","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"KenCheung18"},"content":" String descriptionFromFile \u003d textLine.split(\" \\\\| \")[1];","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" double amountFromFile \u003d Double. parseDouble(textLine.split(\" \\\\| \")[2]);","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" LocalDate dateFromFile \u003d LocalDate.parse(textLine.split(\" \\\\| \")[3]);","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":" // Check for valid amount range","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" if (amountFromFile \u003e 999999.99 || amountFromFile \u003c\u003d 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" throw new KaChinnnngException(\"Expense amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"KenCheung18"},"content":" if (!commandFromFile.equals(\"I\")){","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"KenCheung18"},"content":" expenseType \u003d Integer.parseInt(textLine.split(\" \\\\| \")[4]);","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"KenCheung18"},"content":" // Create appropriate objects based on the commandFromFile","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"KenCheung18"},"content":" switch (commandFromFile) {","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"KenCheung18"},"content":" case \"I\":","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"KenCheung18"},"content":" incomes.add(new Income(descriptionFromFile, dateFromFile, amountFromFile));","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"KenCheung18"},"content":" case \"EF\":","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Food(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, MealType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"KenCheung18"},"content":" case \"ET\":","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Transport(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, TransportationType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"KenCheung18"},"content":" case \"EU\":","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Utilities(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, UtilityType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"KenCheung18"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"The format of this line is incorrect \" + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"KenCheung18"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"KenCheung18"},"content":" System.out.println(INDEX_OUT_OF_BOUND_FROM_FILE_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"KenCheung18"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"KenCheung18"},"content":" System.out.println(AMOUNT_NOT_SUPPORT_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"KenCheung18"},"content":" } catch (DateTimeParseException e){","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"KenCheung18"},"content":" System.out.println(DATE_TIME_FORMAT_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"KenCheung18"},"content":" } catch(NumberFormatException e){","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"KenCheung18"},"content":" System.out.println(NUMBER_FROM_FILE_INCORRECT + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":118}},{"path":"src/main/java/seedu/duke/storage/SaveToTxt.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.storage;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" * The SaveToTxt class is responsible for saving financial records data to a text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" * It can save both Income and Expense objects to the specified file.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" * This class handles exceptions for IO errors that may occur during file operations.","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":"public class SaveToTxt {","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" private static final String IO_ERROR_MESSAGE \u003d \"An error occurred while saving tasks to the file.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" private final String path;","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" * Construct a new object of the SaveToTxt class with the file path.","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * @param path The path to the text file where data will be saved.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" public SaveToTxt(String path) {","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" this.path \u003d path;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" * Saves both Income and Expense objects to the specified text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList of Income objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList of Expense objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" public void saveIncomeAndExpense(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses){","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" saveIncomeToTextFile(incomes);","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" saveExpenseToTextFile(expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" * Saves Income objects to the text file. Each Income object is represented as a line in the txt file.","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList of Income objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":" * @throws IOException If an IO error occurs during the file write operation.","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":" public void saveIncomeToTextFile(ArrayList\u003cIncome\u003e incomes) throws IOException {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":" try (FileWriter fw \u003d new FileWriter(path)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":" for (Income income : incomes) {","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":" String incomeDescription \u003d income.getDescription();","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" String incomeDate \u003d String.valueOf(income.getDate());","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" String incomeAmount \u003d String.valueOf(income.getAmount());","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" String textToAdd \u003d \"I\" + \" | \" + incomeDescription + \" | \" + incomeAmount + \" | \" + incomeDate + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"KenCheung18"},"content":" * Saves Expense objects to the text file. Each Expense object is represented as a line in the file,","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"KenCheung18"},"content":" * and the type of Expense (Food, Transport, or Utilities) is specified in the line.","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList of Expense objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"KenCheung18"},"content":" * @throws IOException If an IO error occurs during the file write operation.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"KenCheung18"},"content":" public void saveExpenseToTextFile(ArrayList\u003cExpense\u003e expenses) throws IOException{","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" try (FileWriter fw \u003d new FileWriter(path, true)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"KenCheung18"},"content":" for (Expense expense : expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"KenCheung18"},"content":" String textToAdd \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"KenCheung18"},"content":" String expenseDescription \u003d expense.getDescription();","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" String expenseDate \u003d String.valueOf(expense.getDate());;","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" String expenseAmount \u003d String.valueOf(expense.getAmount());","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" // Determine the type of Expense and format the line accordingly","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" if (expense.getClass() \u003d\u003d Food.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"EF\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Food) expense).getMealType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"KenCheung18"},"content":" } else if (expense.getClass() \u003d\u003d Transport.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"ET\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Transport) expense).getTransportationType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"KenCheung18"},"content":" } else if (expense.getClass() \u003d\u003d Utilities.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"EU\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Utilities) expense).getUtilityType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"KenCheung18"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":98}},{"path":"src/main/java/seedu/duke/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" * This class handles the user interface of the program.","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"public class Ui {","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" private static final String lineDivider \u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public Scanner scanner;","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" * Constructor for Ui.","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" public Ui() {","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" this.scanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This method reads the command input by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" * @return String containing the command input by the user","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is no input provided by the user","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" public String readCommand() throws KaChinnnngException {","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" if (scanner.hasNextLine()) {","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" return scanner.nextLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"No input provided by the user.\");","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method prints the line divider.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" public static void showLineDivider() {","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" * Prints the welcome message when the program starts.","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" public static void printWelcomeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Welcome to KaChinnnngggg! How may i assist you today?\");","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * Prints the goodbye message when the program ends.","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" public void printGoodbyeMessage() {","lastModifiedDate":"2023-10-11"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Bye. Hope to see you again soon!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" * prints the message when the user inputs his income","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * @param income Income object created from the provided fields","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" public static void printIncomeAddedMessage(Income income) {","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Got it. I\u0027ve added this income:\\n\" + income.toString());","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * Prints a message indicating the start of the income list display.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" public void printListIncomeMessage() {","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"Hongzhii"},"content":" public void printExpenseAddedMessage(Expense expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Got it. I\u0027ve added this expense:\\n\" + expense.toString());","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"Hongzhii"},"content":" public void printListExpenseMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" public void printMessage(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" public void showMatchingIncomes(List\u003cIncome\u003e matchingIncomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" if(matchingIncomes.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" System.out.println(\"No matching incomes found.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are the matching incomes in your list:\");","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" for (Income income : matchingIncomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" System.out.println(income.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" public void showMatchingExpenses(List\u003cExpense\u003e matchingExpenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" if (matchingExpenses.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" System.out.println(\"No matching expenses found.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are the matching expenses in your list:\");","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" for (Expense expense : matchingExpenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" System.out.println(expense.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"limyuhching":5,"bljhty":101,"Hongzhii":9}},{"path":"src/test/java/seedu/duke/commands/BalanceTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Tests for the {@link Balance} class.","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This test class provides test cases to check the calculation and reporting","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" * of financial balance between income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class BalanceTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Sets up the test fixture.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * Called before every test case method.","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" public void setup() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" incomes.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" incomes.add(new Income(\"Bonus\", LocalDate.of(2023, 10, 15), 1000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" expenses.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" expenses.add(new Expense(\"Groceries\", LocalDate.of(2023, 10, 7), 100.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with both income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly subtracts expenses from income.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withBothIncomeAndExpenses_returnsCorrectDifference() {","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(incomes, expenses);","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" assertEquals(3900.0, balance.getBalance());","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no records.","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns 0.","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void testNoRecords() {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(new ArrayList\u003c\u003e(), new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" assertEquals(0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" \"Balance should be 0 when no records are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns a positive value equal to income.","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withNoExpenses_returnsIncomeValue()throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cIncome\u003e incomesOnly \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" incomesOnly.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(incomesOnly, new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" \"Balance should equal sum of all incomes when no expenses are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no incomes.","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns a negative value equal to expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withNoIncomes_returnsNegativeExpenseValue()throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cExpense\u003e expensesOnly \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" expensesOnly.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(new ArrayList\u003c\u003e(), expensesOnly);","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" assertEquals(-2000.0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" \"Balance should be negative sum of all expenses when no incomes are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":85}},{"path":"src/test/java/seedu/duke/commands/DeleteExpenseCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * This class contains JUnit tests for the DeleteExpenseCommand class.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":"public class DeleteExpenseCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" private DeleteExpenseCommand deleteExpenseCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" public void setUp() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" deleteExpenseCommand \u003d new DeleteExpenseCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with valid input. The expense should be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_expenseDeleted() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" Expense expense \u003d new Expense(\"Lunch\", LocalDate.now().minusDays(1), 20.00);","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" expenses.add(expense);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" // Act","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" // Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" assertEquals(0, expenses.size());","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with missing arguments. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" public void testExecute_missingArgument_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense\";","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with an invalid index. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with a non-existent expense index.","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" * It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"limyuhching"},"content":" public void testExecute_nonExistentExpenseIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"limyuhching":82}},{"path":"src/test/java/seedu/duke/commands/DeleteIncomeCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * This class contains JUnit tests for the DeleteIncomeCommand class.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":"public class DeleteIncomeCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" private DeleteIncomeCommand deleteIncomeCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" public void setUp() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" deleteIncomeCommand \u003d new DeleteIncomeCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with valid input. The income should be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_incomeDeleted() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" Income income \u003d new Income(\"Salary\",","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" incomes.add(income);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" // Act","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" // Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" assertEquals(0, incomes.size());","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with missing arguments. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" public void testExecute_missingArgument_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income\";","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with an invalid index. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with a non-existent income index.","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":" * It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"limyuhching"},"content":" public void testExecute_nonExistentIncomeIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"limyuhching":83}},{"path":"src/test/java/seedu/duke/commands/EditExpenseCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class EditExpenseCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" public void setUp() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" // Initialize the expenses and fullCommand for testing","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" expenses.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" expenses.add(new Expense(\"Groceries\", LocalDate.of(2023, 10, 7), 100.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" fullCommand \u003d \"edit expense 3 expense /cat food /type lunch /de chicken sandwich /date 01/10/2023 /amt 10.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" // This test checks if the execute method throws an exception when the index is out of bounds","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" editExpenseCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" });","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_expenseEdited() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" fullCommand \u003d \"edit expense 1 expense /cat food /type lunch /de chicken rice /date 01/10/2023 /amt 10.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" // Test if the execute method changes the expense and prints the changes","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e editExpenseCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" // Verify if the expense was updated correctly","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" Expense updatedExpense \u003d expenses.get(0);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" assertEquals(\"Food Expense (LUNCH): chicken rice | Date: 01/Oct/2023 | Amount: $10.00\",","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" updatedExpense.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidExpense_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" // Test if execute method throws a KaChinnnngException for an invalid command","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit expense 1 invalid expense command\";","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e editExpenseCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":54,"Hongzhii":4}},{"path":"src/test/java/seedu/duke/commands/EditIncomeCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class EditIncomeCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private EditIncomeCommand editIncomeCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" private String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" public void setUp() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" // Initialize the incomes and fullCommand for testing","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" incomes.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" incomes.add(new Income(\"Bonus\", LocalDate.of(2023, 10, 15), 1000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 3 income /de salary for October /date 01/10/2023 /amt 5000.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" // This test checks if the execute method throws an exception when the index is out of bounds","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" });","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_incomeEdited() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 1 income /de salary for October /date 01/10/2023 /amt 5000.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" // Test if the execute method changes the income and prints the changes","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e editIncomeCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" // Verify if the income was updated correctly","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" Income updatedincome \u003d incomes.get(0);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" assertEquals(\"Income: salary for October | Date: 01/Oct/2023 | Amount: $5000.00\",","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" updatedincome.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIncome_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" // Test if execute method throws a KaChinnnngException for an invalid command","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 1 invalid income command\";","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e editIncomeCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":59}},{"path":"src/test/java/seedu/duke/financialrecords/ExpenseTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Test suite for the {@link Expense} class.","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This class contains unit tests to validate the behavior of the Expense class and ensure","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" * correctness in the representation and management of financial expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class ExpenseTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private Expense expense;","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Initializes common test fixtures before each test execution.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" void setUp() {","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" expense \u003d new Expense(\"Lunch\", LocalDate.now().minusDays(1), 20.00);","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" fail(\"Setup failed due to exception: \" + e.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the description of an Expense object is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" void testExpenseDescription_notEmpty(){","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"\", LocalDate.now(), 20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the amount of an Expense object is negative.","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" void testExpenseAmount_notNegative(){","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"Lunch\", LocalDate.now(), -20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the date of an Expense object is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" void testExpenseDate_notFuture(){","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"Lunch\", LocalDate.now().plusDays(1), 20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * Tests if the correct description of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" void getDescription() {","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Lunch\", expense.getDescription());","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" * Tests if the correct date of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" void getDate() {","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.now().minusDays(1), expense.getDate());","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * Tests if the correct amount of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" void getAmount() {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" assertEquals(20.00, expense.getAmount());","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" * Tests if the correct date string of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" void getDateString() {","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\")),","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" expense.getDateString());","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" * Tests the string representation of the Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" void testToString() {","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Expense: Lunch | Date: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\")) +","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" \" | Amount: $20.00\",","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" expense.toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":101}},{"path":"src/test/java/seedu/duke/financialrecords/IncomeTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertNotNull;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"public class IncomeTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" public void testIncomeCreation() throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" assertNotNull(income);","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Salary\", income.getDescription());","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), income.getDate());","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.00, income.getAmount());","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" public void testToString() throws KaChinnnngException{","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" String expected \u003d \"Income: Salary | Date: 12/Oct/2023 | Amount: $5000.00\";","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" assertEquals(expected, income.toString());","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" public void testInvalidDescription() {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" new Income(\"\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" public void testInvalidAmount() {","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" new Income(\"Salary\", LocalDate.of(2023, 10, 12), -5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":42}},{"path":"src/test/java/seedu/duke/parser/ExpenseParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"public class ExpenseParserTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if the date is parsed correctly.","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" void parseDate_validDate_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" LocalDate expectedDate \u003d LocalDate.of(2020, 02, 29);","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" LocalDate actualDate \u003d ExpenseParser.parseDate(\"29/02/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedDate, actualDate);","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid day.","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" void parseDate_invalidDay_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"32/02/2020\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid year.","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" void parseDate_invalidDate_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"10/10/20202\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse a date that is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" void parseDate_futureDate_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"10/10/3021\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * It verifies if the food category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" void testParseExpense_foodCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"lunch\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Food);","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" * It verifies if the transport category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" void testParseExpense_transportCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"transport\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"bus\");","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"from nus to changi\");","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"1.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Transport);","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * It verifies if the utilities category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" void testParseExpense_utilitiesCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"utilities\");","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"electricity\");","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"air con bill\");","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"50.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Utilities);","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for an unrecognized category.","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" void testParseExpense_invalidCategory_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"invalid\");","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing amount fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingAmountField_success() {","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing description fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingDescriptionFields_success(){","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing date fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingDateField_success(){","lastModifiedDate":"2023-10-18"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":168,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":169,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":170,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":171,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":172,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":173,"author":{"gitId":"bljhty"},"content":" * Tests if the getIndex method in ExpenseParser throws an exception for a valid index format.","lastModifiedDate":"2023-10-18"},{"lineNumber":174,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" void testGetIndexValid() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.INDEX_FIELD, \"1\");","lastModifiedDate":"2023-10-18"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" assertEquals(1, ExpenseParser.getIndex(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":182,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":183,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" * Tests if the getIndex method in ExpenseParser throws an exception for an invalid index format.","lastModifiedDate":"2023-10-18"},{"lineNumber":185,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" void testGetIndexInvalid() {","lastModifiedDate":"2023-10-18"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.INDEX_FIELD, \"a\");","lastModifiedDate":"2023-10-18"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":191,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.getIndex(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":193,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":195,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the provided amount exceeds the limit.","lastModifiedDate":"2023-10-18"},{"lineNumber":196,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":197,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":198,"author":{"gitId":"bljhty"},"content":" void testParseAmount_aboveLimit_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":199,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":200,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":201,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":202,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":203,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"1000000.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":206,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the category field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":211,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":212,"author":{"gitId":"bljhty"},"content":" void testParseCategory_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":213,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":214,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":215,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":216,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the description field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"bljhty"},"content":" void testParseDescription_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the date field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"bljhty"},"content":" void testParseDate_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":249,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":250,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":251,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the amount field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":252,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":253,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":254,"author":{"gitId":"bljhty"},"content":" void testParseAmount_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":255,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":256,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":258,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":259,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":260,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":261,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":262,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":263,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":258,"Hongzhii":5}},{"path":"src/test/java/seedu/duke/parser/IncomeParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * JUnit test class for IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"public class IncomeParserTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * This method tests the parseIncome method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" * It verifies if the incomeFields are correctly parsed into an Income object.","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" public void testParseIncome() throws KaChinnnngException {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"5000.00\");","lastModifiedDate":"2023-10-13"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" Income income \u003d IncomeParser.parseIncome(incomeFields);","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Salary\", income.getDescription());","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), income.getDate());","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.00, income.getAmount());","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if the date is parsed correctly.","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" public void testParseDate_validDate() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" LocalDate result \u003d IncomeParser.parseDate(\"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), result);","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid date.","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * @see KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void testParseDate_invalidDate() {","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"12/13/2023\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse a date that is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" public void testParseDate_futureDate() {","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"12/10/2025\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid day.","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" void testParseDate_invalidDay(){","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"32/10/2023\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" * This method tests the getIndex method in IncomeParser when trying to get index from an empty input.","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" public void testGetIndex_missingField() {","lastModifiedDate":"2023-10-13"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs amount that is above the limit.","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" void testParseAmount_aboveLimit_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"1000000000.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for description.","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" void testParseDescription_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"10.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for date.","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" void testParseDate_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"10.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for amount.","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" void testParseAmount_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an invalid index.","lastModifiedDate":"2023-10-18"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" * Specifically negative index","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" void testGetIndex_negativeIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" inputMap.put(IncomeParser.INDEX_FIELD, \"-1\");","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an invalid index.","lastModifiedDate":"2023-10-18"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" * Specifically zero index","lastModifiedDate":"2023-10-18"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" void testGetIndex_zeroIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" inputMap.put(IncomeParser.INDEX_FIELD, \"0\");","lastModifiedDate":"2023-10-18"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"bljhty":167}}] +[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" implementation group: \u0027com.google.code.gson\u0027, name: \u0027gson\u0027, version: \u00272.10.1\u0027","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"run {","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":5,"-":46}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"--------|:-----------------:|:----------------------------------------:|:---------:","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Cheung Ka Yuen | [Github](https://github.com/KenCheung18) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Lee Jun Hao Bryan | [Github](https://github.com/bljhty) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Lim Yuh Ching | [Github](https://github.com/limyuhching) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"limyuhching":1,"bljhty":2,"KenCheung18":1,"-":5}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"## Design \u0026 implementation","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"### IncomeManager","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"the IncomeManager is facilitated by `IncomeParser`, `IncomeManager`, `IncomeList` and `Ui`.","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"1. The user inputs the command to add income. This input is then passed to `IncomeParser` to be parsed.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"2. `IncomeParser` then parses the input and returns a `Income` object.","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"3. `IncomeManager` then adds the `Income` object to the `IncomeList`.","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"4. `IncomeManager` then returns a `String` to `Ui` to be printed out to the user.","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"![incomeManager_sequence_diagram.png](..%2Fimages%2FincomeManager_sequence_diagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":"### ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":"The ExpenseManager is facilitated by `ExpenseParser`, `ExpenseManager`, `ExpenseList` and `Ui`","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":"1. The user inputs the command to add expense.","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":"2. This command is used to instantiate a ExpenseManager object which is executed.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":"3. During execution, the command is passed to ExpenseParser which extracts and parses the input fields.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"4. Input field information is passed to the relevant Expense constructor which returns a Expense object.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"5. Expense object is returned to ExpenseManager from ExpenseParser.","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":"6. Expense obejct is returned to Duke from ExpenseManager.","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":"![expenseManager_sequence_diagram.png](/Users/apple/Desktop/expenseManager_sequence_diagram.png)","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"### Find Command","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"The FindCommand is facilitated by `FindCommand`, `FindParser`, `Ui`,`ExpenseList` and `IncomeList`.","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"1. The user will first input the command to find the expense or income.","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":"find /t \u003ctype\u003e /cat [category] /de [description] /date [date]","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"2. The inputs will then be passed to `FindParser` to get the necessary fields such as type, category, description and date.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"3. The FindCommand is then instantiated with the necessary fields.","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"4. Users can choose to search through the expense list or income list.","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"5. If users searches through the income list, either the description or date will be used to search through the income list.","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":"6. If users searches through the expense list, either the category or date will be used to search through the expense list.","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"7. The execute method will then be called to search through the list and return the list of expenses or incomes that matches the search criteria.","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"![FindCommand_SequenceDiagram.png](..%2Fimages%2FFindCommand_SequenceDiagram.png)","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":"### GetFromTxt Command","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":"The GetFromTxt Command is facilitated by `IOException`,`Scanner`, `KaChinnnnngException`, `IncomeList` and `ExpenseList`","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":"1. The user start the program and the command will start automatically with a default path","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":"2. Once the command executed, it will try to create an txt file on the default path","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":"3. If file failed to create, throw an `IOException`","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":"4. Catch the `IOExceotion` and print error messages","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":"5. Create a `Scanner` Object s to get content from txt file","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":"6. If amount in txt file exceed limit or incorrect, throw `KaChinnnningException`","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":"7. Read the content on the file and add corresponding object to incomes or expenses list","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":"![FindCommand_SequenceDiagram.png](..%2Fimages%2FGetFromTxt.png)","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":"{Describe the target user profile}","lastModifiedDate":"2020-05-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":71,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"|---------|----------|------------------------------------|--------------------------------------------------------|","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"-"},"content":"| v1.0 |new user| see usage instructions | refer to them when I forget how to use the application |","lastModifiedDate":"2020-05-24"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| add new income entry | track all my incomes |","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| add new expense entry | track all of my expenses |","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| delete income entry | remove incomes that I no longer want to track |","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| delete expense entry | remove expenses that I no longer want to track |","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| list both income and expense entry | view all my expenses and incomes |","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"| v1.0 |user| check my balace | better bugdet my expenditures |","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":84,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":86,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":88,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":90,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":92,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":32,"Hongzhii":13,"KenCheung18":12,"-":37}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"# Hi","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"-"},"content":"{Give product intro here}","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":1,"-":7}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"# KaChinnnng User Guide","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"welcome to KaChinnnng a personal finance tracker that helps you keep track of your expenses and income.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"2. Download the latest version of `KaChinnnng` from [here](http://link.to/duke).","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"3. Copy the downloaded file to the folder you want to use as the home folder for your KaChinnnng.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"4. open a command terminal and navigate to the folder where you have copied the file to.","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"5. type in the following to run the program","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"java -jar KaChinnnng.jar","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"6. if successful you should see the following output","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":"Welcome to KaChinnnngggg! How may i assist you today?","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"7. type in desired commands and press enter to execute them. (note: commands are not case sensitive)","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"## Features ","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"{Give detailed description of each feature}","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"### View help : help","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"Shows basic commands executable by the program.","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"help","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"### Add an entry: add","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"Creates a new entry for income or expenses in the program.","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":"Values of income and expense added has to be lower than 1000000.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"Income and Expense values takes up to 2 decimal places.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"To add an income:","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"add income /description \u003cdescription\u003e /date \u003cdate\u003e /amount \u003camount\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"To add an expense:","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"add expense /catergory \u003ccatergory\u003e /description \u003cdescription\u003e /date \u003cdate\u003e /amount \u003camount\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":"Use case:","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"- Prompts users if any of the fields are empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":"- There are only 3 categories for expenses: `Food`, `Transport`, `Utilities`.","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"- Amount is takes up to 2 decimal places.","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":"- by default, amount is set to SGD.","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"- format of date is `dd/mm/yyyy`.","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"- Date needs to be an existing date, and cannot be dates in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"add income /description salary /date 01/01/2020 /amount 1000","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":"add expense /category Food /description lunch /date 01/01/2020 /amount 10.50","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":"### List all entries: list","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":"Shows a full list of both the expenses and income created by the user.","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":"User can choose to view the list of income/expenses separately as well.","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"list","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"list income","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":"list expense","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":"### Delete an entry: delete","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":"Deletes an entry from the list of income/expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":"Format:","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":"delete expense \u003cindex\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":"delete income \u003cindex\u003e","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":"```","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":96,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer? ","lastModifiedDate":"2020-05-24"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":98,"author":{"gitId":"-"},"content":"**A**: {your answer here}","lastModifiedDate":"2020-05-24"},{"lineNumber":99,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":100,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":"{Give a \u0027cheat sheet\u0027 of commands here}","lastModifiedDate":"2020-05-24"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":"* Add todo `todo n/TODO_NAME d/DEADLINE`","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bljhty":78,"-":26}},{"path":"images/expenseManager_sequence_diagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"actor Duke","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"participant ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"participant ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"participant Expense","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"Duke -\u003e ExpenseManager: provides expense details","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"ExpenseManager -\u003e ExpenseParser: extractExpenseFields(details)","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser -\u003e ExpenseParser: parseDate(expenseDateString)","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"activate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseParser: validates date format","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser -\u003e ExpenseParser: parseExpense(argumentsByField)","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseParser: validates fields","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e Expense: calls Expense constructor","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"Expense --\u003e ExpenseParser: new Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"ExpenseParser --\u003e ExpenseManager: returns Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":"ExpenseManager --\u003e Duke: returns new Expense object","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseParser","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":"deactivate ExpenseManager","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"Hongzhii":23}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.Balance;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearAll;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearExpenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ClearIncomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.DeleteExpenseCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.DeleteIncomeCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.ExpenseLister;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.ExpenseManager;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.FindCommand;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.EditExpenseCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.EditIncomeCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.IncomeLister;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.IncomeManager;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.ListCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.commands.UsageInstructions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.storage.GetFromTxt;","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.storage.SaveToTxt;","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.Parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.FindParser;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" * This class is the main class of the program.","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" * It contains the main method that runs the program.","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" private Ui ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" private String storagePath;","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" private SaveToTxt save;","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" private GetFromTxt get;","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" public Duke() {","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" storagePath \u003d \"KaChinnnngggg.txt\";","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" save \u003d new SaveToTxt(storagePath);","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" get \u003d new GetFromTxt(storagePath);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" * This method runs the program.","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void run() {","lastModifiedDate":"2023-10-09"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" Ui.printWelcomeMessage();","lastModifiedDate":"2023-10-09"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" get.getFromTextFile(incomes, expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" } catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"\\tOOPS!!! File not found.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-11"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" String fullCommand \u003d ui.readCommand();","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" String command \u003d Parser.parse(fullCommand);","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" String[] parts \u003d command.split(\"-\", 2);","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" switch (parts[0]) {","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" case \"exit\":","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" isExit \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-11"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" case \"add_income\":","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" try{","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" IncomeManager incomeCommand \u003d new IncomeManager(fullCommand);","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" incomeCommand.execute();","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" Income newIncome \u003d incomeCommand.getNewIncome();","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" incomes.add(newIncome);","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" ui.printIncomeAddedMessage(newIncome);","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-12"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" case \"list_income\":","lastModifiedDate":"2023-10-12"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" new IncomeLister(incomes, ui).listIncomes();","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"Hongzhii"},"content":" case \"add_expense\":","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"Hongzhii"},"content":" try{","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"Hongzhii"},"content":" ExpenseManager expenseCommand \u003d new ExpenseManager(fullCommand);","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"Hongzhii"},"content":" expenseCommand.execute();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"Hongzhii"},"content":" Expense newExpense \u003d expenseCommand.getNewExpense();","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"Hongzhii"},"content":" expenses.add(newExpense);","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"Hongzhii"},"content":" ui.printExpenseAddedMessage(newExpense);","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"Hongzhii"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"Hongzhii"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"Hongzhii"},"content":" break;","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" case \"list_expense\":","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"Hongzhii"},"content":" new ExpenseLister(expenses, ui).listExpenses();","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"limyuhching"},"content":" case \"list\":","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"limyuhching"},"content":" new ListCommand(incomes, expenses, ui).execute();","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"limyuhching"},"content":" case \"delete_income\":","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":116,"author":{"gitId":"limyuhching"},"content":" new DeleteIncomeCommand().execute(incomes, fullCommand, ui);","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"limyuhching"},"content":" case \"delete_expense\":","lastModifiedDate":"2023-10-17"},{"lineNumber":121,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"limyuhching"},"content":" new DeleteExpenseCommand().execute(expenses, fullCommand, ui);","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":124,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":126,"author":{"gitId":"KenCheung18"},"content":" case \"help\":","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"KenCheung18"},"content":" new UsageInstructions(ui).getHelp();","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"KenCheung18"},"content":" case \"balance\":","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"KenCheung18"},"content":" new Balance(incomes, expenses).getBalanceMessage();","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" case \"find\":","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" String[] parsedParameters \u003d FindParser.parseFindCommand(fullCommand);","lastModifiedDate":"2023-10-23"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(","lastModifiedDate":"2023-10-23"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" incomes, expenses,","lastModifiedDate":"2023-10-23"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" parsedParameters[0], parsedParameters[1],","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" parsedParameters[2], parsedParameters[3], ui);","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"KenCheung18"},"content":" case \"clear_incomes\":","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"KenCheung18"},"content":" new ClearIncomes(incomes).clearAllIncomes();","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"KenCheung18"},"content":" case \"clear_expenses\":","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"KenCheung18"},"content":" new ClearExpenses(expenses).clearAllIncomes();","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"KenCheung18"},"content":" case \"clear_all\":","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"KenCheung18"},"content":" new ClearAll(incomes, expenses).clearAllIncomeAndExpense();","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"KenCheung18"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"limyuhching"},"content":" case \"edit_income\":","lastModifiedDate":"2023-10-26"},{"lineNumber":165,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":166,"author":{"gitId":"limyuhching"},"content":" new EditIncomeCommand(incomes, fullCommand).execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":167,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":169,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":170,"author":{"gitId":"limyuhching"},"content":" case \"edit_expense\":","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"limyuhching"},"content":" new EditExpenseCommand(expenses, fullCommand).execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"limyuhching"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":" default:","lastModifiedDate":"2023-10-11"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Invalid command. Please try again.\");","lastModifiedDate":"2023-10-11"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-11"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-11"},{"lineNumber":182,"author":{"gitId":"limyuhching"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":183,"author":{"gitId":"limyuhching"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":185,"author":{"gitId":"KenCheung18"},"content":" save.saveIncomeAndExpense(incomes,expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" ui.printGoodbyeMessage();","lastModifiedDate":"2023-10-11"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":191,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-09"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" new Duke().run();","lastModifiedDate":"2023-10-11"},{"lineNumber":193,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":195,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"limyuhching":37,"bljhty":89,"Hongzhii":14,"KenCheung18":46,"-":9}},{"path":"src/main/java/seedu/duke/commands/Balance.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" * The `Balance` class represents a financial balance calculator","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" * that calculates the balance between income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" * It takes a list of income and expense records as input and provides methods to calculate and display the balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"public class Balance {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" public Balance(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" * Calculates the financial balance by subtracting the total expenses from the total income.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * @return The calculated financial balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" public double getBalance() {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" double totalIncome \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" double totalExpense \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":" for (Income income : incomes) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" totalIncome +\u003d income.getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":" for (Expense expense : expenses) {","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" totalExpense +\u003d expense.getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":" return totalIncome - totalExpense;","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" * Prints a message to the console displaying the calculated financial balance.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":" public void getBalanceMessage() {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"Balance: \" + getBalance());","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"KenCheung18":45}},{"path":"src/main/java/seedu/duke/commands/ClearAll.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" * The ClearAll class is responsible for clearing both the list of incomes and expenses.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" * It provides a method to clear all incomes and expenses from the corresponding list.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"public class ClearAll {","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" * Constructs a ClearAll object with the given lists of incomes and expenses.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The list of incomes to be cleared.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The list of expenses to be cleared.","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" public ClearAll(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" * Clears all incomes and expenses from their respective lists and prints a message to confirm the action.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomeAndExpense() {","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" incomes.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" expenses.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"Both income and expense lists cleared\");","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":35}},{"path":"src/main/java/seedu/duke/commands/ClearExpenses.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":" * The ClearExpenses class is responsible for clearing the list of expenses.","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" * It provides a method to clear all expenses from the list.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"public class ClearExpenses {","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" * Constructs a ClearExpenses object with the given list of expenses.","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The list of expenses to be cleared.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" public ClearExpenses(ArrayList\u003cExpense\u003e expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" * Clears all expenses from the list and prints a message to confirm the action.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomes(){","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" expenses.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"You have cleared the expense list\");","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":30}},{"path":"src/main/java/seedu/duke/commands/ClearIncomes.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":" * The ClearIncomes class is responsible for clearing the list of incomes.","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" * It provides a method to clear all incomes from the list.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"public class ClearIncomes {","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" * Constructs a ClearIncomes object with the given list of incomes.","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The list of incomes to be cleared.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" public ClearIncomes(ArrayList\u003cIncome\u003e incomes) {","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" * Clears all incomes from the list and prints a message to confirm the action.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" public void clearAllIncomes() {","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" incomes.clear();","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"You have cleared the income list\");","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"KenCheung18":32}},{"path":"src/main/java/seedu/duke/commands/Commands.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":" * Represents the abstract class for all commands.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific command classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"public abstract class Commands {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"limyuhching":1,"bljhty":17}},{"path":"src/main/java/seedu/duke/commands/DeleteExpenseCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" * The `DeleteExpenseCommand` class represents a command to delete an expense record from a list of expenses.","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" * It extends the `Commands` class and is used to manage expense records in the application.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"public class DeleteExpenseCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * Constructs a `DeleteExpenseCommand` object. This class does not have any specific constructor logic.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" public DeleteExpenseCommand() {","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" * Executes the `DeleteExpenseCommand` to remove an expense record from the list of expenses.","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" * @param expenses The list of expense records to be modified.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * @param fullcommand The full command entered by the user, including the index of the expense to be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages.","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is a problem with the command execution, such as missing arguments,","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * an invalid index, or a non-existent expense record.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" public void execute(ArrayList\u003cExpense\u003e expenses, String fullcommand, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" int index \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullcommand.split(\" \", 3);","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" index \u003d Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" Expense removedExpense \u003d expenses.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" expenses.remove(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. This expense record has been deleted:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" System.out.println(removedExpense);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Expense \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":45}},{"path":"src/main/java/seedu/duke/commands/DeleteIncomeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" * The DeleteIncomeCommand class is responsible for deleting an income record from the list of incomes.","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"public class DeleteIncomeCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" * Constructs a DeleteIncomeCommand object.","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" public DeleteIncomeCommand() {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" * Executes the DeleteIncomeCommand to remove an income record from the list of incomes.","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" * @param incomes The list of income records to be modified.","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" * @param fullcommand The full command entered by the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is a problem with the command execution, such as missing arguments,","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * invalid index, or a non-existent income record.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" public void execute(ArrayList\u003cIncome\u003e incomes, String fullcommand, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" int index \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullcommand.split(\" \", 3);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" index \u003d Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" Income removedIncome \u003d incomes.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" incomes.remove(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. This income record has been deleted:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" System.out.println(removedIncome);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Income \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":45}},{"path":"src/main/java/seedu/duke/commands/EditExpenseCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"public class EditExpenseCommand extends Commands {","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":" ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * Constructs an EditExpenseCommand with the specified expense records and full command.","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" * @param expenses The ArrayList of Expense objects containing expense records.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string entered by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in the command creation, such as missing arguments.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" public EditExpenseCommand(ArrayList\u003cExpense\u003e expenses, String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" this.fullCommand \u003d fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * Executes the edit expense command. It parses the user input, retrieves the new expense information,","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * updates the expense record, and prints the changes.","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in executing the command, such as missing arguments,","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * incorrect index, or if the specified expense record does not exist.","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" assert expenses !\u003d null : \"Incomes ArrayList must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" assert fullCommand !\u003d null : \"Full command string must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" index \u003d getIndex(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" ExpenseManager expenseCommand \u003d new ExpenseManager(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" expenseCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" Expense newExpense \u003d expenseCommand.getNewExpense();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" Expense removedExpense \u003d expenses.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" expenses.set(index, newExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. The expense record you\u0027ve specified has been changed:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Before: \" + removedExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"After: \" + newExpense);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Expense \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" * Extracts and returns the index from the full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" * @return The index of the income record to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in extracting the index, such as missing arguments","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" * or if the index is not a valid integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" private int getIndex(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullCommand.split(\" \", 4);","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" assert tokens.length \u003e\u003d 4 : \"Command must have at least 4 tokens\";","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" return Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":71}},{"path":"src/main/java/seedu/duke/commands/EditIncomeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"public class EditIncomeCommand extends Commands {","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" int index;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" * Constructs an EditIncomeCommand with the specified income records and full command.","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" * @param incomes The ArrayList of Income objects containing income records.","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string entered by the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" public EditIncomeCommand(ArrayList\u003cIncome\u003e incomes, String fullCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" this.fullCommand \u003d fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * Executes the edit income command. It parses the user input, retrieves the new income information,","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" * updates the income record, and prints the changes.","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in executing the command, such as missing arguments,","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" * incorrect index, or if the specified income record does not exist.","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" assert incomes !\u003d null : \"Incomes ArrayList must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" assert fullCommand !\u003d null : \"Full command string must not be null\";","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" index \u003d getIndex(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" IncomeManager incomeCommand \u003d new IncomeManager(fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" incomeCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" Income newIncome \u003d incomeCommand.getNewIncome();","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" Income removedIncome \u003d incomes.get(index);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" incomes.set(index, newIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Noted. The income record you\u0027ve specified has been changed:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Before: \" + removedIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"After: \" + newIncome);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! Income \" + (index+1) + \" does not exist\");","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" * Extracts and returns the index from the full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" * @param fullCommand The full command string.","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" * @return The index of the income record to be edited.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" * @throws KaChinnnngException If there is an error in extracting the index, such as missing arguments","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" * or if the index is not a valid integer.","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" private int getIndex(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" String[] tokens \u003d fullCommand.split(\" \", 4);","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" assert tokens.length \u003e\u003d 4 : \"Command must have at least 4 tokens\";","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" return Integer.parseInt(tokens[2])-1;","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"You\u0027re missing an argument\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" } catch (NullPointerException | NumberFormatException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" throw new KaChinnnngException(\"Oops! An integer index is expected\");","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":72}},{"path":"src/main/java/seedu/duke/commands/ExpenseLister.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Represents the command that when executed, lists all expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * This class is a child class of the Command class.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseLister extends Commands {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * Constructor for ExpenseLister.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param expenses","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param ui","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" public ExpenseLister(ArrayList\u003cExpense\u003e expenses, Ui ui) {","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" public void execute() {","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" listExpenses();","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" * This method lists all incomes.","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" public void listExpenses() {","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" if (expenses.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"You have no recorded expenses.\");","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" for (int i \u003d 0; i \u003c expenses.size(); i++) {","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":" System.out.println((i + 1) + \". \" + expenses.get(i).toString());","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":53}},{"path":"src/main/java/seedu/duke/commands/ExpenseManager.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.parser.ExpenseParser;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * This is the class that manages the creation of new expense","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseManager extends Commands{","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private final String details;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":" private Expense newExpense;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" public ExpenseManager(String details) {","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" this.details \u003d details;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * This method is used to execute the command","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d extractExpenseFields(details);","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" newExpense \u003d ExpenseParser.parseExpense(expenseFields);","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * This method returns new expense created","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" public Expense getNewExpense() {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" return newExpense;","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" * This method extracts the fields of the expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" * @param details String containing the details of the expense","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" * @return expenseFields HashMap containing the fields of the income","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" private HashMap\u003cString, String\u003e extractExpenseFields(String details) throws KaChinnnngException{","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" HashMap\u003cString,String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":" String[] parts \u003d details.split(\"/cat | /type | /de | /date | /amt \");","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" if(parts.length !\u003d 6) {","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, parts[1].trim());","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, parts[2].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, parts[3].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, parts[4].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, parts[5].trim());","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"Hongzhii"},"content":" return expenseFields;","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":62}},{"path":"src/main/java/seedu/duke/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.time.YearMonth;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.Arrays;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.List;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Represents a command to find and display financial records (either incomes or expenses) based on specific criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * The criteria include type (income/expense), category, description, and date.","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This command supports searching by a specific date or by a month. If a date isn\u0027t provided, it will not be used","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" * as a filter. Similarly, if the category or description isn\u0027t provided, they won\u0027t be used as filters.","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"public class FindCommand extends Commands {","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" private static final List\u003cString\u003e VALID_EXPENSE_CAT \u003d Arrays.asList(\"food\", \"transport\", \"utilities\");","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" private final String type;","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" private final String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" private final String description;","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" private final LocalDate date;","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" private boolean isSearchByMonth \u003d false;","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" if(!dir.mkdirs()) {","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/FindCommand.log\", true);","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" * Constructs a new FindCommand with the given criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" * @param incomes The list of incomes to search from.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * @param expenses The list of expenses to search from.","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" * @param type The type of financial record to search for (either \"income\" or \"expense\").","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" * @param category The category to filter the results by.","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" * @param description The description to filter the results by.","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" * @param dateString The date (or month) to filter the results by. Expected format: dd/MMM/yyyy.","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" * @param ui The UI component to display results.","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If an invalid type is provided or if there\u0027s an error parsing the date.","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" public FindCommand(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses, String type,","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" String category, String description, String dateString, Ui ui) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" if (type \u003d\u003d null || !type.equalsIgnoreCase(\"income\") \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" !type.equalsIgnoreCase(\"expense\")) {","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Invalid type. Please use \u0027income\u0027 or \u0027expense\u0027.\");","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" if (\"expense\".equalsIgnoreCase(type) \u0026\u0026 category !\u003d null \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" !VALID_EXPENSE_CAT.contains(category.toLowerCase())) {","lastModifiedDate":"2023-10-29"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Invalid expense category provided! Allowed categories are: \"","lastModifiedDate":"2023-10-29"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" + VALID_EXPENSE_CAT);","lastModifiedDate":"2023-10-29"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" this.type \u003d type;","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" this.date \u003d parseDate(dateString); // Convert date string to LocalDate","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, String.format(\"FindCommand initialised with type: %s\", type));","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" * Executes the find command. Searches through the provided list of incomes or expenses and displays","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" * matching results based on the given criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If there\u0027s an error during execution, such as an invalid type.","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-24"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" LOGGER.info(\"Executing FindCommand\");","lastModifiedDate":"2023-10-24"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" assert incomes !\u003d null : \"incomes should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" assert expenses !\u003d null : \"expenses should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cExpense\u003e matchingExpenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cIncome\u003e matchingIncomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" if (\"expense\".equalsIgnoreCase(type)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" for (Expense e : expenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" if (matchesCriteria(e)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" matchingExpenses.add(e);","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, String.format(\"Found %d matching expenses\", matchingExpenses.size()));","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" if (matchingExpenses.isEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" ui.printMessage(\"No matching expenses found.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" ui.showMatchingExpenses(matchingExpenses);","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" } else if (\"income\".equalsIgnoreCase(type)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" for (Income i : incomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" if (matchesCriteria(i)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" matchingIncomes.add(i);","lastModifiedDate":"2023-10-23"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO,String.format(\"Found %d matching incomes\", matchingIncomes.size()));","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" if (matchingIncomes.isEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" Ui.showLineDivider();","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" ui.printMessage(\"No matching incomes found.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" ui.showMatchingIncomes(matchingIncomes);","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid type: \" + type);","lastModifiedDate":"2023-10-24"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" * Determines if a given date matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" * @param dateToCheck The date to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":" * @return True if the date matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" private boolean matchesDate(LocalDate dateToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":" if (this.date !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":" if (isSearchByMonth) {","lastModifiedDate":"2023-10-23"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" return dateToCheck.getMonthValue() \u003d\u003d this.date.getMonthValue()","lastModifiedDate":"2023-10-29"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" \u0026\u0026 dateToCheck.getYear() \u003d\u003d this.date.getYear();","lastModifiedDate":"2023-10-29"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" return dateToCheck.isEqual(this.date);","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-24"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" return true; // If this.date is null, then any date matches the criteria","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":" * Determines if a given category matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":169,"author":{"gitId":"bljhty"},"content":" * @param categoryToCheck The category to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":170,"author":{"gitId":"bljhty"},"content":" * @return True if the category matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"bljhty"},"content":" private boolean matchesCategory(String categoryToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":173,"author":{"gitId":"bljhty"},"content":" return this.category \u003d\u003d null || (categoryToCheck !\u003d null \u0026\u0026 categoryToCheck.equalsIgnoreCase(this.category));","lastModifiedDate":"2023-10-24"},{"lineNumber":174,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" * Determines if a given description matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" * The description matches if it contains all the keywords specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":" * If no description is specified in the command, then any description matches the criteria.","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" * @param descriptionToCheck The description to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":182,"author":{"gitId":"bljhty"},"content":" * @return True if the description matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" private boolean matchesDescription(String descriptionToCheck) {","lastModifiedDate":"2023-10-24"},{"lineNumber":185,"author":{"gitId":"bljhty"},"content":" if (this.description !\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" String[] keywords \u003d this.description.split(\"\\\\s+\");","lastModifiedDate":"2023-10-23"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" for (String keyword : keywords) {","lastModifiedDate":"2023-10-23"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" if (!descriptionToCheck.toLowerCase().contains(keyword.toLowerCase())) {","lastModifiedDate":"2023-10-24"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":" return false;","lastModifiedDate":"2023-10-24"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":191,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":193,"author":{"gitId":"bljhty"},"content":" return true;","lastModifiedDate":"2023-10-23"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":195,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":196,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"bljhty"},"content":" * Determines if a given expense matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"bljhty"},"content":" * @param e The expense to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"bljhty"},"content":" * @return True if the expense matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"bljhty"},"content":" private boolean matchesCriteria(Expense e) {","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"bljhty"},"content":" return matchesDate(e.getDate()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":204,"author":{"gitId":"bljhty"},"content":" matchesCategory(e.getCategory()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":205,"author":{"gitId":"bljhty"},"content":" matchesDescription(e.getDescription()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":206,"author":{"gitId":"bljhty"},"content":" e.getAmount() !\u003d 0;","lastModifiedDate":"2023-10-29"},{"lineNumber":207,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":208,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":209,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"bljhty"},"content":" * Determines if a given income matches the criteria specified in the command.","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"bljhty"},"content":" * @param i The income to be checked.","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"bljhty"},"content":" * @return True if the income matches the criteria, false otherwise.","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"bljhty"},"content":" private boolean matchesCriteria(Income i) {","lastModifiedDate":"2023-10-24"},{"lineNumber":216,"author":{"gitId":"bljhty"},"content":" return matchesDate(i.getDate()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":217,"author":{"gitId":"bljhty"},"content":" matchesCategory(i.getCategory()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":218,"author":{"gitId":"bljhty"},"content":" matchesDescription(i.getDescription()) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":219,"author":{"gitId":"bljhty"},"content":" i.getAmount() !\u003d 0;","lastModifiedDate":"2023-10-29"},{"lineNumber":220,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":221,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":222,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":223,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"bljhty"},"content":" * Converts a date string into a LocalDate object. Supports full date strings and month names.","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"bljhty"},"content":" * @param dateString Date as a string in the format dd/MMM/yyyy or as a month name.","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"bljhty"},"content":" * @return LocalDate representation of the provided dateString.","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If the date string is in an invalid format.","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"bljhty"},"content":" private LocalDate parseDate(String dateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":231,"author":{"gitId":"bljhty"},"content":" if (dateString \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":232,"author":{"gitId":"bljhty"},"content":" return null;","lastModifiedDate":"2023-10-23"},{"lineNumber":233,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":234,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":235,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatterDayMMM \u003d DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");","lastModifiedDate":"2023-10-29"},{"lineNumber":236,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatterDayMM \u003d DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");","lastModifiedDate":"2023-10-29"},{"lineNumber":237,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatterMonthMM \u003d DateTimeFormatter.ofPattern(\"MM/yyyy\");","lastModifiedDate":"2023-10-29"},{"lineNumber":238,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatterMonthMMM \u003d DateTimeFormatter.ofPattern(\"MMM/yyyy\");","lastModifiedDate":"2023-10-29"},{"lineNumber":239,"author":{"gitId":"bljhty"},"content":" LocalDate parsedDate \u003d null;","lastModifiedDate":"2023-10-24"},{"lineNumber":240,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":241,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":242,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d LocalDate.parse(dateString, formatterDayMMM);","lastModifiedDate":"2023-10-29"},{"lineNumber":243,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e1) {","lastModifiedDate":"2023-10-29"},{"lineNumber":244,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":245,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d LocalDate.parse(dateString, formatterDayMM);","lastModifiedDate":"2023-10-29"},{"lineNumber":246,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e2) {","lastModifiedDate":"2023-10-29"},{"lineNumber":247,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":248,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d YearMonth.parse(dateString, formatterMonthMM).atDay(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":249,"author":{"gitId":"bljhty"},"content":" isSearchByMonth \u003d true;","lastModifiedDate":"2023-10-23"},{"lineNumber":250,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e3) {","lastModifiedDate":"2023-10-29"},{"lineNumber":251,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":252,"author":{"gitId":"bljhty"},"content":" parsedDate \u003d YearMonth.parse(dateString, formatterMonthMMM).atDay(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":253,"author":{"gitId":"bljhty"},"content":" isSearchByMonth \u003d true;","lastModifiedDate":"2023-10-29"},{"lineNumber":254,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e4) {","lastModifiedDate":"2023-10-29"},{"lineNumber":255,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Failed to parse date \" + dateString, e4);","lastModifiedDate":"2023-10-29"},{"lineNumber":256,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Invalid date format. \" +","lastModifiedDate":"2023-10-29"},{"lineNumber":257,"author":{"gitId":"bljhty"},"content":" \"Please use formats like 20/Oct/2023, 20/10/2023, 10/2023, or Oct/2023.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":258,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":259,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":260,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":261,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":262,"author":{"gitId":"bljhty"},"content":" return parsedDate;","lastModifiedDate":"2023-10-29"},{"lineNumber":263,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":264,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"bljhty":264}},{"path":"src/main/java/seedu/duke/commands/IncomeLister.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * Represents the command that when executed, lists all incomes.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * This class is a child class of the Command class.","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class IncomeLister extends Commands {","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeLister.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private final ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" private final Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" * Constructor for IncomeLister.","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * @param incomes ArrayList of incomes","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * @param ui Instance of Ui","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" public IncomeLister(ArrayList\u003cIncome\u003e incomes, Ui ui) {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" assert incomes !\u003d null : \"incomes should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" assert ui !\u003d null : \"ui should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Initialised IncomeLister\"));","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" public void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" listIncomes();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" * This method lists all incomes.","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" // Updated method name to follow Java naming conventions","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" public void listIncomes() {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" if (incomes.isEmpty()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" System.out.println(\"You have no recorded incomes.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" for (int i \u003d 0; i \u003c incomes.size(); i++) {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" System.out.println((i + 1) + \". \" + incomes.get(i).toString());","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Incomes listed successfully\"));","lastModifiedDate":"2023-10-19"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":64}},{"path":"src/main/java/seedu/duke/commands/IncomeManager.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.parser.IncomeParser;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Represents the class that manages the creation of a new income.","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific income creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class IncomeManager extends Commands{","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeManager.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" private final String details;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" private Income newIncome;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" static{","lastModifiedDate":"2023-10-19"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/IncomeManager.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" public IncomeManager(String details) {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" assert details !\u003d null : \"details should not be null\"; // Ensure that details is not null","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" this.details \u003d details;","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" * This method is used to execute the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" public void execute() throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d extractIncomeFields(details);","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" newIncome \u003d IncomeParser.parseIncome(incomeFields);","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, \"successful parsing of income\"); // logging successful parsing of income","lastModifiedDate":"2023-10-19"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" * This method returns the new income created.","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" * @return newIncome","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" public Income getNewIncome() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" return newIncome;","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" * This method extracts the fields of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" * @param details String containing the details of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" * @return incomeFields HashMap containing the fields of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" private HashMap\u003cString, String\u003e extractIncomeFields(String details) throws KaChinnnngException {","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" assert details !\u003d null : \"details should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" // Split the details string based on the field keywords","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" String[] parts \u003d details.split(\"/de|/date|/amt\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" // Check if all fields are present in the string","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" if (parts.length !\u003d 4) {","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Missing or out-of-order fields detected in income details: \" + details);","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Expected fields `/description`, `/date`, and \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" \"`/amount` are missing or improperly formatted.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" // Populate the HashMap with extracted fields","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, parts[1].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, parts[2].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, parts[3].trim());","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" return incomeFields;","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":97}},{"path":"src/main/java/seedu/duke/commands/KaChinnnngException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":" * Represents the exception thrown when there is an error in the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"public class KaChinnnngException extends Exception{","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" public KaChinnnngException(String message) {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":" super(message);","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":10}},{"path":"src/main/java/seedu/duke/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":" * The `ListCommand` class is responsible for displaying a list of income and expense records,","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":" * along with the total income, total expenses, and the total balance.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":" * It extends the `Commands` class and is used to provide a summary of financial records to the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class ListCommand extends Commands {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private double totalIncome;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private double totalExpenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" * Constructs a `ListCommand` object with the specified income and expense lists and a user interface.","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" * @param incomes The list of income records to be displayed.","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" * @param expenses The list of expense records to be displayed.","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" * @param ui The user interface for displaying messages and financial records.","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" public ListCommand(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses, Ui ui) {","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" this.incomes \u003d incomes;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" this.expenses \u003d expenses;","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" totalIncome \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" totalExpenses \u003d 0;","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" * Executes the `ListCommand` to display a summary of income and expense records,","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" * along with the total balance.","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" public void execute() {","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" if (incomes.isEmpty() \u0026\u0026 expenses.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You do not have any records.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" // Print incomes","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" if (incomes.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You have no recorded incomes.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" for (int i \u003d 0; i \u003c incomes.size(); i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" System.out.println((i + 1) + \". \" + incomes.get(i).toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" totalIncome +\u003d incomes.get(i).getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"Total income is: $%.2f.\\n\", totalIncome);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" System.out.println();","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" // Print expenses","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" if (expenses.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"You have no recorded expenses.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" for (int i \u003d 0; i \u003c expenses.size(); i++) {","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" System.out.println((i + 1) + \". \" + expenses.get(i).toString());","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" totalExpenses +\u003d expenses.get(i).getAmount();","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"Total expenses is: $%.2f.\\n\", totalExpenses);","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" System.out.printf(\"\\nTotal balance is: $%.2f.\\n\", totalIncome - totalExpenses);","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"limyuhching":73}},{"path":"src/main/java/seedu/duke/commands/UsageInstructions.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"public class UsageInstructions {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":" // Shows a message linking the user to the user guide of our app","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":" private final seedu.duke.ui.Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":" * The `UsageInstructions` class provides usage instructions for the application,","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":" * including command formats and a link to the user guide.","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" public UsageInstructions(Ui ui) {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" this.ui \u003d ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":" * Displays usage instructions for the application, including command formats and a link to the user guide.","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" public void getHelp(){","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" // Shows a message linking the user to the user guide of our app","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" System.out.println(\"You can access our user guide by \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" \"https://docs.google.com/document/d/1BOz_v4eYQ8y7Dje6Jm6nqymi9jmrsb9MAohLCL_sLvI/edit?usp\u003dsharing\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" // Displays the various commands that user can use including the respective formats of the commands","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Functions and their format:\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Adding an entry: add\\nFormat:\\n\" + \"Add expense /category /description /value\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" \"Add income /description /value\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Listing all entries: list\\nFormat:\\n\" + \"list\\n\" + \"list income\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" \"list expense\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Deleting an entry: delete\\nFormat:\\ndelete income [index_pos]\\n\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" \"delete expense [index_pos]\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Check balance of income: balance\\nFormat:\\n\" + \"balance\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Exiting the program: exit\\nFormat:\\n\" + \"exit\");","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" ui.showLineDivider();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bljhty":30,"KenCheung18":7}},{"path":"src/main/java/seedu/duke/financialrecords/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":" * Implementation of the Expense class","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":" * Basic expense class inherits from FinancialRecord and does not include any additional attributes","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Attribute \"amount\" contains a negative double which will make it easier to tally up the net total at the end","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"public class Expense extends FinancialRecord {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" protected String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" public Expense(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" public String getCategory() {","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" return \"Expense: \" + getDescription() +","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":7,"Hongzhii":20}},{"path":"src/main/java/seedu/duke/financialrecords/FinancialRecord.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * Represents the abstract class for all financial records.","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * This class serves as a blueprint for all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public abstract class FinancialRecord{","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FinancialRecord.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" ","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" protected String description;","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" protected LocalDate date;","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" protected double amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This method is used to create a new financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" public FinancialRecord(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" assert description !\u003d null : \"description should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" assert date !\u003d null : \"date should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" if (description.trim().isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Description is empty\");","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Description cannot be empty!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" if (amount \u003c 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Amount is negative\");","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Amount cannot be negative!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" if (date.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" LOGGER.warning(\"Date is in the future\");","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Date cannot be in the future!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-12"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-12"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public String getCategory() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" return \"\";","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" * This method is used to get the description of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" * @return String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" public String getDescription() {","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" return description;","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * This method is used to get the date of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" * @return LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" public LocalDate getDate() {","lastModifiedDate":"2023-10-12"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" return date;","lastModifiedDate":"2023-10-12"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" * This method is used to get the date of the financial record in a string format.","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" * @return String containing the date of the financial record in a string format","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" public String getDateString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");","lastModifiedDate":"2023-10-12"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" return date.format(formatter);","lastModifiedDate":"2023-10-12"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * This method is used to get the amount of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" * @return double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" public double getAmount() {","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" return amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" * This method is used to set the description of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" public void setDescription(String description) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" assert description !\u003d null : \"description should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" if (description.trim().isEmpty()) {","lastModifiedDate":"2023-10-12"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Description cannot be empty!\");","lastModifiedDate":"2023-10-12"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-12"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" * This method is used to set the date of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" public void setDate(LocalDate date) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" assert date !\u003d null : \"date should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-12"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" * This method is used to set the amount of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" public void setAmount(double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" assert amount \u003e\u003d 0 : \"amount should not be negative\";","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-12"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" return \"\";","lastModifiedDate":"2023-10-12"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":152}},{"path":"src/main/java/seedu/duke/financialrecords/Food.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Food class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents food expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Food extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private MealType mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Food class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param mealType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Food(String description, LocalDate date, double amount, MealType mealType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" this.category \u003d \"food\";","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.mealType \u003d mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" * Returns meal type","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" public MealType getMealType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" return mealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" return \"Food Expense (\" + getMealType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":1,"Hongzhii":45}},{"path":"src/main/java/seedu/duke/financialrecords/Income.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * Implementation of the Income class","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * Basic income class inherits from FinancialRecord and does not include any additional attributes","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class Income extends FinancialRecord {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" // Logger instance to log events and issues that occur during the execution of this class.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(Income.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/Income.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method is used to create a new financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record creation classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" * @param description String containing the description of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * @param date LocalDate containing the date of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" * @param amount double containing the amount of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" public Income(String description, LocalDate date, double amount) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-12"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO,(\"Income created with description: \" +","lastModifiedDate":"2023-10-19"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" description + \" date: \" + date + \" amount: \" + amount));","lastModifiedDate":"2023-10-19"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" * This method is used to get the category of the financial record.","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * This method is used by all specific financial record classes in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" * @return String containing the category of the financial record","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public String toString() {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" return \"Income: \" + getDescription() + ","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" \" | Date: \" + getDateString()+ \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":64}},{"path":"src/main/java/seedu/duke/financialrecords/Transport.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Transport class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents transportation expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Transport extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private TransportationType transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Transport class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param transportationType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Transport(String description, LocalDate date, double amount,","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" TransportationType transportationType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.transportationType \u003d transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" this.category \u003d \"Transport\";","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * Returns transportation type","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" public TransportationType getTransportationType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" return transportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" return \"Transportation Expense (\" + getTransportationType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":1,"Hongzhii":46}},{"path":"src/main/java/seedu/duke/financialrecords/Utilities.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":" * Utilities class that inherits from expense.","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":" * Represents utility expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"public class Utilities extends Expense {","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":" private UtilityType utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":" * Utilities class constructor","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":" * @param description","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":" * @param date","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" * @param amount","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" * @param utilityType","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" * @throws KaChinnnngException","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public Utilities(String description, LocalDate date, double amount,","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" UtilityType utilityType) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":" super(description, date, amount);","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" this.utilityType \u003d utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" this.category \u003d \"Utilities\";","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" * Returns utility type","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" public UtilityType getUtilityType() {","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" return utilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" * Returns a string that contains all the information on the expense record","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":" * @return","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" public String toString() {","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" return \"Utilities Expense(\" + getUtilityType() + \"): \" + getDescription() +","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" \" | Date: \" + getDateString() + \" | Amount: $\" + String.format(\"%.2f\", getAmount());","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":1,"Hongzhii":46}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/MealType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class to represent meal types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum MealType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, BREAKFAST, LUNCH, DINNER","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/TransportationType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class that represents all transportation types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum TransportationType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, TRAIN, BUS, TAXI, FUEL","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/financialrecords/expensetypes/UtilityType.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.financialrecords.expensetypes;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":" * Enum class that represents all utility types.","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"public enum UtilityType {","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":" UNDEFINED, WATER, ELECTRICITY, GAS","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"Hongzhii":8}},{"path":"src/main/java/seedu/duke/parser/ExpenseParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"Hongzhii"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"Hongzhii"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"Hongzhii"},"content":"import java.time.format.ResolverStyle;","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"Hongzhii"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":18,"author":{"gitId":"Hongzhii"},"content":"public class ExpenseParser {","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"Hongzhii"},"content":" public static final String CATEGORY_FIELD \u003d \"ca\";","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"Hongzhii"},"content":" public static final String TYPE_FIELD \u003d \"ty\";","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"Hongzhii"},"content":" public static final String DESCRIPTION_FIELD \u003d \"de\";","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"Hongzhii"},"content":" public static final String DATE_FIELD \u003d \"da\";","lastModifiedDate":"2023-10-15"},{"lineNumber":23,"author":{"gitId":"Hongzhii"},"content":" public static final String AMOUNT_FIELD \u003d \"am\";","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"Hongzhii"},"content":" public static final String INDEX_FIELD \u003d \"in\";","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"Hongzhii"},"content":" public static LocalDate parseDate(String expenseDateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"Hongzhii"},"content":" LocalDate expenseDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MM/uuuu\")","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"Hongzhii"},"content":" .withResolverStyle(ResolverStyle.STRICT);","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"Hongzhii"},"content":" expenseDate \u003d LocalDate.parse(expenseDateString, formatter);","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"Hongzhii"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid date in the format dd/MM/yyyydon\");","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"Hongzhii"},"content":" if (expenseDate.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a date that is not in the future\");","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"Hongzhii"},"content":" return expenseDate;","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":40,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":41,"author":{"gitId":"Hongzhii"},"content":" public static Expense parseExpense(HashMap\u003cString, String\u003e argumentsByField) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"Hongzhii"},"content":" if (!argumentsByField.containsKey(CATEGORY_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(TYPE_FIELD) ||","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(DESCRIPTION_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(DATE_FIELD) ||","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"Hongzhii"},"content":" !argumentsByField.containsKey(AMOUNT_FIELD)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"Hongzhii"},"content":" String expenseCategoryString \u003d argumentsByField.get(CATEGORY_FIELD).toLowerCase();","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"Hongzhii"},"content":" String expenseTypeString \u003d argumentsByField.get(TYPE_FIELD).toLowerCase();","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"Hongzhii"},"content":" String expenseDescriptionString \u003d argumentsByField.get(DESCRIPTION_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"Hongzhii"},"content":" String expenseDateString \u003d argumentsByField.get(DATE_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"Hongzhii"},"content":" String expenseAmountString \u003d argumentsByField.get(AMOUNT_FIELD);","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"Hongzhii"},"content":" LocalDate expenseDate \u003d parseDate(expenseDateString);","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"Hongzhii"},"content":" double expenseAmount;","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"Hongzhii"},"content":" expenseAmount \u003d Double.parseDouble(expenseAmountString);","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"Hongzhii"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a valid amount\");","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"Hongzhii"},"content":" if (expenseAmount \u003e 999999.99 || expenseAmount \u003c\u003d 0) {","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Expense amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"Hongzhii"},"content":" if (expenseCategoryString.equals(\"food\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"breakfast\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.BREAKFAST);","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"lunch\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.LUNCH);","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"dinner\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.DINNER);","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"Hongzhii"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"Hongzhii"},"content":" return new Food(expenseDescriptionString, expenseDate, expenseAmount, MealType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseCategoryString.equals(\"transport\")){","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"train\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"Hongzhii"},"content":" TransportationType.TRAIN);","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"bus\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"Hongzhii"},"content":" TransportationType.BUS);","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"taxi\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"Hongzhii"},"content":" TransportationType.TAXI);","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"fuel\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"Hongzhii"},"content":" TransportationType.FUEL);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"Hongzhii"},"content":" } else {","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"Hongzhii"},"content":" return new Transport(expenseDescriptionString, expenseDate, expenseAmount,","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"Hongzhii"},"content":" TransportationType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" } else if (expenseCategoryString.equals(\"utilities\")) {","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"Hongzhii"},"content":" if (expenseTypeString.equals(\"water\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.WATER);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"electricity\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.ELECTRICITY);","lastModifiedDate":"2023-10-26"},{"lineNumber":100,"author":{"gitId":"Hongzhii"},"content":" } else if (expenseTypeString.equals(\"gas\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.GAS);","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"Hongzhii"},"content":" } else{","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":" return new Utilities(expenseDescriptionString, expenseDate, expenseAmount, UtilityType.UNDEFINED);","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid category\");","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"Hongzhii"},"content":" public static int getIndex(HashMap\u003cString, String\u003e argumentsByFields) throws KaChinnnngException {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"Hongzhii"},"content":" if (!argumentsByFields.containsKey(INDEX_FIELD)) {","lastModifiedDate":"2023-10-15"},{"lineNumber":112,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Missing index field detected\");","lastModifiedDate":"2023-10-15"},{"lineNumber":113,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"Hongzhii"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"Hongzhii"},"content":" return Integer.parseInt(argumentsByFields.get(INDEX_FIELD));","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"Hongzhii"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"Hongzhii"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"Hongzhii"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"bljhty":4,"Hongzhii":116}},{"path":"src/main/java/seedu/duke/parser/FindParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"public class FindParser {","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" * Parses the find command input.","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" * @param fullCommand The full command string input by the user.","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" * @return An array of Strings containing the parsed parameters in the order: TYPE, CATEGORY, DESCRIPTION, DATE.","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException If the command format is invalid.","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public static String[] parseFindCommand(String fullCommand) throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" String[] tokens \u003d fullCommand.split(\" \");","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" String[] parsedParameters \u003d new String[4]; // To store TYPE, CATEGORY, DESCRIPTION, DATE","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" String[] validParameters \u003d {\"/t\", \"/cat\", \"/de\", \"/date\"}; // List of valid parameters","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" for (String token : tokens) {","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" if (token.startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" boolean isValidParam \u003d false;","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" for (String validParam : validParameters) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" if (token.equals(validParam)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" isValidParam \u003d true;","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" if (!isValidParam) {","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Unrecognized parameter \\\"\" + token + \"\\\". \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" \"Please refer to the help guide for valid parameters.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/type\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /t instead of /type for specifying the type.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/category\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /cat instead of /category for specifying the category.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/description\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please use /de instead of /description for specifying the description.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" if (!fullCommand.contains(\"/t\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The /t TYPE field is mandatory.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" int typeIndex \u003d indexOf(tokens, \"/t\");","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" if (typeIndex \u003d\u003d tokens.length - 1 || tokens[typeIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /t TYPE cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" parsedParameters[0] \u003d tokens[typeIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" if(\"income\".equalsIgnoreCase(parsedParameters[0])) {","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/cat\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The /cat CATEGORY field is not applicable for income.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/cat\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" int categoryIndex \u003d indexOf(tokens, \"/cat\");","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" if (categoryIndex \u003d\u003d tokens.length - 1 || tokens[categoryIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /c CATEGORY cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" parsedParameters[1] \u003d tokens[categoryIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/de\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" int descriptionIndex \u003d indexOf(tokens, \"/de\");","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" if (descriptionIndex \u003d\u003d tokens.length - 1 || tokens[descriptionIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /de DESCRIPTION cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" parsedParameters[2] \u003d tokens[descriptionIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" if (fullCommand.contains(\"/date\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" int dateIndex \u003d indexOf(tokens, \"/date\");","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" if (dateIndex \u003d\u003d tokens.length - 1 || tokens[dateIndex + 1].startsWith(\"/\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"The value for /da DATE cannot be empty.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" parsedParameters[3] \u003d tokens[dateIndex + 1];","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" // Check that at least one optional field is provided","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" if (parsedParameters[1] \u003d\u003d null \u0026\u0026 parsedParameters[2] \u003d\u003d null \u0026\u0026 parsedParameters[3] \u003d\u003d null) {","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"At least one of the optional fields [/c CATEGORY], \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" \"[/de DESCRIPTION], [/da DATE] must be provided.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" return parsedParameters;","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * Helper method to find the index of a specific string in an array.","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" * @param array The array to search.","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" * @param value The string value to find.","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" * @return The index of the value in the array, or -1 if not found.","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" private static int indexOf(String[] array, String value) {","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" for (int i \u003d 0; i \u003c array.length; i++) {","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" if (array[i].equals(value)) {","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" return i;","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" return -1;","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"bljhty":108}},{"path":"src/main/java/seedu/duke/parser/IncomeParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.time.format.ResolverStyle;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * Represents the parser for the Income class.","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" * This class serves to parse the user input into a format that the Income class can understand","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"public class IncomeParser {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" public static final String DESCRIPTION_FIELD \u003d \"de\";","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" public static final String DATE_FIELD \u003d \"da\";","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" public static final String AMOUNT_FIELD \u003d \"am\";","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" public static final String INDEX_FIELD \u003d \"in\";","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(IncomeParser.class.getName());","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/IncomeParser.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the date of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeParser class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeManager class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" * @param incomeDateString String containing the date of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" * @return incomeDate LocalDate containing the date of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" public static LocalDate parseDate(String incomeDateString) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" assert incomeDateString !\u003d null : \"incomeDateString should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" LocalDate incomeDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" DateTimeFormatter formatter \u003d DateTimeFormatter.ofPattern(\"dd/MM/uuuu\")","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" .withResolverStyle(ResolverStyle.STRICT);","lastModifiedDate":"2023-10-12"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" incomeDate \u003d LocalDate.parse(incomeDateString, formatter);","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" } catch (DateTimeParseException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid date format\" + incomeDateString, e);","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid date in the format dd/MM/yyyy\");","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" if (incomeDate.isAfter(LocalDate.now())) {","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Date is in the future\" + incomeDateString);","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a date that is not in the future\");","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" return incomeDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the fields of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeManager class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" * @param argumentsByField HashMap containing the description, date, and amount of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" * @return Income object created from the provided fields","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" public static Income parseIncome(HashMap\u003cString, String\u003e argumentsByField) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" if (!argumentsByField.containsKey(DESCRIPTION_FIELD) ||","lastModifiedDate":"2023-10-12"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" !argumentsByField.containsKey(DATE_FIELD) ||","lastModifiedDate":"2023-10-12"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" !argumentsByField.containsKey(AMOUNT_FIELD)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Missing fields detected\");","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" String incomeDescriptionString \u003d argumentsByField.get(DESCRIPTION_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" String incomeDateString \u003d argumentsByField.get(DATE_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" String incomeAmountString \u003d argumentsByField.get(AMOUNT_FIELD);","lastModifiedDate":"2023-10-12"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" LocalDate incomeDate \u003d parseDate(incomeDateString);","lastModifiedDate":"2023-10-12"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" double incomeAmount;","lastModifiedDate":"2023-10-12"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" incomeAmount \u003d Double.parseDouble(incomeAmountString);","lastModifiedDate":"2023-10-12"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid amount format\" + incomeAmountString, e);","lastModifiedDate":"2023-10-19"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid amount\");","lastModifiedDate":"2023-10-12"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" if (incomeAmount \u003e 999999.99 || incomeAmount \u003c\u003d 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.WARNING, \"Invalid amount\" + incomeAmountString);","lastModifiedDate":"2023-10-19"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Income amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-12"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" return new Income(incomeDescriptionString, incomeDate, incomeAmount);","lastModifiedDate":"2023-10-12"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" * This method is used to get the index of the income.","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" * This method is used by the IncomeDeleter class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" * @param argumentsByFields HashMap containing the index of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" * @return index int containing the index of the income","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is an error in the command","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" public static int getIndex(HashMap\u003cString, String\u003e argumentsByFields) throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" assert argumentsByFields !\u003d null : \"argumentsByFields should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" if (!argumentsByFields.containsKey(INDEX_FIELD)) {","lastModifiedDate":"2023-10-12"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Missing index field detected\");","lastModifiedDate":"2023-10-12"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" int index;","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-12"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" index \u003d Integer.parseInt(argumentsByFields.get(INDEX_FIELD));","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-12"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-12"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" if (index \u003c\u003d 0) {","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Please enter a valid index\");","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" return index;","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":138}},{"path":"src/main/java/seedu/duke/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.io.File;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-19"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-19"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-19"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"/*","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" * parser class to parse user input","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"public class Parser {","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" //private static final Logger LOGGER \u003d Logger.getLogger(Parser.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(Parser.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" static {","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-19"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" File dir \u003d new File(\"logs\");","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" if (!dir.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" if (!dir.mkdirs()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"Failed to create directory \" + dir.getAbsolutePath());","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" FileHandler fh \u003d new FileHandler(\"logs/Parser.log\", true);","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" fh.setFormatter(formatter);","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" LOGGER.addHandler(fh);","lastModifiedDate":"2023-10-19"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" LOGGER.setLevel(Level.ALL);","lastModifiedDate":"2023-10-19"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" LOGGER.setUseParentHandlers(false);","lastModifiedDate":"2023-10-19"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } catch (Exception e) {","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.SEVERE, \"Error creating log file\", e);","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method is used to parse the user input.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method is used by the Main class in the application","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" * @param fullCommand String containing the user input","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * @return String containing the command to be executed","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" public static String parse(String fullCommand) {","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" assert fullCommand !\u003d null : \"fullCommand should not be null\";","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" String trimmedCommand \u003d fullCommand.trim();","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" String commandLowerCase \u003d trimmedCommand.toLowerCase();","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO, (\"Parsing user input:\") + fullCommand);","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" String resultCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" if (commandLowerCase.equals(\"exit\")) {","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"exit\";","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.startsWith(\"add income\")) {","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"add_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.equals(\"list income\")) {","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"Hongzhii"},"content":" } else if (commandLowerCase.startsWith(\"add expense\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"add_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"Hongzhii"},"content":" } else if (commandLowerCase.equals((\"list expense\"))) {","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.equals(\"help\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"help\";","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.equals(\"list\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"list\";","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"delete income\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"delete_income\";","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"delete expense\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"delete_expense\";","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.equals(\"balance\")) {","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"balance\";","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" } else if (commandLowerCase.startsWith(\"find\")) {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"find\";","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear incomes\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_incomes\";","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear expenses\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_expenses\";","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" } else if (commandLowerCase.startsWith(\"clear all\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" resultCommand \u003d \"clear_all\";","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"edit income\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"limyuhching"},"content":" resultCommand \u003d \"edit_income\";","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"limyuhching"},"content":" } else if (commandLowerCase.startsWith(\"edit expense\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"limyuhching"},"content":" resultCommand \u003d \"edit_expense\";","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" resultCommand \u003d \"invalid\";","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" LOGGER.log(Level.INFO , (\"Parsed command: \") + resultCommand);","lastModifiedDate":"2023-10-19"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" return resultCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"limyuhching":7,"bljhty":77,"Hongzhii":2,"KenCheung18":8}},{"path":"src/main/java/seedu/duke/storage/GetFromTxt.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.storage;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"import java.io.File;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":" * The GetFromTxt class is responsible for reading financial records data from a text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" * It parses the contents of the file and populates two ArrayLists: one for Incomes and one for Expenses.","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" * This class handles exceptions for file creation errors, parsing errors, and other issues that may arise","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * when reading data from the file.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":"public class GetFromTxt {","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" private static final String AMOUNT_NOT_SUPPORT_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" \"Amount field from this line is not supported from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" private static final String DATE_TIME_FORMAT_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" \"Date time format incorrect on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" private static final String FILE_CREATION_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" \"Something went wrong while creating the file from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" private static final String INDEX_OUT_OF_BOUND_FROM_FILE_ERROR \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":" \"Details missed on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" private static final String NUMBER_FROM_FILE_INCORRECT \u003d","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" \"The expense type is incorrect on this line from storage file \";","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" private final File file;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"KenCheung18"},"content":" * Construct a new object of the GetFromTxt class with the provided file path.","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" * @param path The path to the text file containing financial records data.","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":" public GetFromTxt(String path) {","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":" file \u003d new File(path);","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":" * Reads financial records data from the text file and add to the corresponding ArrayLists","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" * with Income and Expense objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList to store Income objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList to store Expense objects.","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" * @throws FileNotFoundException If the file specified by the path cannot be found.","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"KenCheung18"},"content":" public void getFromTextFile(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses) throws FileNotFoundException {","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"KenCheung18"},"content":" if (file.createNewFile()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"KenCheung18"},"content":" return; // If there is no such file in the directory, create the file and return without reading data.","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"KenCheung18"},"content":" System.out.println(FILE_CREATION_ERROR);","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"KenCheung18"},"content":" Scanner s \u003d new Scanner(file); // Create a Scanner using the File as the source","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"KenCheung18"},"content":" while (s.hasNext()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"KenCheung18"},"content":" String textLine \u003d s.nextLine();","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" // Parse the data from the text line","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"KenCheung18"},"content":" int expenseType \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"KenCheung18"},"content":" String commandFromFile \u003d textLine.split(\" \\\\| \")[0];","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"KenCheung18"},"content":" String descriptionFromFile \u003d textLine.split(\" \\\\| \")[1];","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" double amountFromFile \u003d Double. parseDouble(textLine.split(\" \\\\| \")[2]);","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" LocalDate dateFromFile \u003d LocalDate.parse(textLine.split(\" \\\\| \")[3]);","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":" // Check for valid amount range","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" if (amountFromFile \u003e 999999.99 || amountFromFile \u003c\u003d 0) {","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" throw new KaChinnnngException(\"Expense amount must be between $0.01 and $999999.99\");","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"KenCheung18"},"content":" if (!commandFromFile.equals(\"I\")){","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"KenCheung18"},"content":" expenseType \u003d Integer.parseInt(textLine.split(\" \\\\| \")[4]);","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"KenCheung18"},"content":" // Create appropriate objects based on the commandFromFile","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"KenCheung18"},"content":" switch (commandFromFile) {","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"KenCheung18"},"content":" case \"I\":","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"KenCheung18"},"content":" incomes.add(new Income(descriptionFromFile, dateFromFile, amountFromFile));","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"KenCheung18"},"content":" case \"EF\":","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Food(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, MealType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"KenCheung18"},"content":" case \"ET\":","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Transport(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, TransportationType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"KenCheung18"},"content":" case \"EU\":","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"KenCheung18"},"content":" expenses.add(new Utilities(descriptionFromFile, dateFromFile,","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"KenCheung18"},"content":" amountFromFile, UtilityType.values()[expenseType]));","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"KenCheung18"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"KenCheung18"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"KenCheung18"},"content":" System.out.println(\"The format of this line is incorrect \" + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"KenCheung18"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"KenCheung18"},"content":" System.out.println(INDEX_OUT_OF_BOUND_FROM_FILE_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"KenCheung18"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"KenCheung18"},"content":" System.out.println(AMOUNT_NOT_SUPPORT_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"KenCheung18"},"content":" } catch (DateTimeParseException e){","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"KenCheung18"},"content":" System.out.println(DATE_TIME_FORMAT_ERROR + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"KenCheung18"},"content":" } catch(NumberFormatException e){","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"KenCheung18"},"content":" System.out.println(NUMBER_FROM_FILE_INCORRECT + \"\\\"\" + textLine + \"\\\"\");","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":118}},{"path":"src/main/java/seedu/duke/storage/SaveToTxt.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"KenCheung18"},"content":"package seedu.duke.storage;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"KenCheung18"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"KenCheung18"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"KenCheung18"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"KenCheung18"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"KenCheung18"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"KenCheung18"},"content":" * The SaveToTxt class is responsible for saving financial records data to a text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"KenCheung18"},"content":" * It can save both Income and Expense objects to the specified file.","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"KenCheung18"},"content":" * This class handles exceptions for IO errors that may occur during file operations.","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"KenCheung18"},"content":"public class SaveToTxt {","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"KenCheung18"},"content":" private static final String IO_ERROR_MESSAGE \u003d \"An error occurred while saving tasks to the file.\";","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"KenCheung18"},"content":" private final String path;","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"KenCheung18"},"content":" * Construct a new object of the SaveToTxt class with the file path.","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"KenCheung18"},"content":" * @param path The path to the text file where data will be saved.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"KenCheung18"},"content":" public SaveToTxt(String path) {","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"KenCheung18"},"content":" this.path \u003d path;","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"KenCheung18"},"content":" * Saves both Income and Expense objects to the specified text file.","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList of Income objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList of Expense objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"KenCheung18"},"content":" public void saveIncomeAndExpense(ArrayList\u003cIncome\u003e incomes, ArrayList\u003cExpense\u003e expenses){","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"KenCheung18"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"KenCheung18"},"content":" saveIncomeToTextFile(incomes);","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"KenCheung18"},"content":" saveExpenseToTextFile(expenses);","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"KenCheung18"},"content":" * Saves Income objects to the text file. Each Income object is represented as a line in the txt file.","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"KenCheung18"},"content":" * @param incomes The ArrayList of Income objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"KenCheung18"},"content":" * @throws IOException If an IO error occurs during the file write operation.","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"KenCheung18"},"content":" public void saveIncomeToTextFile(ArrayList\u003cIncome\u003e incomes) throws IOException {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"KenCheung18"},"content":" try (FileWriter fw \u003d new FileWriter(path)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"KenCheung18"},"content":" for (Income income : incomes) {","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"KenCheung18"},"content":" String incomeDescription \u003d income.getDescription();","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"KenCheung18"},"content":" String incomeDate \u003d String.valueOf(income.getDate());","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"KenCheung18"},"content":" String incomeAmount \u003d String.valueOf(income.getAmount());","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"KenCheung18"},"content":" String textToAdd \u003d \"I\" + \" | \" + incomeDescription + \" | \" + incomeAmount + \" | \" + incomeDate + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"KenCheung18"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"KenCheung18"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"KenCheung18"},"content":" * Saves Expense objects to the text file. Each Expense object is represented as a line in the file,","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"KenCheung18"},"content":" * and the type of Expense (Food, Transport, or Utilities) is specified in the line.","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"KenCheung18"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"KenCheung18"},"content":" * @param expenses The ArrayList of Expense objects to save.","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"KenCheung18"},"content":" * @throws IOException If an IO error occurs during the file write operation.","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"KenCheung18"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"KenCheung18"},"content":" public void saveExpenseToTextFile(ArrayList\u003cExpense\u003e expenses) throws IOException{","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"KenCheung18"},"content":" try (FileWriter fw \u003d new FileWriter(path, true)) {","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"KenCheung18"},"content":" for (Expense expense : expenses) {","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"KenCheung18"},"content":" String textToAdd \u003d \"\";","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"KenCheung18"},"content":" String expenseDescription \u003d expense.getDescription();","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"KenCheung18"},"content":" String expenseDate \u003d String.valueOf(expense.getDate());;","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"KenCheung18"},"content":" String expenseAmount \u003d String.valueOf(expense.getAmount());","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"KenCheung18"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"KenCheung18"},"content":" // Determine the type of Expense and format the line accordingly","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"KenCheung18"},"content":" if (expense.getClass() \u003d\u003d Food.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"EF\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Food) expense).getMealType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"KenCheung18"},"content":" } else if (expense.getClass() \u003d\u003d Transport.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"ET\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Transport) expense).getTransportationType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"KenCheung18"},"content":" } else if (expense.getClass() \u003d\u003d Utilities.class) {","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"KenCheung18"},"content":" textToAdd \u003d \"EU\" + \" | \" + expenseDescription + \" | \" + expenseAmount + \" | \"","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"KenCheung18"},"content":" + expenseDate + \" | \" + ((Utilities) expense).getUtilityType().ordinal() + \"\\n\";","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"KenCheung18"},"content":" fw.write(textToAdd);","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"KenCheung18"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"KenCheung18"},"content":" System.out.println(IO_ERROR_MESSAGE);","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"KenCheung18"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"KenCheung18"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"KenCheung18":98}},{"path":"src/main/java/seedu/duke/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"import java.util.List;","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"Hongzhii"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" * This class handles the user interface of the program.","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"public class Ui {","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" private static final String lineDivider \u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public Scanner scanner;","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" * Constructor for Ui.","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" public Ui() {","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" this.scanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" * This method reads the command input by the user.","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" * @return String containing the command input by the user","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if there is no input provided by the user","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" public String readCommand() throws KaChinnnngException {","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" if (scanner.hasNextLine()) {","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" return scanner.nextLine();","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" throw new KaChinnnngException(\"No input provided by the user.\");","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * This method prints the line divider.","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" public static void showLineDivider() {","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" * Prints the welcome message when the program starts.","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" public static void printWelcomeMessage() {","lastModifiedDate":"2023-10-09"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Welcome to KaChinnnngggg! How may i assist you today?\");","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" * Prints the goodbye message when the program ends.","lastModifiedDate":"2023-10-12"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" public void printGoodbyeMessage() {","lastModifiedDate":"2023-10-11"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Bye. Hope to see you again soon!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" System.out.println(lineDivider);","lastModifiedDate":"2023-10-09"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" * prints the message when the user inputs his income","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" * @param income Income object created from the provided fields","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" public static void printIncomeAddedMessage(Income income) {","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Got it. I\u0027ve added this income:\\n\" + income.toString());","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * Prints a message indicating the start of the income list display.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" public void printListIncomeMessage() {","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are your incomes:\");","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"Hongzhii"},"content":" public void printExpenseAddedMessage(Expense expense) {","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Got it. I\u0027ve added this expense:\\n\" + expense.toString());","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"limyuhching"},"content":" showLineDivider();","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"Hongzhii"},"content":" public void printListExpenseMessage() {","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"Hongzhii"},"content":" System.out.println(\"Here are your expenses:\");","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"Hongzhii"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" public void printMessage(String message) {","lastModifiedDate":"2023-10-23"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-23"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" public void showMatchingIncomes(List\u003cIncome\u003e matchingIncomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" if(matchingIncomes.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" System.out.println(\"No matching incomes found.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are the matching incomes in your list:\");","lastModifiedDate":"2023-10-23"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" for (Income income : matchingIncomes) {","lastModifiedDate":"2023-10-23"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" System.out.println(income.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" public void showMatchingExpenses(List\u003cExpense\u003e matchingExpenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" if (matchingExpenses.isEmpty()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" System.out.println(\"No matching expenses found.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" System.out.println(\"Here are the matching expenses in your list:\");","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" for (Expense expense : matchingExpenses) {","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" System.out.println(expense.toString());","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"limyuhching":5,"bljhty":101,"Hongzhii":9}},{"path":"src/test/java/seedu/duke/commands/BalanceTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Tests for the {@link Balance} class.","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This test class provides test cases to check the calculation and reporting","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" * of financial balance between income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class BalanceTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Sets up the test fixture.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" * Called before every test case method.","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" public void setup() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" incomes.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" incomes.add(new Income(\"Bonus\", LocalDate.of(2023, 10, 15), 1000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" expenses.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" expenses.add(new Expense(\"Groceries\", LocalDate.of(2023, 10, 7), 100.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with both income and expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly subtracts expenses from income.","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withBothIncomeAndExpenses_returnsCorrectDifference() {","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(incomes, expenses);","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" assertEquals(3900.0, balance.getBalance());","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no records.","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns 0.","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void testNoRecords() {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(new ArrayList\u003c\u003e(), new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" assertEquals(0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" \"Balance should be 0 when no records are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns a positive value equal to income.","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withNoExpenses_returnsIncomeValue()throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cIncome\u003e incomesOnly \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" incomesOnly.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(incomesOnly, new ArrayList\u003c\u003e());","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" \"Balance should equal sum of all incomes when no expenses are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" * Test the {@link Balance#getBalance()} method with no incomes.","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * This test case checks if the balance calculation correctly returns a negative value equal to expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" public void testGetBalance_withNoIncomes_returnsNegativeExpenseValue()throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" ArrayList\u003cExpense\u003e expensesOnly \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" expensesOnly.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" Balance balance \u003d new Balance(new ArrayList\u003c\u003e(), expensesOnly);","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" assertEquals(-2000.0, balance.getBalance(),","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" \"Balance should be negative sum of all expenses when no incomes are present.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":85}},{"path":"src/test/java/seedu/duke/commands/DeleteExpenseCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * This class contains JUnit tests for the DeleteExpenseCommand class.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":"public class DeleteExpenseCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" private DeleteExpenseCommand deleteExpenseCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" public void setUp() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" deleteExpenseCommand \u003d new DeleteExpenseCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with valid input. The expense should be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_expenseDeleted() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" Expense expense \u003d new Expense(\"Lunch\", LocalDate.now().minusDays(1), 20.00);","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" expenses.add(expense);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" // Act","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" // Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" assertEquals(0, expenses.size());","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with missing arguments. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" public void testExecute_missingArgument_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense\";","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with an invalid index. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteExpenseCommand with a non-existent expense index.","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" * It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"limyuhching"},"content":" public void testExecute_nonExistentExpenseIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete expense 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteExpenseCommand.execute(expenses, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"limyuhching":82}},{"path":"src/test/java/seedu/duke/commands/DeleteIncomeCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.ui.Ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"/**","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":" * This class contains JUnit tests for the DeleteIncomeCommand class.","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":"public class DeleteIncomeCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" private DeleteIncomeCommand deleteIncomeCommand;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" private Ui ui;","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" public void setUp() {","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" deleteIncomeCommand \u003d new DeleteIncomeCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with valid input. The income should be deleted.","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_incomeDeleted() throws KaChinnnngException {","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" Income income \u003d new Income(\"Salary\",","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" incomes.add(income);","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" // Act","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" // Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" assertEquals(0, incomes.size());","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with missing arguments. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" public void testExecute_missingArgument_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income\";","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with an invalid index. It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":68,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":70,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"limyuhching"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":72,"author":{"gitId":"limyuhching"},"content":" * Test the execution of the DeleteIncomeCommand with a non-existent income index.","lastModifiedDate":"2023-10-23"},{"lineNumber":73,"author":{"gitId":"limyuhching"},"content":" * It should throw a KaChinnnngException.","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"limyuhching"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"limyuhching"},"content":" public void testExecute_nonExistentIncomeIndex_exceptionThrown() {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"limyuhching"},"content":" // Arrange","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"limyuhching"},"content":" String fullCommand \u003d \"delete income 1\";","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"limyuhching"},"content":" // Act and Assert","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e deleteIncomeCommand.execute(incomes, fullCommand, ui));","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"limyuhching":83}},{"path":"src/test/java/seedu/duke/commands/EditExpenseCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class EditExpenseCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cExpense\u003e expenses;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" public void setUp() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" // Initialize the expenses and fullCommand for testing","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" expenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" expenses.add(new Expense(\"Rent\", LocalDate.of(2023, 10, 5), 2000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" expenses.add(new Expense(\"Groceries\", LocalDate.of(2023, 10, 7), 100.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"Hongzhii"},"content":" fullCommand \u003d \"edit expense 3 expense /cat food /type lunch /de chicken sandwich /date 01/10/2023 /amt 10.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" // This test checks if the execute method throws an exception when the index is out of bounds","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" editExpenseCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" });","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_expenseEdited() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"Hongzhii"},"content":" fullCommand \u003d \"edit expense 1 expense /cat food /type lunch /de chicken rice /date 01/10/2023 /amt 10.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":" // Test if the execute method changes the expense and prints the changes","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e editExpenseCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":" // Verify if the expense was updated correctly","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" Expense updatedExpense \u003d expenses.get(0);","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"Hongzhii"},"content":" assertEquals(\"Food Expense (LUNCH): chicken rice | Date: 01/Oct/2023 | Amount: $10.00\",","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"Hongzhii"},"content":" updatedExpense.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidExpense_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" // Test if execute method throws a KaChinnnngException for an invalid command","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit expense 1 invalid expense command\";","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" EditExpenseCommand editExpenseCommand \u003d new EditExpenseCommand(expenses, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e editExpenseCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":54,"Hongzhii":4}},{"path":"src/test/java/seedu/duke/commands/EditIncomeCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"limyuhching"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"limyuhching"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"limyuhching"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"limyuhching"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"limyuhching"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"limyuhching"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"limyuhching"},"content":"public class EditIncomeCommandTest {","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"limyuhching"},"content":" private EditIncomeCommand editIncomeCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"limyuhching"},"content":" private ArrayList\u003cIncome\u003e incomes;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"limyuhching"},"content":" private String fullCommand;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"limyuhching"},"content":" @BeforeEach","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"limyuhching"},"content":" public void setUp() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"limyuhching"},"content":" // Initialize the incomes and fullCommand for testing","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"limyuhching"},"content":" incomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"limyuhching"},"content":" incomes.add(new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"limyuhching"},"content":" incomes.add(new Income(\"Bonus\", LocalDate.of(2023, 10, 15), 1000.0));","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIndex_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 3 income /de salary for October /date 01/10/2023 /amt 5000.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"limyuhching"},"content":" // This test checks if the execute method throws an exception when the index is out of bounds","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand.execute();","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"limyuhching"},"content":" });","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"limyuhching"},"content":" public void testExecute_validInput_incomeEdited() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 1 income /de salary for October /date 01/10/2023 /amt 5000.00\";","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"limyuhching"},"content":" // Test if the execute method changes the income and prints the changes","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"limyuhching"},"content":" assertDoesNotThrow(() -\u003e editIncomeCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"limyuhching"},"content":" // Verify if the income was updated correctly","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"limyuhching"},"content":" Income updatedincome \u003d incomes.get(0);","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"limyuhching"},"content":" assertEquals(\"Income: salary for October | Date: 01/Oct/2023 | Amount: $5000.00\",","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"limyuhching"},"content":" updatedincome.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"limyuhching"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"limyuhching"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"limyuhching"},"content":" public void testExecute_invalidIncome_exceptionThrown() throws KaChinnnngException {","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"limyuhching"},"content":" // Test if execute method throws a KaChinnnngException for an invalid command","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"limyuhching"},"content":" fullCommand \u003d \"edit income 1 invalid income command\";","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"limyuhching"},"content":" editIncomeCommand \u003d new EditIncomeCommand(incomes, fullCommand);","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"limyuhching"},"content":" assertThrows(KaChinnnngException.class, () -\u003e editIncomeCommand.execute());","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"limyuhching"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"limyuhching"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"limyuhching":59}},{"path":"src/test/java/seedu/duke/commands/FindCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.commands;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.expensetypes.MealType;","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.expensetypes.TransportationType;","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.expensetypes.UtilityType;","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"import seedu.duke.ui.MockUi;","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":"public class FindCommandTest {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cIncome\u003e testIncomes;","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" private ArrayList\u003cExpense\u003e testExpenses;","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" private MockUi mockUi;","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" @BeforeEach","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" void setUp() {","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" testIncomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" testExpenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" mockUi \u003d new MockUi(); // Assuming MockUi has a parameterless constructor.","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandExpenseByCategory() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", \"Food\",","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" null, null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandExpenseByDescription() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" \"Burger\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandExpenseByDate() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" null, \"10/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandExpenseByMonth() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" // Adding multiple expenses in October","lastModifiedDate":"2023-10-29"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" Food foodExpense1 \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" Food foodExpense2 \u003d new Food(\"Pizza\", LocalDate.of(2023, 10, 15), 8.0, MealType.DINNER);","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" Food foodExpense3 \u003d new Food(\"Sandwich\", LocalDate.of(2023, 10, 28), 3.0, MealType.BREAKFAST);","lastModifiedDate":"2023-10-29"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" // Adding an expense from another month for control","lastModifiedDate":"2023-10-29"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" Food foodExpenseOutsideMonth \u003d new Food(\"Salad\", LocalDate.of(2023, 9, 30), 4.0, MealType.DINNER);","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense3);","lastModifiedDate":"2023-10-29"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpenseOutsideMonth);","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null, null, \"Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" + \"Food Expense (DINNER): Pizza | Date: 15/Oct/2023 | Amount: $8.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" + \"Food Expense (BREAKFAST): Sandwich | Date: 28/Oct/2023 | Amount: $3.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandExpenseByDate2() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" null, \"10/10/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" void testMultipleMatchingExpenses() throws Exception{","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" Food foodExpense1 \u003d new Food (\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" Food foodExpense2 \u003d new Food (\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023,10,11), 5.0, MealType.DINNER);","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" \"Burger\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" + \"Food Expense (DINNER): Burger | Date: 11/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" void testNoMatchingExpenses() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" \"NonexistentItem\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" assertTrue(mockUi.getPrintedMessages().contains(\"No matching expenses found.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" void testInvalidDateFormat() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" null, \"20231010\", mockUi); // Invalid date format","lastModifiedDate":"2023-10-29"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Invalid date format.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" void testNullValues() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":168,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":169,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses,","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"bljhty"},"content":" null, null, null, null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":174,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandIncomeByDescription() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income);","lastModifiedDate":"2023-10-29"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":182,"author":{"gitId":"bljhty"},"content":" \"Salary\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":183,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":185,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Income: Salary | Date: 10/Oct/2023 | Amount: $5000.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowIncomes().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":" void testValidFindCommandIncomeByDate() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":191,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income);","lastModifiedDate":"2023-10-29"},{"lineNumber":193,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":195,"author":{"gitId":"bljhty"},"content":" null, \"10/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":196,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":197,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":198,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Income: Salary | Date: 10/Oct/2023 | Amount: $5000.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":199,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowIncomes().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":200,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":201,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":202,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":203,"author":{"gitId":"bljhty"},"content":" void testMultipleIncomeMatches() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":204,"author":{"gitId":"bljhty"},"content":" Income income1 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":205,"author":{"gitId":"bljhty"},"content":" Income income2 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 11), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":206,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income1);","lastModifiedDate":"2023-10-29"},{"lineNumber":207,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income2);","lastModifiedDate":"2023-10-29"},{"lineNumber":208,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":209,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":210,"author":{"gitId":"bljhty"},"content":" \"Salary\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":211,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":212,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":213,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Income: Salary | Date: 10/Oct/2023 | Amount: $5000.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":214,"author":{"gitId":"bljhty"},"content":" + \"Income: Salary | Date: 11/Oct/2023 | Amount: $5000.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":215,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowIncomes().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":216,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":217,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":218,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":219,"author":{"gitId":"bljhty"},"content":" void testNoMatchingIncomes() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":220,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":221,"author":{"gitId":"bljhty"},"content":" \"NonexistentItem\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":222,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":223,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":224,"author":{"gitId":"bljhty"},"content":" assertTrue(mockUi.getPrintedMessages().contains(\"No matching incomes found.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":225,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":226,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":227,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":228,"author":{"gitId":"bljhty"},"content":" void testIncomesByMonth() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":229,"author":{"gitId":"bljhty"},"content":" Income income1 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":230,"author":{"gitId":"bljhty"},"content":" Income income2 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 11), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":231,"author":{"gitId":"bljhty"},"content":" Income income3 \u003d new Income(\"Salary\", LocalDate.of(2023, 9, 11), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":232,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income1);","lastModifiedDate":"2023-10-29"},{"lineNumber":233,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income2);","lastModifiedDate":"2023-10-29"},{"lineNumber":234,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income3);","lastModifiedDate":"2023-10-29"},{"lineNumber":235,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":236,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":237,"author":{"gitId":"bljhty"},"content":" null, \"Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":238,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":239,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":240,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Income: Salary | Date: 10/Oct/2023 | Amount: $5000.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":241,"author":{"gitId":"bljhty"},"content":" + \"Income: Salary | Date: 11/Oct/2023 | Amount: $5000.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":242,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowIncomes().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":243,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":244,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":245,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":246,"author":{"gitId":"bljhty"},"content":" void testIncomeFutureDate() {","lastModifiedDate":"2023-10-29"},{"lineNumber":247,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":248,"author":{"gitId":"bljhty"},"content":" Income futureIncome \u003d new Income(\"Bonus\", LocalDate.of(2025, 10, 10), 7000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":249,"author":{"gitId":"bljhty"},"content":" testIncomes.add(futureIncome);","lastModifiedDate":"2023-10-29"},{"lineNumber":250,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":251,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":252,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Date cannot be in the future!\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":253,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":254,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":255,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":256,"author":{"gitId":"bljhty"},"content":" void testFindExpenseByDescriptionAndDate() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":257,"author":{"gitId":"bljhty"},"content":" Food foodExpense1 \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":258,"author":{"gitId":"bljhty"},"content":" Food foodExpense2 \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 11), 5.0, MealType.DINNER);","lastModifiedDate":"2023-10-29"},{"lineNumber":259,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":260,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":261,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":262,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":263,"author":{"gitId":"bljhty"},"content":" \"Burger\", \"10/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":264,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":265,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":266,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":267,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":268,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":269,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":270,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":271,"author":{"gitId":"bljhty"},"content":" void testFindExpenseByDescriptionAndCategory() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":272,"author":{"gitId":"bljhty"},"content":" Food foodExpense1 \u003d new Food(\"Burger\", LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":273,"author":{"gitId":"bljhty"},"content":" Food foodExpense2 \u003d new Food(\"Pizza\", LocalDate.of(2023, 10, 11), 5.0, MealType.DINNER);","lastModifiedDate":"2023-10-29"},{"lineNumber":274,"author":{"gitId":"bljhty"},"content":" Transport transportExpense \u003d new Transport(\"Bus\",","lastModifiedDate":"2023-10-29"},{"lineNumber":275,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, TransportationType.BUS);","lastModifiedDate":"2023-10-29"},{"lineNumber":276,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":277,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":278,"author":{"gitId":"bljhty"},"content":" testExpenses.add(transportExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":279,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":280,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", \"Food\",","lastModifiedDate":"2023-10-29"},{"lineNumber":281,"author":{"gitId":"bljhty"},"content":" \"Burger\", null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":282,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":283,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":284,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Food Expense (LUNCH): Burger | Date: 10/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":285,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":286,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":287,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":288,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":289,"author":{"gitId":"bljhty"},"content":" void testFindExpenseByDateAndCategory() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":290,"author":{"gitId":"bljhty"},"content":" Transport transportExpense1 \u003d new Transport(\"Bus\",","lastModifiedDate":"2023-10-29"},{"lineNumber":291,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, TransportationType.BUS);","lastModifiedDate":"2023-10-29"},{"lineNumber":292,"author":{"gitId":"bljhty"},"content":" Utilities utilitiesExpense \u003d new Utilities(\"Electricity\",","lastModifiedDate":"2023-10-29"},{"lineNumber":293,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, UtilityType.WATER);","lastModifiedDate":"2023-10-29"},{"lineNumber":294,"author":{"gitId":"bljhty"},"content":" Transport transportExpense2 \u003d new Transport(\"Bus\",","lastModifiedDate":"2023-10-29"},{"lineNumber":295,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, TransportationType.TAXI);","lastModifiedDate":"2023-10-29"},{"lineNumber":296,"author":{"gitId":"bljhty"},"content":" testExpenses.add(transportExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":297,"author":{"gitId":"bljhty"},"content":" testExpenses.add(utilitiesExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":298,"author":{"gitId":"bljhty"},"content":" testExpenses.add(transportExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":299,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":300,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", \"Transport\",","lastModifiedDate":"2023-10-29"},{"lineNumber":301,"author":{"gitId":"bljhty"},"content":" null, \"11/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":302,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":303,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":304,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Transportation Expense (BUS): Bus | Date: 11/Oct/2023 | Amount: $5.00, \"","lastModifiedDate":"2023-10-29"},{"lineNumber":305,"author":{"gitId":"bljhty"},"content":" + \"Transportation Expense (TAXI): Bus | Date: 11/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":306,"author":{"gitId":"bljhty"},"content":" assertTrue(mockUi.getShowExpenses().contains(expectedOutput));","lastModifiedDate":"2023-10-29"},{"lineNumber":307,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":308,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":309,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":310,"author":{"gitId":"bljhty"},"content":" void testFindExpenseByDescriptionAndDateAndCategory() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":311,"author":{"gitId":"bljhty"},"content":" Utilities utilitiesExpense1 \u003d new Utilities(\"Electricity\",","lastModifiedDate":"2023-10-29"},{"lineNumber":312,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, UtilityType.ELECTRICITY);","lastModifiedDate":"2023-10-29"},{"lineNumber":313,"author":{"gitId":"bljhty"},"content":" Utilities utilitiesExpense2 \u003d new Utilities(\"Water\",","lastModifiedDate":"2023-10-29"},{"lineNumber":314,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, UtilityType.WATER);","lastModifiedDate":"2023-10-29"},{"lineNumber":315,"author":{"gitId":"bljhty"},"content":" Food foodExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":316,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 11), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":317,"author":{"gitId":"bljhty"},"content":" testExpenses.add(utilitiesExpense1);","lastModifiedDate":"2023-10-29"},{"lineNumber":318,"author":{"gitId":"bljhty"},"content":" testExpenses.add(utilitiesExpense2);","lastModifiedDate":"2023-10-29"},{"lineNumber":319,"author":{"gitId":"bljhty"},"content":" testExpenses.add(foodExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":320,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":321,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"expense\", \"Utilities\",","lastModifiedDate":"2023-10-29"},{"lineNumber":322,"author":{"gitId":"bljhty"},"content":" \"Electricity\", \"11/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":323,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":324,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":325,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Utilities Expense(ELECTRICITY): Electricity | Date: 11/Oct/2023 | Amount: $5.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":326,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowExpenses().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":327,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":328,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":329,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":330,"author":{"gitId":"bljhty"},"content":" void testIncomeByDescriptionAndDate() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":331,"author":{"gitId":"bljhty"},"content":" Income income1 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":332,"author":{"gitId":"bljhty"},"content":" Income income2 \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 11), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":333,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income1);","lastModifiedDate":"2023-10-29"},{"lineNumber":334,"author":{"gitId":"bljhty"},"content":" testIncomes.add(income2);","lastModifiedDate":"2023-10-29"},{"lineNumber":335,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":336,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses, \"income\", null,","lastModifiedDate":"2023-10-29"},{"lineNumber":337,"author":{"gitId":"bljhty"},"content":" \"Salary\", \"10/Oct/2023\", mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":338,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":339,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":340,"author":{"gitId":"bljhty"},"content":" String expectedOutput \u003d \"[Income: Salary | Date: 10/Oct/2023 | Amount: $5000.00]\";","lastModifiedDate":"2023-10-29"},{"lineNumber":341,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedOutput, mockUi.getShowIncomes().get(0));","lastModifiedDate":"2023-10-29"},{"lineNumber":342,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":343,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":344,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":345,"author":{"gitId":"bljhty"},"content":" void testNegativeIncomeAmount() {","lastModifiedDate":"2023-10-29"},{"lineNumber":346,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":347,"author":{"gitId":"bljhty"},"content":" Income negativeIncome \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 10), -5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":348,"author":{"gitId":"bljhty"},"content":" testIncomes.add(negativeIncome);","lastModifiedDate":"2023-10-29"},{"lineNumber":349,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":350,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":351,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Amount cannot be negative!\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":352,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":353,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":354,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":355,"author":{"gitId":"bljhty"},"content":" void testNegativeExpenseAmount() {","lastModifiedDate":"2023-10-29"},{"lineNumber":356,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":357,"author":{"gitId":"bljhty"},"content":" Food negativeExpense \u003d new Food(\"Burger\",","lastModifiedDate":"2023-10-29"},{"lineNumber":358,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), -5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":359,"author":{"gitId":"bljhty"},"content":" testExpenses.add(negativeExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":360,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":361,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":362,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Amount cannot be negative!\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":363,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":364,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":365,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":366,"author":{"gitId":"bljhty"},"content":" void testEmptyIncomeDescription() {","lastModifiedDate":"2023-10-29"},{"lineNumber":367,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":368,"author":{"gitId":"bljhty"},"content":" Income emptyDescriptionIncome \u003d new Income(\"\",","lastModifiedDate":"2023-10-29"},{"lineNumber":369,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5000.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":370,"author":{"gitId":"bljhty"},"content":" testIncomes.add(emptyDescriptionIncome);","lastModifiedDate":"2023-10-29"},{"lineNumber":371,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":372,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":373,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Description cannot be empty!\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":374,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":375,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":376,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":377,"author":{"gitId":"bljhty"},"content":" void testEmptyExpenseDescription() {","lastModifiedDate":"2023-10-29"},{"lineNumber":378,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":379,"author":{"gitId":"bljhty"},"content":" Food emptyDescriptionExpense \u003d new Food(\"\",","lastModifiedDate":"2023-10-29"},{"lineNumber":380,"author":{"gitId":"bljhty"},"content":" LocalDate.of(2023, 10, 10), 5.0, MealType.LUNCH);","lastModifiedDate":"2023-10-29"},{"lineNumber":381,"author":{"gitId":"bljhty"},"content":" testExpenses.add(emptyDescriptionExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":382,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":383,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":384,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Description cannot be empty!\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":385,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":386,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":387,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":388,"author":{"gitId":"bljhty"},"content":" void testInvalidExpenseCategory() {","lastModifiedDate":"2023-10-29"},{"lineNumber":389,"author":{"gitId":"bljhty"},"content":" Exception exception \u003d assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-29"},{"lineNumber":390,"author":{"gitId":"bljhty"},"content":" // Assuming \u0027Gaming\u0027 is not a valid category in your application","lastModifiedDate":"2023-10-29"},{"lineNumber":391,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses,","lastModifiedDate":"2023-10-29"},{"lineNumber":392,"author":{"gitId":"bljhty"},"content":" \"expense\", \"Gaming\", null, null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":393,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":394,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-29"},{"lineNumber":395,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":396,"author":{"gitId":"bljhty"},"content":" assertTrue(exception.getMessage().contains(\"Invalid expense category provided! Allowed categories are: \"));","lastModifiedDate":"2023-10-29"},{"lineNumber":397,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":398,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":399,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":400,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":401,"author":{"gitId":"bljhty"},"content":" void testFindCommandWithZeroAmountExpense() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":402,"author":{"gitId":"bljhty"},"content":" Expense zeroAmountExpense \u003d new Expense(\"Zero Amount Expense\", LocalDate.now(), 0.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":403,"author":{"gitId":"bljhty"},"content":" testExpenses.add(zeroAmountExpense);","lastModifiedDate":"2023-10-29"},{"lineNumber":404,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":405,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses,","lastModifiedDate":"2023-10-29"},{"lineNumber":406,"author":{"gitId":"bljhty"},"content":" \"expense\", \"Food\", null, null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":407,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":408,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":409,"author":{"gitId":"bljhty"},"content":" assertFalse(mockUi.getShowExpenses().contains(\"Zero Amount Expense\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":410,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":411,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":412,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":413,"author":{"gitId":"bljhty"},"content":" void testFindCommandWithZeroIncome() throws Exception {","lastModifiedDate":"2023-10-29"},{"lineNumber":414,"author":{"gitId":"bljhty"},"content":" Income zeroAmountIncome \u003d new Income(\"Zero Amount Income\", LocalDate.now(), 0.0);","lastModifiedDate":"2023-10-29"},{"lineNumber":415,"author":{"gitId":"bljhty"},"content":" testIncomes.add(zeroAmountIncome);","lastModifiedDate":"2023-10-29"},{"lineNumber":416,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":417,"author":{"gitId":"bljhty"},"content":" FindCommand findCommand \u003d new FindCommand(testIncomes, testExpenses,","lastModifiedDate":"2023-10-29"},{"lineNumber":418,"author":{"gitId":"bljhty"},"content":" \"income\", null, null, null, mockUi);","lastModifiedDate":"2023-10-29"},{"lineNumber":419,"author":{"gitId":"bljhty"},"content":" findCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":420,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":421,"author":{"gitId":"bljhty"},"content":" assertFalse(mockUi.getShowIncomes().contains(\"Zero Amount Income\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":422,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":423,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":424,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"bljhty":424}},{"path":"src/test/java/seedu/duke/financialrecords/ExpenseTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.fail;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * Test suite for the {@link Expense} class.","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" * This class contains unit tests to validate the behavior of the Expense class and ensure","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" * correctness in the representation and management of financial expenses.","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"public class ExpenseTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" private Expense expense;","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" * Initializes common test fixtures before each test execution.","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" void setUp() {","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" try {","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" expense \u003d new Expense(\"Lunch\", LocalDate.now().minusDays(1), 20.00);","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" } catch (KaChinnnngException e) {","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" fail(\"Setup failed due to exception: \" + e.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the description of an Expense object is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" void testExpenseDescription_notEmpty(){","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"\", LocalDate.now(), 20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the amount of an Expense object is negative.","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" void testExpenseAmount_notNegative(){","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"Lunch\", LocalDate.now(), -20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * Tests if an exception is thrown when the date of an Expense object is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" void testExpenseDate_notFuture(){","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e new Expense(\"Lunch\", LocalDate.now().plusDays(1), 20.00));","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * Tests if the correct description of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" void getDescription() {","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Lunch\", expense.getDescription());","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":" * Tests if the correct date of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" void getDate() {","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.now().minusDays(1), expense.getDate());","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" * Tests if the correct amount of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" void getAmount() {","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" assertEquals(20.00, expense.getAmount());","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" * Tests if the correct date string of the Expense object is returned.","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" void getDateString() {","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\")),","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" expense.getDateString());","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" * Tests the string representation of the Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" void testToString() {","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Expense: Lunch | Date: \" +","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\")) +","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" \" | Amount: $20.00\",","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" expense.toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":101}},{"path":"src/test/java/seedu/duke/financialrecords/IncomeTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.financialrecords;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertNotNull;","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"public class IncomeTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" public void testIncomeCreation() throws KaChinnnngException {","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" assertNotNull(income);","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Salary\", income.getDescription());","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), income.getDate());","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.00, income.getAmount());","lastModifiedDate":"2023-10-12"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" public void testToString() throws KaChinnnngException{","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" Income income \u003d new Income(\"Salary\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" String expected \u003d \"Income: Salary | Date: 12/Oct/2023 | Amount: $5000.00\";","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" assertEquals(expected, income.toString());","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" public void testInvalidDescription() {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" new Income(\"\", LocalDate.of(2023, 10, 12), 5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" public void testInvalidAmount() {","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e {","lastModifiedDate":"2023-10-12"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" new Income(\"Salary\", LocalDate.of(2023, 10, 12), -5000.00);","lastModifiedDate":"2023-10-12"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" });","lastModifiedDate":"2023-10-12"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"bljhty":42}},{"path":"src/test/java/seedu/duke/parser/ExpenseParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Food;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Transport;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Utilities;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"public class ExpenseParserTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if the date is parsed correctly.","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" void parseDate_validDate_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" LocalDate expectedDate \u003d LocalDate.of(2020, 02, 29);","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" LocalDate actualDate \u003d ExpenseParser.parseDate(\"29/02/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" assertEquals(expectedDate, actualDate);","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid day.","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" void parseDate_invalidDay_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"32/02/2020\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid year.","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" void parseDate_invalidDate_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"10/10/20202\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in ExpenseParser","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse a date that is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" void parseDate_futureDate_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseDate(\"10/10/3021\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * It verifies if the food category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" void testParseExpense_foodCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"lunch\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Food);","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":" * It verifies if the transport category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" void testParseExpense_transportCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"transport\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"bus\");","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"from nus to changi\");","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"1.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Transport);","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" * It verifies if the utilities category are correctly parsed into an Expense object.","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException for invalid scenarios","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" void testParseExpense_utilitiesCategory_success() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"utilities\");","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.TYPE_FIELD, \"electricity\");","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"Hongzhii"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"air con bill\");","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"50.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" assertTrue(ExpenseParser.parseExpense(expenseFields) instanceof Utilities);","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for an unrecognized category.","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" void testParseExpense_invalidCategory_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"invalid\");","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing amount fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingAmountField_success() {","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing description fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingDescriptionFields_success(){","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" * This method tests the parseExpense method in ExpenseParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception for missing date fields.","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" void testParseExpense_missingDateField_success(){","lastModifiedDate":"2023-10-18"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"3.50\");","lastModifiedDate":"2023-10-18"},{"lineNumber":168,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":169,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":170,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":171,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":172,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":173,"author":{"gitId":"bljhty"},"content":" * Tests if the getIndex method in ExpenseParser throws an exception for a valid index format.","lastModifiedDate":"2023-10-18"},{"lineNumber":174,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":175,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":176,"author":{"gitId":"bljhty"},"content":" void testGetIndexValid() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":177,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":178,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.INDEX_FIELD, \"1\");","lastModifiedDate":"2023-10-18"},{"lineNumber":179,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":180,"author":{"gitId":"bljhty"},"content":" assertEquals(1, ExpenseParser.getIndex(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":181,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":182,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":183,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":184,"author":{"gitId":"bljhty"},"content":" * Tests if the getIndex method in ExpenseParser throws an exception for an invalid index format.","lastModifiedDate":"2023-10-18"},{"lineNumber":185,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":186,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":187,"author":{"gitId":"bljhty"},"content":" void testGetIndexInvalid() {","lastModifiedDate":"2023-10-18"},{"lineNumber":188,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":189,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.INDEX_FIELD, \"a\");","lastModifiedDate":"2023-10-18"},{"lineNumber":190,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":191,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.getIndex(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":192,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":193,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":194,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":195,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the provided amount exceeds the limit.","lastModifiedDate":"2023-10-18"},{"lineNumber":196,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":197,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":198,"author":{"gitId":"bljhty"},"content":" void testParseAmount_aboveLimit_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":199,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":200,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":201,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":202,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":203,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"1000000.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":204,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":205,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":206,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":207,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":208,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":209,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the category field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":210,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":211,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":212,"author":{"gitId":"bljhty"},"content":" void testParseCategory_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":213,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":214,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":215,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":216,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":217,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":218,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":219,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":220,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":221,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":222,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":223,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the description field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":224,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":225,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":226,"author":{"gitId":"bljhty"},"content":" void testParseDescription_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":227,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":228,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":229,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":230,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":231,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":232,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":233,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":234,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":235,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":236,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":237,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the date field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":238,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":239,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":240,"author":{"gitId":"bljhty"},"content":" void testParseDate_emptyString_exceptionThrown(){","lastModifiedDate":"2023-10-18"},{"lineNumber":241,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":242,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":243,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":244,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":245,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"9999.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":246,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":247,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":248,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":249,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":250,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":251,"author":{"gitId":"bljhty"},"content":" * Tests if the expense parsing method throws an exception when the amount field is empty.","lastModifiedDate":"2023-10-18"},{"lineNumber":252,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":253,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":254,"author":{"gitId":"bljhty"},"content":" void testParseAmount_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":255,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e expenseFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":256,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.CATEGORY_FIELD, \"food\");","lastModifiedDate":"2023-10-18"},{"lineNumber":257,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DESCRIPTION_FIELD, \"Chicken Rice\");","lastModifiedDate":"2023-10-18"},{"lineNumber":258,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.DATE_FIELD, \"12/10/2020\");","lastModifiedDate":"2023-10-18"},{"lineNumber":259,"author":{"gitId":"bljhty"},"content":" expenseFields.put(ExpenseParser.AMOUNT_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":260,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":261,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e ExpenseParser.parseExpense(expenseFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":262,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":263,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"bljhty":258,"Hongzhii":5}},{"path":"src/test/java/seedu/duke/parser/IncomeParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.parser;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.commands.KaChinnnngException;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-13"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-13"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-13"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"/**","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" * JUnit test class for IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":"public class IncomeParserTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" * This method tests the parseIncome method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" * It verifies if the incomeFields are correctly parsed into an Income object.","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":" public void testParseIncome() throws KaChinnnngException {","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-13"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"5000.00\");","lastModifiedDate":"2023-10-13"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" Income income \u003d IncomeParser.parseIncome(incomeFields);","lastModifiedDate":"2023-10-13"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" assertEquals(\"Salary\", income.getDescription());","lastModifiedDate":"2023-10-13"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), income.getDate());","lastModifiedDate":"2023-10-13"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":" assertEquals(5000.00, income.getAmount());","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if the date is parsed correctly.","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" * @throws KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"bljhty"},"content":" public void testParseDate_validDate() throws KaChinnnngException {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"bljhty"},"content":" LocalDate result \u003d IncomeParser.parseDate(\"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"bljhty"},"content":" assertEquals(LocalDate.of(2023, 10, 12), result);","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":46,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":47,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid date.","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"bljhty"},"content":" * @see KaChinnnngException if the parsed date is invalid","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":54,"author":{"gitId":"bljhty"},"content":" public void testParseDate_invalidDate() {","lastModifiedDate":"2023-10-13"},{"lineNumber":55,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"12/13/2023\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":57,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":58,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse a date that is in the future.","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":64,"author":{"gitId":"bljhty"},"content":" public void testParseDate_futureDate() {","lastModifiedDate":"2023-10-13"},{"lineNumber":65,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"12/10/2025\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":67,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":68,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"bljhty"},"content":" * This method tests the parseDate method in IncomeParser.","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"bljhty"},"content":" * Specifically, it tests if a KaChinnnngException is thrown when trying to parse an invalid day.","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"bljhty"},"content":" void testParseDate_invalidDay(){","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseDate(\"32/10/2023\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"bljhty"},"content":" * This method tests the getIndex method in IncomeParser when trying to get index from an empty input.","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-13"},{"lineNumber":83,"author":{"gitId":"bljhty"},"content":" public void testGetIndex_missingField() {","lastModifiedDate":"2023-10-13"},{"lineNumber":84,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-13"},{"lineNumber":85,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs amount that is above the limit.","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"bljhty"},"content":" void testParseAmount_aboveLimit_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"1000000000.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for description.","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"bljhty"},"content":" void testParseDescription_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"10.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for date.","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"bljhty"},"content":" void testParseDate_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"10.00\");","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an empty string for amount.","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"bljhty"},"content":" *","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":134,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":135,"author":{"gitId":"bljhty"},"content":" void testParseAmount_emptyString_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":136,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e incomeFields \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":137,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DESCRIPTION_FIELD, \"Salary\");","lastModifiedDate":"2023-10-18"},{"lineNumber":138,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.DATE_FIELD, \"12/10/2023\");","lastModifiedDate":"2023-10-18"},{"lineNumber":139,"author":{"gitId":"bljhty"},"content":" incomeFields.put(IncomeParser.AMOUNT_FIELD, \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":140,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.parseIncome(incomeFields));","lastModifiedDate":"2023-10-18"},{"lineNumber":142,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":143,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":145,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an invalid index.","lastModifiedDate":"2023-10-18"},{"lineNumber":146,"author":{"gitId":"bljhty"},"content":" * Specifically negative index","lastModifiedDate":"2023-10-18"},{"lineNumber":147,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":148,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"bljhty"},"content":" void testGetIndex_negativeIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":150,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":151,"author":{"gitId":"bljhty"},"content":" inputMap.put(IncomeParser.INDEX_FIELD, \"-1\");","lastModifiedDate":"2023-10-18"},{"lineNumber":152,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":153,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":154,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":155,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":156,"author":{"gitId":"bljhty"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":157,"author":{"gitId":"bljhty"},"content":" * This method tests the behaviour when user inputs an invalid index.","lastModifiedDate":"2023-10-18"},{"lineNumber":158,"author":{"gitId":"bljhty"},"content":" * Specifically zero index","lastModifiedDate":"2023-10-18"},{"lineNumber":159,"author":{"gitId":"bljhty"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":160,"author":{"gitId":"bljhty"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"bljhty"},"content":" void testGetIndex_zeroIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":162,"author":{"gitId":"bljhty"},"content":" HashMap\u003cString, String\u003e inputMap \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":163,"author":{"gitId":"bljhty"},"content":" inputMap.put(IncomeParser.INDEX_FIELD, \"0\");","lastModifiedDate":"2023-10-18"},{"lineNumber":164,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":165,"author":{"gitId":"bljhty"},"content":" assertThrows(KaChinnnngException.class, () -\u003e IncomeParser.getIndex(inputMap));","lastModifiedDate":"2023-10-18"},{"lineNumber":166,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":167,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"bljhty":167}},{"path":"src/test/java/seedu/duke/ui/MockUi.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bljhty"},"content":"package seedu.duke.ui;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Income;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"bljhty"},"content":"import seedu.duke.financialrecords.Expense;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"bljhty"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"bljhty"},"content":"import java.util.List;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"bljhty"},"content":"public class MockUi extends Ui{","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"bljhty"},"content":" private List\u003cString\u003e printedMessages \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"bljhty"},"content":" private List\u003cString\u003e showIncomes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"bljhty"},"content":" private List\u003cString\u003e showExpenses \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"bljhty"},"content":" public void printMessage(String message) {","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"bljhty"},"content":" printedMessages.add(message);","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"bljhty"},"content":" public void showMatchingIncomes(List\u003cIncome\u003e matchingIncomes) {","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"bljhty"},"content":" showIncomes.add(matchingIncomes.toString());","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"bljhty"},"content":" @Override","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"bljhty"},"content":" public void showMatchingExpenses(List\u003cExpense\u003e matchingExpenses) {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"bljhty"},"content":" showExpenses.add(matchingExpenses.toString());","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"bljhty"},"content":" public List\u003cString\u003e getPrintedMessages() {","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"bljhty"},"content":" return printedMessages;","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"bljhty"},"content":" public List\u003cString\u003e getShowIncomes() {","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"bljhty"},"content":" return showIncomes;","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"bljhty"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"bljhty"},"content":" public List\u003cString\u003e getShowExpenses() {","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"bljhty"},"content":" return showExpenses;","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"bljhty"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"bljhty"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"bljhty":40}}] diff --git a/AY2324S1-CS2113-T18-3_tp_master/commits.json b/AY2324S1-CS2113-T18-3_tp_master/commits.json index b673e0b..03874bf 100644 --- a/AY2324S1-CS2113-T18-3_tp_master/commits.json +++ b/AY2324S1-CS2113-T18-3_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"limyuhching":[{"date":"2023-10-12","commitResults":[{"hash":"7f15c328582d32d223482ccd59a5852f9ad70029","isMergeCommit":false,"messageTitle":"Add Lim Yuh Ching to AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"47e7e2474c8c6f73387b9dcd7047da3c77cb619e","isMergeCommit":false,"messageTitle":"Add ListCommand class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":59,"deletions":5}}},{"hash":"e176e64efb5cc74bcf08757e82020ae7bc9c656f","isMergeCommit":false,"messageTitle":"Add list option to parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"8a99e6a7dc43fd86423cf7046827ac5f7611f9fa","isMergeCommit":false,"messageTitle":"Add Ui to ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":2}}},{"hash":"54d292397684060fd65c2389c300dea0cb712504","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-list\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ea3da5f550569c65319ff4911fe9fed728a97e64","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/limyuhching/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n","fileTypesAndContributionMap":{}},{"hash":"fd506a278351582ab91f8f4b974b1db63765cfac","isMergeCommit":false,"messageTitle":"Change imports from .* to individual class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":7}}},{"hash":"9c3010789b6b2bc4f285263b77d6e56b0ce6988f","isMergeCommit":false,"messageTitle":"Add DeleteIncomeCommand and DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":1}}},{"hash":"ecdcbbe69b47d928a759d2cb81efe93cfa538c7b","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-delete\u0027","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n","fileTypesAndContributionMap":{}},{"hash":"3ae858c7a01d9a61a3e500510b79b26b23fe6a5c","isMergeCommit":false,"messageTitle":"Minor bug fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"69a33bbf033086dc0c4f8e2d314dff052227afd7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"939ddd821d709edc8b7e0f4c6e53bb8648e6a8d8","isMergeCommit":false,"messageTitle":"Remove duplicate import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"e7ee368b163df8c82a81ae2738e2f745f44b9846","isMergeCommit":false,"messageTitle":"Bug fixes - wrong indexing for delete command - inconsistent line divider","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":12}}},{"hash":"192a5b32be615e963b03f1bb584aa7eec161324d","isMergeCommit":true,"messageTitle":"Merge pull request #57 from limyuhching/master","messageBody":"Add list and delete feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"470e50657798752e0cea1cf681a1286ead745f62","isMergeCommit":false,"messageTitle":"Add JavaDoc and JUnit test for DeleteIncomeCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":2},"test-code":{"insertions":81,"deletions":0}}},{"hash":"4b8b9e883d87a6a56300486eb6a1e12affb1f7c1","isMergeCommit":false,"messageTitle":"Changed Ui output of ListCommand and DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":6}}},{"hash":"8585f39452170b750700c20306dd0bda7ef4eb7e","isMergeCommit":false,"messageTitle":"Debug style error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":3}}},{"hash":"6230bbe0816a74140c927ef9d79550a43ef2e0ec","isMergeCommit":false,"messageTitle":"Add JUnit and JavaDoc to DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":9},"test-code":{"insertions":82,"deletions":0}}},{"hash":"4db459d6ae7b6aeeb759152a49a039f92392198d","isMergeCommit":false,"messageTitle":"Add JavaDoc for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":0}}},{"hash":"385ced88b50c44c7f8f949dc3fb5fad30e859ffc","isMergeCommit":true,"messageTitle":"Merge pull request #84 from limyuhching/JUnit_DeleteIncomeCommand","messageBody":"Add JUnit for DeleteIncomeCommand","fileTypesAndContributionMap":{}},{"hash":"a675ae9e49ae0699e12bccf1e5ed6e3e76dd6703","isMergeCommit":true,"messageTitle":"Merge pull request #85 from limyuhching/JUnit_DeleteExpenseCommand","messageBody":"Add JUnit and JavaDoc to DeleteExpenseCommand","fileTypesAndContributionMap":{}},{"hash":"dc8741864a20266b1fb0e9bb10170d7dae995c8f","isMergeCommit":true,"messageTitle":"Merge branch \u0027JUnit_DeleteExpenseCommand\u0027 into Yuh.Ching-feature-edit","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"2a77405896563ecf112b2964f15f81df3b8eedbd","isMergeCommit":false,"messageTitle":"Feature: Edit Income and Expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":183,"deletions":13},"test-code":{"insertions":116,"deletions":0}}},{"hash":"752ff1c0afa5ea17df7e0bd3065ac353b0a6c410","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-edit\u0027","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n#\tsrc/main/java/seedu/duke/parser/Parser.java\n#\tsrc/main/java/seedu/duke/ui/Ui.java\n#\ttext-ui-test/EXPECTED.TXT\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"bbb14a8f04eac545603b09a5d59ad8163f6a35c0","isMergeCommit":true,"messageTitle":"Merge pull request #102 from limyuhching/master","messageBody":"Add Edit Feature","fileTypesAndContributionMap":{}}]}],"bljhty":[{"date":"2023-10-05","commitResults":[{"hash":"3647d84668028d5ea5c84d7627894a8ef0ee48fc","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-09","commitResults":[{"hash":"7e60ffed6f6e2ee9a0f983eee8e8a977406dfe5a","isMergeCommit":false,"messageTitle":"edited Duke class, added Ui class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"d8c20c9389f7a68369aa5fbbfd4ac33184a15975","isMergeCommit":false,"messageTitle":"Revert \"edited Duke class, added Ui class\"","messageBody":"This reverts commit 7e60ffed6f6e2ee9a0f983eee8e8a977406dfe5a.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":11}}},{"hash":"9543dee9ca0e62cad63e6cab349aa53372035467","isMergeCommit":false,"messageTitle":"Revert \"Revert \"edited Duke class, added Ui class\"\"","messageBody":"This reverts commit d8c20c9389f7a68369aa5fbbfd4ac33184a15975.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"e6e15fd5f670eda63cebf191b00c5da28f019d90","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}}]},{"date":"2023-10-11","commitResults":[{"hash":"d68fb478567a1542650b85e6563e6f62f641bdce","isMergeCommit":true,"messageTitle":"Merge pull request #4 from bljhty/master","messageBody":"Ui class added","fileTypesAndContributionMap":{}},{"hash":"fd522121b4dfe8c849d157c5273ea54a0aefefdd","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"d74d0e8d3dd1acfc47f1f94b3a55afe1245cef5b","isMergeCommit":true,"messageTitle":"Merge pull request #5 from bljhty/Bryan-Ui_Class","messageBody":"Bryan UI class","fileTypesAndContributionMap":{}},{"hash":"ac5e4bffd283c4ada16e720a489c48f40cf62d45","isMergeCommit":false,"messageTitle":"added parser class and \"bye\" command to exit the program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":2}}},{"hash":"146c1e73d2ce3c3bba44f73c548c824cd6bad416","isMergeCommit":true,"messageTitle":"Merge pull request #6 from bljhty/Bryan-Ui_exit_program","messageBody":"added parser class and \"bye\" command to exit the program","fileTypesAndContributionMap":{}},{"hash":"023a67aa11129e7329f57d108d4b3b071f4dfd7a","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"1e769fe7348a49764e97958bee02138b848c4078","isMergeCommit":false,"messageTitle":"edited code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"56a91fa04831b1e06d8763d46b71d127c4ed2a00","isMergeCommit":false,"messageTitle":"edited code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":10}}},{"hash":"2dd7e20d1facad6c28ac218229a49e0d2512af1a","isMergeCommit":true,"messageTitle":"Merge pull request #7 from bljhty/Bryan-Ui_exit_program","messageBody":"Bryan UI exit program","fileTypesAndContributionMap":{}},{"hash":"bd4a31df6e42d5a903c4fab01439db31d962cf18","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"4e8e8a23056ebd8406321216403edf432b6999e9","isMergeCommit":true,"messageTitle":"Merge pull request #8 from bljhty/Bryan-Ui_exit_program","messageBody":"Bryan minor changes to code","fileTypesAndContributionMap":{}},{"hash":"d0d3b91db4ee5e0246a08beb19f6d5bf1becd689","isMergeCommit":false,"messageTitle":"added KaChinng exception class to handle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":15}}},{"hash":"15235a31b2217e9e7340ec3c94e4760276fa7bb6","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":9}}},{"hash":"402c958dcd6b25b20d588adf6d488ef738dadc52","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"d3432fa63e6626dd7c9834b0f3c44216ed6a2d2d","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"839899344f669c73d5f8ff23d80e68b66f3e60f5","isMergeCommit":false,"messageTitle":"edited test.sh","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"b384a0a035717caa270226c388abfdc1da60cf7c","isMergeCommit":true,"messageTitle":"Merge pull request #19 from bljhty/Bryan-kachingg_exception_class","messageBody":"Bryan kachingg exception class","fileTypesAndContributionMap":{}},{"hash":"032e9e794b6cad89ea6eab4b8dbe01458b253726","isMergeCommit":false,"messageTitle":"edited aboutus page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"03fd6b2bd1462b8d3696fd96ae44264b386963fa","isMergeCommit":true,"messageTitle":"Merge pull request #20 from bljhty/Bryan-edit_about_us","messageBody":"edited aboutus page","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"873f424ba9981398334f6299fda0bc3cceb73103","isMergeCommit":true,"messageTitle":"Merge pull request #24 from limyuhching/master","messageBody":"Add Lim Yuh Ching to AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"28a6c552f73b92cece6ec576f68cab9a4f665f0b","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"fac1c519c857b496309e7fe6af4af67b5e73d7e6","isMergeCommit":true,"messageTitle":"Merge pull request #26 from bljhty/Bryan-UI_class_updated","messageBody":"Bryan UI class added","fileTypesAndContributionMap":{}},{"hash":"0aac2612fa5b3b29db3f83bd3f56e9d3df220408","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"dd4c190f169c56878ea072be5116d0ab299b302b","isMergeCommit":true,"messageTitle":"Merge pull request #30 from bljhty/Bryan-ParserClass","messageBody":"Bryan Parser Class","fileTypesAndContributionMap":{}},{"hash":"6e5a21ee4c8e1734c7a134cbf4c1f681fad66fef","isMergeCommit":false,"messageTitle":"Added income class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":0}}},{"hash":"2d31a0a186af6541c21ffa13d5f7f60da9eaccc8","isMergeCommit":false,"messageTitle":"edited income class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":13}}},{"hash":"3fa46fa0749d6bbaab94cbee2f3ca66b93b9da1f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from bljhty/Bryan-IncomeClass","messageBody":"Bryan income class","fileTypesAndContributionMap":{}},{"hash":"e723c830357b03fc0f01f9d145be1a1d3417c7ed","isMergeCommit":false,"messageTitle":"added commands class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"other":{"insertions":2,"deletions":2}}},{"hash":"41eee99740159c15d92884ce1b22bbc2149337a6","isMergeCommit":true,"messageTitle":"Merge pull request #33 from bljhty/Bryan-commandsClass","messageBody":"added commands class","fileTypesAndContributionMap":{}},{"hash":"2ef7421ecd90522a7f5746a96af22b928cc9a5e3","isMergeCommit":false,"messageTitle":"added the add income functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":138,"deletions":1}}},{"hash":"0de2467e5781906407d226b74596b4b404c645f6","isMergeCommit":true,"messageTitle":"Merge pull request #35 from bljhty/Bryan-AddIncomeFunction","messageBody":"added the add income functionality","fileTypesAndContributionMap":{}},{"hash":"c1415803bafbc7e40a5307c457495e1e36b2ecd5","isMergeCommit":false,"messageTitle":"added JUnit test for income","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":0}}},{"hash":"029f86a4fc3183c74920521dd3dcee4cceebab78","isMergeCommit":true,"messageTitle":"Merge pull request #37 from bljhty/Bryan-AddIncomeJunit","messageBody":"added JUnit test for income","fileTypesAndContributionMap":{}},{"hash":"f7be2e6b37b7ffaf6f44b59e7a24debacf9c71fb","isMergeCommit":false,"messageTitle":"added the list income function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":0}}},{"hash":"95034b9c866c415fcfdc3c484ee9bb03b07f4822","isMergeCommit":true,"messageTitle":"Merge pull request #38 from bljhty/Bryan-ListCommand","messageBody":"added the list income function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"3f5c8ecd561ac20483518ba49f808358d9a31ba6","isMergeCommit":false,"messageTitle":"Added JUnit Test for income parser class,","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":54,"deletions":0}}},{"hash":"efecaa2ff6828936f318ec93f7fbbaf73b07cc47","isMergeCommit":true,"messageTitle":"Merge pull request #41 from bljhty/Bryan-AddJUnitTestIncomeParser","messageBody":"Added JUnit Test for income parser class edit minor bugs in expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"b96b8820f857121283457a520bfb762ef2ca2c6c","isMergeCommit":false,"messageTitle":"minor bug fixing and added javadoc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":207,"deletions":6}}},{"hash":"a70966392c50aeb619d6895abd2a93f46c66e25a","isMergeCommit":true,"messageTitle":"Merge pull request #45 from bljhty/Bryan-bug_fixing","messageBody":"minor bug fixing and added javadoc","fileTypesAndContributionMap":{}},{"hash":"71eb946d765b405e018d22d60330e083e2a3bf13","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":174},"other":{"insertions":0,"deletions":0}}},{"hash":"b8a856dcc26db8ede044ef2bcac0852bcdb3838e","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":174,"deletions":0}}},{"hash":"0789a529e66efa74edc3ba2583b1152f5bd69e45","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"57b072ff69089aa71edecde0e12ab91907656d56","isMergeCommit":true,"messageTitle":"Merge pull request #46 from bljhty/Bryan-bug_fixing","messageBody":"Bryan bug fixing","fileTypesAndContributionMap":{}},{"hash":"c90e926cc7b8751df51dfe7387c0ceacd15a7845","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"dcf55f397a5193fa02c0554cb721f55d6a3c6beb","isMergeCommit":true,"messageTitle":"Merge pull request #48 from bljhty/master","messageBody":"no message","fileTypesAndContributionMap":{}},{"hash":"ac5acc3ceba4fdb5cbc729e88eab16b5edd239d0","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"8f9b494475f77182a35a655b40d0fefb1fcade21","isMergeCommit":true,"messageTitle":"Merge pull request #50 from bljhty/master","messageBody":"no message","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"34f306cc9e5ca4ef28e89e0e87179ab88d3256cf","isMergeCommit":false,"messageTitle":"edited testsh and expected output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"670b7ab465c3ec3436b883f873cac7cfdc7acd24","isMergeCommit":true,"messageTitle":"Merge pull request #60 from bljhty/Bryan-edit_testsh","messageBody":"edited testsh and expected output","fileTypesAndContributionMap":{}},{"hash":"c6c923f637432277043fe840fd3fbb92c8a7ef25","isMergeCommit":false,"messageTitle":"added JUnit test for expenseparser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":183,"deletions":0}}},{"hash":"aac9e86c2c1b463fa8173ffe62fba62f4b6a2ef0","isMergeCommit":true,"messageTitle":"Merge pull request #63 from bljhty/Bryan-Expense_parser_Junit","messageBody":"added JUnit test for expenseparser class","fileTypesAndContributionMap":{}},{"hash":"15fed349abbdcd95755be03abeea18551923713e","isMergeCommit":false,"messageTitle":"updated JUnit for income parser, added javadoc for both expense parsertest and incomeParserTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2},"test-code":{"insertions":202,"deletions":12}}},{"hash":"a06eab9c52dfff4de8d0dbdb26bc4e9b3e10f380","isMergeCommit":true,"messageTitle":"Merge pull request #64 from bljhty/Bryan-income_parser_Junit_updated","messageBody":"updated JUnit for income parser, added javadoc for both expense parse…","fileTypesAndContributionMap":{}},{"hash":"762b83d89c0b39cc91a5d31d4ad2a67e1b0b36f3","isMergeCommit":false,"messageTitle":"added expense JUnit test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":69,"deletions":0}}},{"hash":"1d5706ae2c956e8475671e773ef038d27cd7c6d8","isMergeCommit":true,"messageTitle":"Merge pull request #67 from bljhty/Bryan-expenseTest","messageBody":"added expense JUnit test","fileTypesAndContributionMap":{}},{"hash":"97a9b3858d57d9a4bd339e98ed54c363175e83f4","isMergeCommit":false,"messageTitle":"added balanceTest and javadoc comments for balanceTest and expenseTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":117,"deletions":0}}},{"hash":"433aeba0e3f9ff256e9e6b065a78e1b4f7f5c7e7","isMergeCommit":true,"messageTitle":"Merge pull request #70 from bljhty/Bryan-balanceTest","messageBody":"added balanceTest and javadoc comments for balanceTest and expenseTest","fileTypesAndContributionMap":{}},{"hash":"e76caab50cc07de5b2bc2c5f80489b2d90c27f1b","isMergeCommit":false,"messageTitle":"change \"bye\" to \"exit\" to exit the program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"e6badcdf8a009ff91209efb521c0b17f9286079b","isMergeCommit":true,"messageTitle":"Merge pull request #71 from bljhty/Bryan-balanceTest","messageBody":"change \"bye\" to \"exit\" to exit the program","fileTypesAndContributionMap":{}},{"hash":"03b17833325f95216af8857e242d3b5af65f5219","isMergeCommit":false,"messageTitle":"added logging and assertions for incomeLister, Income, incomeManager, FinancialRecord, IncomeParser and Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":13},"other":{"insertions":4,"deletions":0}}},{"hash":"4ee809172b0d94fa8ca80d620d1a4bd10557de51","isMergeCommit":true,"messageTitle":"Merge pull request #73 from bljhty/Bryan-logging_and_assertions","messageBody":"added logging and assertions for incomeLister, Income, incomeManager,…","fileTypesAndContributionMap":{}},{"hash":"6bbab986b5e67c176ec482d39cf69b3c983c5e5f","isMergeCommit":false,"messageTitle":"updated userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":80,"deletions":18}}},{"hash":"6edfa2b4c4816e4386bf978ec444c8e680f003c0","isMergeCommit":true,"messageTitle":"Merge pull request #74 from bljhty/Bryan-UserGuide_update","messageBody":"updated userguide","tags":["KaChinnnngv1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"62b94094ee4923eefe2d4b8c4d1cefc02f85ed08","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":5}}},{"hash":"37718df880e8caf3a75c0f1c6e3565e6d2642bf2","isMergeCommit":true,"messageTitle":"Merge pull request #75 from bljhty/Bryan-EditCode","messageBody":"no message","fileTypesAndContributionMap":{}},{"hash":"bfd698b4dd26861ced11ba5ea65704c8bb1a847d","isMergeCommit":false,"messageTitle":"edited bug where logger information is being displayed in the output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":5}}}]},{"date":"2023-10-23","commitResults":[{"hash":"7d763fd902700e4578442d4de7ba7cefd9c09411","isMergeCommit":false,"messageTitle":"added the find function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":22}}},{"hash":"3f46ad0f1c25480383c5cb30df8dcda0af1ef9e2","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":235,"deletions":0}}},{"hash":"a8cdf9a8a14b68c448977a80a12185508edc01cf","isMergeCommit":true,"messageTitle":"Merge pull request #87 from bljhty/Bryan-Find_function","messageBody":"Bryan find function","fileTypesAndContributionMap":{}},{"hash":"39b7a99a518e790ecf6dd123857df4caab783b36","isMergeCommit":false,"messageTitle":"made it such that the log file will be in a folder instead","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":4}}},{"hash":"7cc042582af15a30ae4e2af2394a3a460eb27e82","isMergeCommit":true,"messageTitle":"Merge pull request #88 from bljhty/Bryan-log_fixing","messageBody":"made it such that the log file will be in a folder instead","fileTypesAndContributionMap":{}},{"hash":"6ff08dd325033acea8bf60352d53eda3ef747616","isMergeCommit":false,"messageTitle":"clean up income manager class and change input formats","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":18}}},{"hash":"10a9c5009055e8bd38e4fe5031d2d4467dd0e41a","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"24ab533265f7e3716b86eb8331f978e71c3a4734","isMergeCommit":true,"messageTitle":"Merge pull request #90 from bljhty/Bryan-edit_IncomeManager","messageBody":"Bryan edit income manager","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"8636ab7ee8656732e70f001cefbaeb15ee4ee6cb","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":36}}},{"hash":"7eb3bc044234d200d13e2442a134686f1e191bbb","isMergeCommit":true,"messageTitle":"Merge pull request #91 from bljhty/Bryan-logging+assertion_findcommand","messageBody":"added logging and assertions to findCommand class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"106754518beae746363af4b8c58c0193c9674ba4","isMergeCommit":false,"messageTitle":"added DG for incomeManager","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":6},"docs":{"insertions":10,"deletions":0}}},{"hash":"1d7a839da12b7de630333477f4fbbed1adfc6797","isMergeCommit":true,"messageTitle":"Merge pull request #95 from bljhty/Bryan-updating_developerguide","messageBody":"added DG for incomeManager","fileTypesAndContributionMap":{}},{"hash":"5b832a32301924c877b0fb2ef0598806b54b234e","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"docs":{"insertions":25,"deletions":5}}},{"hash":"e7dd967864e94d72cc75560ded319bc5e2c2ad28","isMergeCommit":true,"messageTitle":"Merge pull request #101 from bljhty/Bryan-updating_developerguide(2)","messageBody":"updated UserGuide for FindCommand class and edited code snippets","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"56a7e40cb4436f0d20b0ad0e33ce1272451cea1b","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":8}}}]},{"date":"2023-10-27","commitResults":[{"hash":"5b1224aa7da13e18d1570d4b4a09dc4f20e20c14","isMergeCommit":true,"messageTitle":"Merge pull request #103 from bljhty/Bryan-FincCommand_JavaDoc","messageBody":"added javadoc comments for FindCommands","fileTypesAndContributionMap":{}}]}],"Hongzhii":[{"date":"2023-10-12","commitResults":[{"hash":"374988e8cd3295fcc475bc7750fb4b9fb00876cb","isMergeCommit":false,"messageTitle":"add expense class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":0}}},{"hash":"e2c1a08d38fb0980168c121d98f9a550d41908d9","isMergeCommit":true,"messageTitle":"Merge pull request #39 from Hongzhii/add-expense-class","messageBody":"add expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"fdb794183e31163e1516dff81559a932400e697b","isMergeCommit":false,"messageTitle":"add expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":299,"deletions":2}}},{"hash":"f9620e70b7be8738cd6fad83aac026b9a6e3ac86","isMergeCommit":false,"messageTitle":"fix coding standards issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"098a0492e5d4180fdc5f363384f4dad966b685fd","isMergeCommit":true,"messageTitle":"Merge pull request #43 from Hongzhii/add-expense-class","messageBody":"create different expense categories","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"d0a0911eb6616b1d618539343913144ab3b96c0f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Hongzhii/tp into add-expense-class","messageBody":"* \u0027master\u0027 of https://github.com/Hongzhii/tp:\n no message\n no message\n no message\n no message\n no message\n minor bug fixing and added javadoc\n add the help function\n\n# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n#\tsrc/main/java/seedu/duke/commands/ExpenseLister.java\n#\tsrc/main/java/seedu/duke/commands/ExpenseManager.java\n#\tsrc/main/java/seedu/duke/parser/ExpenseParser.java\n#\tsrc/main/java/seedu/duke/parser/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"6dc33217fab2dad56a7817bcdf9c0bb669e527f4","isMergeCommit":true,"messageTitle":"Merge pull request #52 from Hongzhii/add-expense-class","messageBody":"Add expense class","fileTypesAndContributionMap":{}},{"hash":"2982cf9151c17da188b454e61f5d05a6f1bcd26c","isMergeCommit":true,"messageTitle":"Merge pull request #51 from AY2324S1-CS2113-T18-3/add-expense-class","messageBody":"Add expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"ab30caec1cd31ad109d5be413d60a431098f662a","isMergeCommit":false,"messageTitle":"add java doc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":8}}},{"hash":"c6826012f1f2fa18afe80e27196b98d85a2da144","isMergeCommit":false,"messageTitle":"fix coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"303628c0a8d489a99a106bfe47ec1b5fd3100075","isMergeCommit":true,"messageTitle":"Merge pull request #66 from Hongzhii/master","messageBody":"add java doc","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"7ee4535ebcf6a796938d1ad67f2ab82ca0537831","isMergeCommit":true,"messageTitle":"Merge pull request #82 from bljhty/Bryan_LOGGING_bug","messageBody":"edited bug where logger information is being displayed in the output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"57091e1603dc4a51c8d4bfa9a65bada3c4bbec1b","isMergeCommit":false,"messageTitle":"change toString method to include enum type information","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"64994adc4f2dd4af9b021e5f8dae61fbd6298882","isMergeCommit":false,"messageTitle":"update parser and expense manager","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":41,"deletions":11}}},{"hash":"8b2ce625f1678c12fc73a87d1a8be704963c151e","isMergeCommit":false,"messageTitle":"update unit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":5},"test-code":{"insertions":9,"deletions":5}}},{"hash":"e3becbb79486d7af284a270c67bc444fe990a487","isMergeCommit":true,"messageTitle":"Merge branch \u0027add-type-functionality-to-expenses\u0027","messageBody":"* add-type-functionality-to-expenses:\n update unit tests\n update i/o tests\n update parser and expense manager\n change toString method to include enum type information\n","fileTypesAndContributionMap":{}},{"hash":"e0ff3d162d26673c9bdac78b0a8713dd7e4ed7b8","isMergeCommit":true,"messageTitle":"Merge pull request #105 from Hongzhii/master","messageBody":"add type functionality to expenses","fileTypesAndContributionMap":{}},{"hash":"15dda310b6cb156064f1f84aaa80d58b27f774eb","isMergeCommit":false,"messageTitle":"update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":0}}},{"hash":"fd1e0031d8dfc29a95d461b467eda6a3eeff737b","isMergeCommit":true,"messageTitle":"Merge branch \u0027update-developer-guide\u0027","messageBody":"* update-developer-guide:\n update developer guide\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"356e34b25e6d229286bcd1070a0fd092ec09c2c5","isMergeCommit":true,"messageTitle":"Merge pull request #106 from Hongzhii/master","messageBody":"update DG","fileTypesAndContributionMap":{}}]}],"KenCheung18":[{"date":"2023-10-05","commitResults":[{"hash":"ff771b65c44f9dd8452f28d33c98131f6ebdaca3","isMergeCommit":false,"messageTitle":"AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"169d557cd8aeb41bfc052c8baa84595ffdfb91a6","isMergeCommit":true,"messageTitle":"Merge pull request #3 from KenCheung18/AboutUs","messageBody":"AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"329946ddf88f470e861a65d067db83b89ac74e38","isMergeCommit":false,"messageTitle":"add the help function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":0}}},{"hash":"4451eda2b70e6fac03872dd33858a8d24c486e4c","isMergeCommit":true,"messageTitle":"Merge pull request #44 from KenCheung18/Usage-instructions","messageBody":"add the help function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"bcae9628b344bc6cb291a079aca607faff1fe7db","isMergeCommit":false,"messageTitle":"Solve conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"85c13e1244776c0f0866cdcce5a35676a6c27715","isMergeCommit":false,"messageTitle":"Solve another conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":3}}},{"hash":"10b6b25ca6c8901d81089ea4d3f1914ea47a41df","isMergeCommit":false,"messageTitle":"Solve minor bug on switch statement","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"d92551230ce733460145529d1b989be404f9e7d2","isMergeCommit":true,"messageTitle":"Merge pull request #53 from KenCheung18/Bug-solve-for-expense-class","messageBody":"Solve merge conflict","fileTypesAndContributionMap":{}},{"hash":"963101c37e2e2463d2b56dbbc75f772ae778bee2","isMergeCommit":false,"messageTitle":"Balance Function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":0}}},{"hash":"b61608b37db593b319f5b214c27c1ed7a2a47202","isMergeCommit":false,"messageTitle":"Minor bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"fb0d1b79960c19af7b291b56b8cd9925b24cb710","isMergeCommit":true,"messageTitle":"Merge pull request #58 from KenCheung18/Balance","messageBody":"Balance Function","fileTypesAndContributionMap":{}},{"hash":"f186609c39c31189eeeebeb89d7dc00b32bea648","isMergeCommit":false,"messageTitle":"Bug fix on balance function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"2796193e5f7ec9efb7eb8c7f92d5ae2b26eadea0","isMergeCommit":true,"messageTitle":"Merge pull request #59 from KenCheung18/Balance-bug-fix","messageBody":"Bug fix on balance function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"39b92cb3edb128ffb3386d0d23a3d6a3a9e47010","isMergeCommit":false,"messageTitle":"javadoc for Balance and UsageInstructions class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":1}}},{"hash":"e8cbb9f2e94ac946debabad31cd1e21edd590e4a","isMergeCommit":false,"messageTitle":"minor bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"b33182fbf46985067b73ce658ac1e1b8966a7a07","isMergeCommit":false,"messageTitle":"javadoc bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"2e540a1baf3784a8c9fff244e353199805ff168c","isMergeCommit":true,"messageTitle":"Merge pull request #65 from KenCheung18/Balance-add-javadoc","messageBody":"Add javadoc on balance class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"beed4e277ab87a56865f2feec2c41315f7618e61","isMergeCommit":false,"messageTitle":"Save the income and expense to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":0}}},{"hash":"30495ba61c5154c18acdbb12a2c764428fd20547","isMergeCommit":false,"messageTitle":"Get the incomes and expenses from txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":103,"deletions":0}}},{"hash":"44cc8ff64eed0b27d78091d1f94c36906df9c32b","isMergeCommit":false,"messageTitle":"Add javadoc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":56,"deletions":4}}},{"hash":"e1662d922f6415fc120ee9a46ec3707f937553f1","isMergeCommit":false,"messageTitle":"Style correction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":11}}},{"hash":"10a8106e93484afda5a7bb7cd116372428881158","isMergeCommit":true,"messageTitle":"Merge pull request #93 from KenCheung18/Storage-function","messageBody":"Storage function","fileTypesAndContributionMap":{}},{"hash":"26c32ef86ca87fb6f6602410781caa103fa14a10","isMergeCommit":false,"messageTitle":"Clear income function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":4}}},{"hash":"8a55003d9fe93008935363b856988d29a4ec29a0","isMergeCommit":false,"messageTitle":"Clear expense function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"cfbc0c5c9c5c2ef4805199276fcf827ff906dd42","isMergeCommit":false,"messageTitle":"Clear all and due with the user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":0}}},{"hash":"2194afadd9dd4b1617ef8cbd65f4fa2b2a11ca61","isMergeCommit":true,"messageTitle":"Merge pull request #94 from KenCheung18/Clear-function","messageBody":"Clear function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"76c95157c2e101d5b2ea291f63d431c02a2157d6","isMergeCommit":false,"messageTitle":"Create DG for GetFromTxt","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":0}}},{"hash":"7dfba6bfa646fc484614a76326af86af8d7ab514","isMergeCommit":true,"messageTitle":"Merge pull request #107 from KenCheung18/Developer-Guide-GetFromTxt","messageBody":"Create DG for GetFromTxt","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"limyuhching":{"docs":1,"functional-code":356,"test-code":278},"bljhty":{"docs":113,"functional-code":1185,"test-code":653,"other":5},"Hongzhii":{"docs":36,"functional-code":438,"test-code":9},"KenCheung18":{"docs":13,"functional-code":379,"test-code":0}},"authorContributionVariance":{"limyuhching":5166.6265,"bljhty":30981.291,"Hongzhii":3142.361,"KenCheung18":3382.1667},"authorDisplayNameMap":{"limyuhching":"CS2113-T18-3 LIM ..HING","bljhty":"CS2113-T18-3 LEE ..RYAN","Hongzhii":"CS2113-T18-3 EE H.. ZHI","KenCheung18":"CS2113-T18-3 CHEU..YUEN"}} +{"authorDailyContributionsMap":{"limyuhching":[{"date":"2023-10-12","commitResults":[{"hash":"7f15c328582d32d223482ccd59a5852f9ad70029","isMergeCommit":false,"messageTitle":"Add Lim Yuh Ching to AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-17","commitResults":[{"hash":"47e7e2474c8c6f73387b9dcd7047da3c77cb619e","isMergeCommit":false,"messageTitle":"Add ListCommand class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":59,"deletions":5}}},{"hash":"e176e64efb5cc74bcf08757e82020ae7bc9c656f","isMergeCommit":false,"messageTitle":"Add list option to parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"8a99e6a7dc43fd86423cf7046827ac5f7611f9fa","isMergeCommit":false,"messageTitle":"Add Ui to ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":2}}},{"hash":"54d292397684060fd65c2389c300dea0cb712504","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-list\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ea3da5f550569c65319ff4911fe9fed728a97e64","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/limyuhching/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n","fileTypesAndContributionMap":{}},{"hash":"fd506a278351582ab91f8f4b974b1db63765cfac","isMergeCommit":false,"messageTitle":"Change imports from .* to individual class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":7}}},{"hash":"9c3010789b6b2bc4f285263b77d6e56b0ce6988f","isMergeCommit":false,"messageTitle":"Add DeleteIncomeCommand and DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":1}}},{"hash":"ecdcbbe69b47d928a759d2cb81efe93cfa538c7b","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-delete\u0027","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n","fileTypesAndContributionMap":{}},{"hash":"3ae858c7a01d9a61a3e500510b79b26b23fe6a5c","isMergeCommit":false,"messageTitle":"Minor bug fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":5}}},{"hash":"69a33bbf033086dc0c4f8e2d314dff052227afd7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"939ddd821d709edc8b7e0f4c6e53bb8648e6a8d8","isMergeCommit":false,"messageTitle":"Remove duplicate import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"e7ee368b163df8c82a81ae2738e2f745f44b9846","isMergeCommit":false,"messageTitle":"Bug fixes - wrong indexing for delete command - inconsistent line divider","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":12}}},{"hash":"192a5b32be615e963b03f1bb584aa7eec161324d","isMergeCommit":true,"messageTitle":"Merge pull request #57 from limyuhching/master","messageBody":"Add list and delete feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"470e50657798752e0cea1cf681a1286ead745f62","isMergeCommit":false,"messageTitle":"Add JavaDoc and JUnit test for DeleteIncomeCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":2},"test-code":{"insertions":81,"deletions":0}}},{"hash":"4b8b9e883d87a6a56300486eb6a1e12affb1f7c1","isMergeCommit":false,"messageTitle":"Changed Ui output of ListCommand and DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":6}}},{"hash":"8585f39452170b750700c20306dd0bda7ef4eb7e","isMergeCommit":false,"messageTitle":"Debug style error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":3}}},{"hash":"6230bbe0816a74140c927ef9d79550a43ef2e0ec","isMergeCommit":false,"messageTitle":"Add JUnit and JavaDoc to DeleteExpenseCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":9},"test-code":{"insertions":82,"deletions":0}}},{"hash":"4db459d6ae7b6aeeb759152a49a039f92392198d","isMergeCommit":false,"messageTitle":"Add JavaDoc for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":0}}},{"hash":"385ced88b50c44c7f8f949dc3fb5fad30e859ffc","isMergeCommit":true,"messageTitle":"Merge pull request #84 from limyuhching/JUnit_DeleteIncomeCommand","messageBody":"Add JUnit for DeleteIncomeCommand","fileTypesAndContributionMap":{}},{"hash":"a675ae9e49ae0699e12bccf1e5ed6e3e76dd6703","isMergeCommit":true,"messageTitle":"Merge pull request #85 from limyuhching/JUnit_DeleteExpenseCommand","messageBody":"Add JUnit and JavaDoc to DeleteExpenseCommand","fileTypesAndContributionMap":{}},{"hash":"dc8741864a20266b1fb0e9bb10170d7dae995c8f","isMergeCommit":true,"messageTitle":"Merge branch \u0027JUnit_DeleteExpenseCommand\u0027 into Yuh.Ching-feature-edit","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"2a77405896563ecf112b2964f15f81df3b8eedbd","isMergeCommit":false,"messageTitle":"Feature: Edit Income and Expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":183,"deletions":13},"test-code":{"insertions":116,"deletions":0}}},{"hash":"752ff1c0afa5ea17df7e0bd3065ac353b0a6c410","isMergeCommit":true,"messageTitle":"Merge branch \u0027Yuh.Ching-feature-edit\u0027","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n#\tsrc/main/java/seedu/duke/parser/Parser.java\n#\tsrc/main/java/seedu/duke/ui/Ui.java\n#\ttext-ui-test/EXPECTED.TXT\n#\ttext-ui-test/input.txt\n","fileTypesAndContributionMap":{}},{"hash":"bbb14a8f04eac545603b09a5d59ad8163f6a35c0","isMergeCommit":true,"messageTitle":"Merge pull request #102 from limyuhching/master","messageBody":"Add Edit Feature","fileTypesAndContributionMap":{}}]}],"bljhty":[{"date":"2023-10-05","commitResults":[{"hash":"3647d84668028d5ea5c84d7627894a8ef0ee48fc","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-09","commitResults":[{"hash":"7e60ffed6f6e2ee9a0f983eee8e8a977406dfe5a","isMergeCommit":false,"messageTitle":"edited Duke class, added Ui class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"d8c20c9389f7a68369aa5fbbfd4ac33184a15975","isMergeCommit":false,"messageTitle":"Revert \"edited Duke class, added Ui class\"","messageBody":"This reverts commit 7e60ffed6f6e2ee9a0f983eee8e8a977406dfe5a.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":11}}},{"hash":"9543dee9ca0e62cad63e6cab349aa53372035467","isMergeCommit":false,"messageTitle":"Revert \"Revert \"edited Duke class, added Ui class\"\"","messageBody":"This reverts commit d8c20c9389f7a68369aa5fbbfd4ac33184a15975.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":14}}},{"hash":"e6e15fd5f670eda63cebf191b00c5da28f019d90","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":0}}}]},{"date":"2023-10-11","commitResults":[{"hash":"d68fb478567a1542650b85e6563e6f62f641bdce","isMergeCommit":true,"messageTitle":"Merge pull request #4 from bljhty/master","messageBody":"Ui class added","fileTypesAndContributionMap":{}},{"hash":"fd522121b4dfe8c849d157c5273ea54a0aefefdd","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"d74d0e8d3dd1acfc47f1f94b3a55afe1245cef5b","isMergeCommit":true,"messageTitle":"Merge pull request #5 from bljhty/Bryan-Ui_Class","messageBody":"Bryan UI class","fileTypesAndContributionMap":{}},{"hash":"ac5e4bffd283c4ada16e720a489c48f40cf62d45","isMergeCommit":false,"messageTitle":"added parser class and \"bye\" command to exit the program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":2}}},{"hash":"146c1e73d2ce3c3bba44f73c548c824cd6bad416","isMergeCommit":true,"messageTitle":"Merge pull request #6 from bljhty/Bryan-Ui_exit_program","messageBody":"added parser class and \"bye\" command to exit the program","fileTypesAndContributionMap":{}},{"hash":"023a67aa11129e7329f57d108d4b3b071f4dfd7a","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"1e769fe7348a49764e97958bee02138b848c4078","isMergeCommit":false,"messageTitle":"edited code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"56a91fa04831b1e06d8763d46b71d127c4ed2a00","isMergeCommit":false,"messageTitle":"edited code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":10}}},{"hash":"2dd7e20d1facad6c28ac218229a49e0d2512af1a","isMergeCommit":true,"messageTitle":"Merge pull request #7 from bljhty/Bryan-Ui_exit_program","messageBody":"Bryan UI exit program","fileTypesAndContributionMap":{}},{"hash":"bd4a31df6e42d5a903c4fab01439db31d962cf18","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"4e8e8a23056ebd8406321216403edf432b6999e9","isMergeCommit":true,"messageTitle":"Merge pull request #8 from bljhty/Bryan-Ui_exit_program","messageBody":"Bryan minor changes to code","fileTypesAndContributionMap":{}},{"hash":"d0d3b91db4ee5e0246a08beb19f6d5bf1becd689","isMergeCommit":false,"messageTitle":"added KaChinng exception class to handle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":32,"deletions":15}}},{"hash":"15235a31b2217e9e7340ec3c94e4760276fa7bb6","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":9}}},{"hash":"402c958dcd6b25b20d588adf6d488ef738dadc52","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}},{"hash":"d3432fa63e6626dd7c9834b0f3c44216ed6a2d2d","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1}}},{"hash":"839899344f669c73d5f8ff23d80e68b66f3e60f5","isMergeCommit":false,"messageTitle":"edited test.sh","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"b384a0a035717caa270226c388abfdc1da60cf7c","isMergeCommit":true,"messageTitle":"Merge pull request #19 from bljhty/Bryan-kachingg_exception_class","messageBody":"Bryan kachingg exception class","fileTypesAndContributionMap":{}},{"hash":"032e9e794b6cad89ea6eab4b8dbe01458b253726","isMergeCommit":false,"messageTitle":"edited aboutus page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"03fd6b2bd1462b8d3696fd96ae44264b386963fa","isMergeCommit":true,"messageTitle":"Merge pull request #20 from bljhty/Bryan-edit_about_us","messageBody":"edited aboutus page","fileTypesAndContributionMap":{}}]},{"date":"2023-10-12","commitResults":[{"hash":"873f424ba9981398334f6299fda0bc3cceb73103","isMergeCommit":true,"messageTitle":"Merge pull request #24 from limyuhching/master","messageBody":"Add Lim Yuh Ching to AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"28a6c552f73b92cece6ec576f68cab9a4f665f0b","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"fac1c519c857b496309e7fe6af4af67b5e73d7e6","isMergeCommit":true,"messageTitle":"Merge pull request #26 from bljhty/Bryan-UI_class_updated","messageBody":"Bryan UI class added","fileTypesAndContributionMap":{}},{"hash":"0aac2612fa5b3b29db3f83bd3f56e9d3df220408","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"dd4c190f169c56878ea072be5116d0ab299b302b","isMergeCommit":true,"messageTitle":"Merge pull request #30 from bljhty/Bryan-ParserClass","messageBody":"Bryan Parser Class","fileTypesAndContributionMap":{}},{"hash":"6e5a21ee4c8e1734c7a134cbf4c1f681fad66fef","isMergeCommit":false,"messageTitle":"Added income class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":0}}},{"hash":"2d31a0a186af6541c21ffa13d5f7f60da9eaccc8","isMergeCommit":false,"messageTitle":"edited income class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":13}}},{"hash":"3fa46fa0749d6bbaab94cbee2f3ca66b93b9da1f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from bljhty/Bryan-IncomeClass","messageBody":"Bryan income class","fileTypesAndContributionMap":{}},{"hash":"e723c830357b03fc0f01f9d145be1a1d3417c7ed","isMergeCommit":false,"messageTitle":"added commands class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"other":{"insertions":2,"deletions":2}}},{"hash":"41eee99740159c15d92884ce1b22bbc2149337a6","isMergeCommit":true,"messageTitle":"Merge pull request #33 from bljhty/Bryan-commandsClass","messageBody":"added commands class","fileTypesAndContributionMap":{}},{"hash":"2ef7421ecd90522a7f5746a96af22b928cc9a5e3","isMergeCommit":false,"messageTitle":"added the add income functionality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":138,"deletions":1}}},{"hash":"0de2467e5781906407d226b74596b4b404c645f6","isMergeCommit":true,"messageTitle":"Merge pull request #35 from bljhty/Bryan-AddIncomeFunction","messageBody":"added the add income functionality","fileTypesAndContributionMap":{}},{"hash":"c1415803bafbc7e40a5307c457495e1e36b2ecd5","isMergeCommit":false,"messageTitle":"added JUnit test for income","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":0}}},{"hash":"029f86a4fc3183c74920521dd3dcee4cceebab78","isMergeCommit":true,"messageTitle":"Merge pull request #37 from bljhty/Bryan-AddIncomeJunit","messageBody":"added JUnit test for income","fileTypesAndContributionMap":{}},{"hash":"f7be2e6b37b7ffaf6f44b59e7a24debacf9c71fb","isMergeCommit":false,"messageTitle":"added the list income function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":0}}},{"hash":"95034b9c866c415fcfdc3c484ee9bb03b07f4822","isMergeCommit":true,"messageTitle":"Merge pull request #38 from bljhty/Bryan-ListCommand","messageBody":"added the list income function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"3f5c8ecd561ac20483518ba49f808358d9a31ba6","isMergeCommit":false,"messageTitle":"Added JUnit Test for income parser class,","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":54,"deletions":0}}},{"hash":"efecaa2ff6828936f318ec93f7fbbaf73b07cc47","isMergeCommit":true,"messageTitle":"Merge pull request #41 from bljhty/Bryan-AddJUnitTestIncomeParser","messageBody":"Added JUnit Test for income parser class edit minor bugs in expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"b96b8820f857121283457a520bfb762ef2ca2c6c","isMergeCommit":false,"messageTitle":"minor bug fixing and added javadoc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":207,"deletions":6}}},{"hash":"a70966392c50aeb619d6895abd2a93f46c66e25a","isMergeCommit":true,"messageTitle":"Merge pull request #45 from bljhty/Bryan-bug_fixing","messageBody":"minor bug fixing and added javadoc","fileTypesAndContributionMap":{}},{"hash":"71eb946d765b405e018d22d60330e083e2a3bf13","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":174},"other":{"insertions":0,"deletions":0}}},{"hash":"b8a856dcc26db8ede044ef2bcac0852bcdb3838e","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":174,"deletions":0}}},{"hash":"0789a529e66efa74edc3ba2583b1152f5bd69e45","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"57b072ff69089aa71edecde0e12ab91907656d56","isMergeCommit":true,"messageTitle":"Merge pull request #46 from bljhty/Bryan-bug_fixing","messageBody":"Bryan bug fixing","fileTypesAndContributionMap":{}},{"hash":"c90e926cc7b8751df51dfe7387c0ceacd15a7845","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"dcf55f397a5193fa02c0554cb721f55d6a3c6beb","isMergeCommit":true,"messageTitle":"Merge pull request #48 from bljhty/master","messageBody":"no message","fileTypesAndContributionMap":{}},{"hash":"ac5acc3ceba4fdb5cbc729e88eab16b5edd239d0","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"8f9b494475f77182a35a655b40d0fefb1fcade21","isMergeCommit":true,"messageTitle":"Merge pull request #50 from bljhty/master","messageBody":"no message","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"34f306cc9e5ca4ef28e89e0e87179ab88d3256cf","isMergeCommit":false,"messageTitle":"edited testsh and expected output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"670b7ab465c3ec3436b883f873cac7cfdc7acd24","isMergeCommit":true,"messageTitle":"Merge pull request #60 from bljhty/Bryan-edit_testsh","messageBody":"edited testsh and expected output","fileTypesAndContributionMap":{}},{"hash":"c6c923f637432277043fe840fd3fbb92c8a7ef25","isMergeCommit":false,"messageTitle":"added JUnit test for expenseparser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":1},"test-code":{"insertions":183,"deletions":0}}},{"hash":"aac9e86c2c1b463fa8173ffe62fba62f4b6a2ef0","isMergeCommit":true,"messageTitle":"Merge pull request #63 from bljhty/Bryan-Expense_parser_Junit","messageBody":"added JUnit test for expenseparser class","fileTypesAndContributionMap":{}},{"hash":"15fed349abbdcd95755be03abeea18551923713e","isMergeCommit":false,"messageTitle":"updated JUnit for income parser, added javadoc for both expense parsertest and incomeParserTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":2},"test-code":{"insertions":202,"deletions":12}}},{"hash":"a06eab9c52dfff4de8d0dbdb26bc4e9b3e10f380","isMergeCommit":true,"messageTitle":"Merge pull request #64 from bljhty/Bryan-income_parser_Junit_updated","messageBody":"updated JUnit for income parser, added javadoc for both expense parse…","fileTypesAndContributionMap":{}},{"hash":"762b83d89c0b39cc91a5d31d4ad2a67e1b0b36f3","isMergeCommit":false,"messageTitle":"added expense JUnit test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":69,"deletions":0}}},{"hash":"1d5706ae2c956e8475671e773ef038d27cd7c6d8","isMergeCommit":true,"messageTitle":"Merge pull request #67 from bljhty/Bryan-expenseTest","messageBody":"added expense JUnit test","fileTypesAndContributionMap":{}},{"hash":"97a9b3858d57d9a4bd339e98ed54c363175e83f4","isMergeCommit":false,"messageTitle":"added balanceTest and javadoc comments for balanceTest and expenseTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":117,"deletions":0}}},{"hash":"433aeba0e3f9ff256e9e6b065a78e1b4f7f5c7e7","isMergeCommit":true,"messageTitle":"Merge pull request #70 from bljhty/Bryan-balanceTest","messageBody":"added balanceTest and javadoc comments for balanceTest and expenseTest","fileTypesAndContributionMap":{}},{"hash":"e76caab50cc07de5b2bc2c5f80489b2d90c27f1b","isMergeCommit":false,"messageTitle":"change \"bye\" to \"exit\" to exit the program","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"e6badcdf8a009ff91209efb521c0b17f9286079b","isMergeCommit":true,"messageTitle":"Merge pull request #71 from bljhty/Bryan-balanceTest","messageBody":"change \"bye\" to \"exit\" to exit the program","fileTypesAndContributionMap":{}},{"hash":"03b17833325f95216af8857e242d3b5af65f5219","isMergeCommit":false,"messageTitle":"added logging and assertions for incomeLister, Income, incomeManager, FinancialRecord, IncomeParser and Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":13},"other":{"insertions":4,"deletions":0}}},{"hash":"4ee809172b0d94fa8ca80d620d1a4bd10557de51","isMergeCommit":true,"messageTitle":"Merge pull request #73 from bljhty/Bryan-logging_and_assertions","messageBody":"added logging and assertions for incomeLister, Income, incomeManager,…","fileTypesAndContributionMap":{}},{"hash":"6bbab986b5e67c176ec482d39cf69b3c983c5e5f","isMergeCommit":false,"messageTitle":"updated userguide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":80,"deletions":18}}},{"hash":"6edfa2b4c4816e4386bf978ec444c8e680f003c0","isMergeCommit":true,"messageTitle":"Merge pull request #74 from bljhty/Bryan-UserGuide_update","messageBody":"updated userguide","tags":["KaChinnnngv1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"62b94094ee4923eefe2d4b8c4d1cefc02f85ed08","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":5}}},{"hash":"37718df880e8caf3a75c0f1c6e3565e6d2642bf2","isMergeCommit":true,"messageTitle":"Merge pull request #75 from bljhty/Bryan-EditCode","messageBody":"no message","fileTypesAndContributionMap":{}},{"hash":"bfd698b4dd26861ced11ba5ea65704c8bb1a847d","isMergeCommit":false,"messageTitle":"edited bug where logger information is being displayed in the output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":5}}}]},{"date":"2023-10-23","commitResults":[{"hash":"7d763fd902700e4578442d4de7ba7cefd9c09411","isMergeCommit":false,"messageTitle":"added the find function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":75,"deletions":22}}},{"hash":"3f46ad0f1c25480383c5cb30df8dcda0af1ef9e2","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":235,"deletions":0}}},{"hash":"a8cdf9a8a14b68c448977a80a12185508edc01cf","isMergeCommit":true,"messageTitle":"Merge pull request #87 from bljhty/Bryan-Find_function","messageBody":"Bryan find function","fileTypesAndContributionMap":{}},{"hash":"39b7a99a518e790ecf6dd123857df4caab783b36","isMergeCommit":false,"messageTitle":"made it such that the log file will be in a folder instead","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":4}}},{"hash":"7cc042582af15a30ae4e2af2394a3a460eb27e82","isMergeCommit":true,"messageTitle":"Merge pull request #88 from bljhty/Bryan-log_fixing","messageBody":"made it such that the log file will be in a folder instead","fileTypesAndContributionMap":{}},{"hash":"6ff08dd325033acea8bf60352d53eda3ef747616","isMergeCommit":false,"messageTitle":"clean up income manager class and change input formats","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":18}}},{"hash":"10a9c5009055e8bd38e4fe5031d2d4467dd0e41a","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"24ab533265f7e3716b86eb8331f978e71c3a4734","isMergeCommit":true,"messageTitle":"Merge pull request #90 from bljhty/Bryan-edit_IncomeManager","messageBody":"Bryan edit income manager","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"8636ab7ee8656732e70f001cefbaeb15ee4ee6cb","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":36}}},{"hash":"7eb3bc044234d200d13e2442a134686f1e191bbb","isMergeCommit":true,"messageTitle":"Merge pull request #91 from bljhty/Bryan-logging+assertion_findcommand","messageBody":"added logging and assertions to findCommand class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"106754518beae746363af4b8c58c0193c9674ba4","isMergeCommit":false,"messageTitle":"added DG for incomeManager","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":6},"docs":{"insertions":10,"deletions":0}}},{"hash":"1d7a839da12b7de630333477f4fbbed1adfc6797","isMergeCommit":true,"messageTitle":"Merge pull request #95 from bljhty/Bryan-updating_developerguide","messageBody":"added DG for incomeManager","fileTypesAndContributionMap":{}},{"hash":"5b832a32301924c877b0fb2ef0598806b54b234e","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0},"docs":{"insertions":25,"deletions":5}}},{"hash":"e7dd967864e94d72cc75560ded319bc5e2c2ad28","isMergeCommit":true,"messageTitle":"Merge pull request #101 from bljhty/Bryan-updating_developerguide(2)","messageBody":"updated UserGuide for FindCommand class and edited code snippets","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"56a7e40cb4436f0d20b0ad0e33ce1272451cea1b","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":68,"deletions":8}}}]},{"date":"2023-10-27","commitResults":[{"hash":"5b1224aa7da13e18d1570d4b4a09dc4f20e20c14","isMergeCommit":true,"messageTitle":"Merge pull request #103 from bljhty/Bryan-FincCommand_JavaDoc","messageBody":"added javadoc comments for FindCommands","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"b05cd0f22923c8b7d7ae4b9243a60fda79d97f4c","isMergeCommit":false,"messageTitle":"Added JUnit test for find command and handled bugs related to find command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":64,"deletions":25}}},{"hash":"01438403a54ddeaf1132179c5d490712d6d4d031","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":464,"deletions":0}}},{"hash":"09cfe83656699dd449f045a0b1f748e1ef641c1e","isMergeCommit":true,"messageTitle":"Merge pull request #104 from KenCheung18/Javadoc-for-clear-function","messageBody":"Javadoc for clear function","fileTypesAndContributionMap":{}},{"hash":"ec4f5e59793333273e142ceb6ad2c8351ef73f58","isMergeCommit":true,"messageTitle":"Merge pull request #108 from bljhty/Bryan-FindCommand_Test","messageBody":"Bryan find command test","fileTypesAndContributionMap":{}}]}],"Hongzhii":[{"date":"2023-10-12","commitResults":[{"hash":"374988e8cd3295fcc475bc7750fb4b9fb00876cb","isMergeCommit":false,"messageTitle":"add expense class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":0}}},{"hash":"e2c1a08d38fb0980168c121d98f9a550d41908d9","isMergeCommit":true,"messageTitle":"Merge pull request #39 from Hongzhii/add-expense-class","messageBody":"add expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"fdb794183e31163e1516dff81559a932400e697b","isMergeCommit":false,"messageTitle":"add expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":299,"deletions":2}}},{"hash":"f9620e70b7be8738cd6fad83aac026b9a6e3ac86","isMergeCommit":false,"messageTitle":"fix coding standards issue","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}}]},{"date":"2023-10-16","commitResults":[{"hash":"098a0492e5d4180fdc5f363384f4dad966b685fd","isMergeCommit":true,"messageTitle":"Merge pull request #43 from Hongzhii/add-expense-class","messageBody":"create different expense categories","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"d0a0911eb6616b1d618539343913144ab3b96c0f","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/Hongzhii/tp into add-expense-class","messageBody":"* \u0027master\u0027 of https://github.com/Hongzhii/tp:\n no message\n no message\n no message\n no message\n no message\n minor bug fixing and added javadoc\n add the help function\n\n# Conflicts:\n#\tsrc/main/java/seedu/duke/Duke.java\n#\tsrc/main/java/seedu/duke/commands/ExpenseLister.java\n#\tsrc/main/java/seedu/duke/commands/ExpenseManager.java\n#\tsrc/main/java/seedu/duke/parser/ExpenseParser.java\n#\tsrc/main/java/seedu/duke/parser/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"6dc33217fab2dad56a7817bcdf9c0bb669e527f4","isMergeCommit":true,"messageTitle":"Merge pull request #52 from Hongzhii/add-expense-class","messageBody":"Add expense class","fileTypesAndContributionMap":{}},{"hash":"2982cf9151c17da188b454e61f5d05a6f1bcd26c","isMergeCommit":true,"messageTitle":"Merge pull request #51 from AY2324S1-CS2113-T18-3/add-expense-class","messageBody":"Add expense class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"ab30caec1cd31ad109d5be413d60a431098f662a","isMergeCommit":false,"messageTitle":"add java doc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":110,"deletions":8}}},{"hash":"c6826012f1f2fa18afe80e27196b98d85a2da144","isMergeCommit":false,"messageTitle":"fix coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"303628c0a8d489a99a106bfe47ec1b5fd3100075","isMergeCommit":true,"messageTitle":"Merge pull request #66 from Hongzhii/master","messageBody":"add java doc","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"7ee4535ebcf6a796938d1ad67f2ab82ca0537831","isMergeCommit":true,"messageTitle":"Merge pull request #82 from bljhty/Bryan_LOGGING_bug","messageBody":"edited bug where logger information is being displayed in the output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"57091e1603dc4a51c8d4bfa9a65bada3c4bbec1b","isMergeCommit":false,"messageTitle":"change toString method to include enum type information","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"64994adc4f2dd4af9b021e5f8dae61fbd6298882","isMergeCommit":false,"messageTitle":"update parser and expense manager","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":41,"deletions":11}}},{"hash":"8b2ce625f1678c12fc73a87d1a8be704963c151e","isMergeCommit":false,"messageTitle":"update unit tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":5},"test-code":{"insertions":9,"deletions":5}}},{"hash":"e3becbb79486d7af284a270c67bc444fe990a487","isMergeCommit":true,"messageTitle":"Merge branch \u0027add-type-functionality-to-expenses\u0027","messageBody":"* add-type-functionality-to-expenses:\n update unit tests\n update i/o tests\n update parser and expense manager\n change toString method to include enum type information\n","fileTypesAndContributionMap":{}},{"hash":"e0ff3d162d26673c9bdac78b0a8713dd7e4ed7b8","isMergeCommit":true,"messageTitle":"Merge pull request #105 from Hongzhii/master","messageBody":"add type functionality to expenses","fileTypesAndContributionMap":{}},{"hash":"15dda310b6cb156064f1f84aaa80d58b27f774eb","isMergeCommit":false,"messageTitle":"update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":36,"deletions":0}}},{"hash":"fd1e0031d8dfc29a95d461b467eda6a3eeff737b","isMergeCommit":true,"messageTitle":"Merge branch \u0027update-developer-guide\u0027","messageBody":"* update-developer-guide:\n update developer guide\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"356e34b25e6d229286bcd1070a0fd092ec09c2c5","isMergeCommit":true,"messageTitle":"Merge pull request #106 from Hongzhii/master","messageBody":"update DG","fileTypesAndContributionMap":{}}]}],"KenCheung18":[{"date":"2023-10-05","commitResults":[{"hash":"ff771b65c44f9dd8452f28d33c98131f6ebdaca3","isMergeCommit":false,"messageTitle":"AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"169d557cd8aeb41bfc052c8baa84595ffdfb91a6","isMergeCommit":true,"messageTitle":"Merge pull request #3 from KenCheung18/AboutUs","messageBody":"AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"329946ddf88f470e861a65d067db83b89ac74e38","isMergeCommit":false,"messageTitle":"add the help function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":0}}},{"hash":"4451eda2b70e6fac03872dd33858a8d24c486e4c","isMergeCommit":true,"messageTitle":"Merge pull request #44 from KenCheung18/Usage-instructions","messageBody":"add the help function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"bcae9628b344bc6cb291a079aca607faff1fe7db","isMergeCommit":false,"messageTitle":"Solve conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"85c13e1244776c0f0866cdcce5a35676a6c27715","isMergeCommit":false,"messageTitle":"Solve another conflict","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":3}}},{"hash":"10b6b25ca6c8901d81089ea4d3f1914ea47a41df","isMergeCommit":false,"messageTitle":"Solve minor bug on switch statement","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"d92551230ce733460145529d1b989be404f9e7d2","isMergeCommit":true,"messageTitle":"Merge pull request #53 from KenCheung18/Bug-solve-for-expense-class","messageBody":"Solve merge conflict","fileTypesAndContributionMap":{}},{"hash":"963101c37e2e2463d2b56dbbc75f772ae778bee2","isMergeCommit":false,"messageTitle":"Balance Function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":0}}},{"hash":"b61608b37db593b319f5b214c27c1ed7a2a47202","isMergeCommit":false,"messageTitle":"Minor bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"fb0d1b79960c19af7b291b56b8cd9925b24cb710","isMergeCommit":true,"messageTitle":"Merge pull request #58 from KenCheung18/Balance","messageBody":"Balance Function","fileTypesAndContributionMap":{}},{"hash":"f186609c39c31189eeeebeb89d7dc00b32bea648","isMergeCommit":false,"messageTitle":"Bug fix on balance function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"2796193e5f7ec9efb7eb8c7f92d5ae2b26eadea0","isMergeCommit":true,"messageTitle":"Merge pull request #59 from KenCheung18/Balance-bug-fix","messageBody":"Bug fix on balance function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"39b92cb3edb128ffb3386d0d23a3d6a3a9e47010","isMergeCommit":false,"messageTitle":"javadoc for Balance and UsageInstructions class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":1}}},{"hash":"e8cbb9f2e94ac946debabad31cd1e21edd590e4a","isMergeCommit":false,"messageTitle":"minor bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"b33182fbf46985067b73ce658ac1e1b8966a7a07","isMergeCommit":false,"messageTitle":"javadoc bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"2e540a1baf3784a8c9fff244e353199805ff168c","isMergeCommit":true,"messageTitle":"Merge pull request #65 from KenCheung18/Balance-add-javadoc","messageBody":"Add javadoc on balance class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"beed4e277ab87a56865f2feec2c41315f7618e61","isMergeCommit":false,"messageTitle":"Save the income and expense to txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":66,"deletions":0}}},{"hash":"30495ba61c5154c18acdbb12a2c764428fd20547","isMergeCommit":false,"messageTitle":"Get the incomes and expenses from txt file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":103,"deletions":0}}},{"hash":"44cc8ff64eed0b27d78091d1f94c36906df9c32b","isMergeCommit":false,"messageTitle":"Add javadoc","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":56,"deletions":4}}},{"hash":"e1662d922f6415fc120ee9a46ec3707f937553f1","isMergeCommit":false,"messageTitle":"Style correction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":11}}},{"hash":"10a8106e93484afda5a7bb7cd116372428881158","isMergeCommit":true,"messageTitle":"Merge pull request #93 from KenCheung18/Storage-function","messageBody":"Storage function","fileTypesAndContributionMap":{}},{"hash":"26c32ef86ca87fb6f6602410781caa103fa14a10","isMergeCommit":false,"messageTitle":"Clear income function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":38,"deletions":4}}},{"hash":"8a55003d9fe93008935363b856988d29a4ec29a0","isMergeCommit":false,"messageTitle":"Clear expense function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":0}}},{"hash":"cfbc0c5c9c5c2ef4805199276fcf827ff906dd42","isMergeCommit":false,"messageTitle":"Clear all and due with the user input","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":30,"deletions":0}}},{"hash":"2194afadd9dd4b1617ef8cbd65f4fa2b2a11ca61","isMergeCommit":true,"messageTitle":"Merge pull request #94 from KenCheung18/Clear-function","messageBody":"Clear function","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"89ad03ea042f3777bf018efe75838c4e3d533edc","isMergeCommit":false,"messageTitle":"Javadoc for clear expense class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":0}}},{"hash":"d3c68cf8dd447bca268780ceaf2d82c7418d0e27","isMergeCommit":false,"messageTitle":"javadoc for clear income class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":2}}},{"hash":"cddaafdf18b36955f4abd56100af401907d41ae9","isMergeCommit":false,"messageTitle":"javadoc for clear all class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":4}}}]},{"date":"2023-10-27","commitResults":[{"hash":"76c95157c2e101d5b2ea291f63d431c02a2157d6","isMergeCommit":false,"messageTitle":"Create DG for GetFromTxt","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":0}}},{"hash":"7dfba6bfa646fc484614a76326af86af8d7ab514","isMergeCommit":true,"messageTitle":"Merge pull request #107 from KenCheung18/Developer-Guide-GetFromTxt","messageBody":"Create DG for GetFromTxt","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"limyuhching":{"docs":1,"functional-code":356,"test-code":278},"bljhty":{"docs":113,"functional-code":1225,"test-code":1117,"other":5},"Hongzhii":{"docs":36,"functional-code":437,"test-code":9},"KenCheung18":{"docs":13,"functional-code":419,"test-code":0}},"authorContributionVariance":{"limyuhching":4917.5093,"bljhty":35344.12,"Hongzhii":2989.4736,"KenCheung18":3246.9167},"authorDisplayNameMap":{"limyuhching":"CS2113-T18-3 LIM ..HING","bljhty":"CS2113-T18-3 LEE ..RYAN","Hongzhii":"CS2113-T18-3 EE H.. ZHI","KenCheung18":"CS2113-T18-3 CHEU..YUEN"}} diff --git a/AY2324S1-CS2113-T18-4_tp_master/authorship.json b/AY2324S1-CS2113-T18-4_tp_master/authorship.json index 83e472b..fc13512 100644 --- a/AY2324S1-CS2113-T18-4_tp_master/authorship.json +++ b/AY2324S1-CS2113-T18-4_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" mainClass.set(\"seedu.nuscents.Nuscents\")","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" archiveBaseName.set(\"nuscents\")","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":"run {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":6,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"--------|:--------------:|:-------------------------------------------:|:---------:","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"aaronxujiachen"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Xu JiaChen | [Github](https://github.com/aaronxujiachen) | [Portfolio](docs/team/xujiachen.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Joshua Lim | [Github](https://github.com/lckjosh) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Chung Zhi Xuan | [Github](https://github.com/spaceman03) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"choonkit-nus"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ong Choon Kit | [Github](https://github.com/choonkit-nus) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Huang Huiling | [Github](https://github.com/vvhuiling) | [Portfolio](docs/team/huiling.md)","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"aaronxujiachen":1,"spaceman03":1,"lckjosh":2,"-":3,"choonkit-nus":1,"vvhuiling":1}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"## Design","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"## **Implementation**","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"### Add transaction feature","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"The add transaction feature is facilitated by the `Parser` class which parses user input and creates a `Expense` or","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"`Allowance` object which extends from the `Transaction` class. The created `Transaction` object will be stored in a ","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"`TransactionList`.","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"Given below is an example usage scenario and how the add transaction mechanism behaves at each step.","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"Step 1. The user launches the application for the first time. The `TransactionList` will be initialized.","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"Step 2. The user executes `expense /amt 20 /date 24-10-2023 /desc Lunch /note Pasta /cat Food` command to create a","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"transaction. The `expense` command calls `Parser#parseExpense()` to create an `Expense` object. The ","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"`AddCommand#execute()` is then called to store the `Expense` object in the `TransactionList`.","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"The following sequence diagram shows how the add transaction operation works:","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"\u003cimg src\u003d\"images/AddTransactionSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"vvhuiling"},"content":"### View transaction feature","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"vvhuiling"},"content":"In this section, I will describe the implementation of the \"View Transaction\" feature which allows users to ","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"vvhuiling"},"content":"view transaction details by specifying an index.","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"choonkit-nus"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"vvhuiling"},"content":"#### I. Architecture-Level Design","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"vvhuiling"},"content":"The \"View Transaction\" feature primarily involves the following components:","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"1. Parser: Responsible for interpreting user input and generating a ViewCommand object.","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"vvhuiling"},"content":"2. ViewCommand: A subclass of the Command class, created by the Parser to represent the \"view\" command.","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":"3. Nuscents: The main application class that receives and executes commands. It invokes the execute() method of the ViewCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"vvhuiling"},"content":"4. TransactionList: A data structure to store and manage transactions.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"vvhuiling"},"content":"5. Transaction: Represents individual transactions.","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"vvhuiling"},"content":"6. UI: Handles user interface and messaging.","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"choonkit-nus"},"content":"#### II. Component-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"vvhuiling"},"content":"1. Parser","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"vvhuiling"},"content":"The Parser class identifies the \"view\" command and extracts the taskIndex (transaction index) from the user\u0027s input.","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"vvhuiling"},"content":"2. ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"vvhuiling"},"content":"The ViewCommand object is created by the Parser. It encapsulates the user\u0027s request to view a specific transaction. This object is passed to the Nuscents class for execution.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"vvhuiling"},"content":"3. Nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"vvhuiling"},"content":"In the Nuscents class, the execute() method of the ViewCommand is called, and the taskIndex is extracted from the command. It then calls the viewTransaction(taskIndex) method on the TransactionList.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"vvhuiling"},"content":"4. TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"vvhuiling"},"content":"The TransactionList contains a list of Transaction objects. The viewTransaction(taskIndex) method retrieves the specific Transaction object based on the taskIndex.","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"vvhuiling"},"content":"5. Transaction","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"vvhuiling"},"content":"The Transaction class represents an individual transaction, and it contains all the relevant details of a transaction.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"vvhuiling"},"content":"6. UI","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"vvhuiling"},"content":"The UI class displays the transaction details using the UI.showTransactionViewMessage method, which receives the Transaction object as input and presents the detailed transaction information to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"vvhuiling"},"content":"#### III. Alternatives Considered","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"vvhuiling"},"content":"While the current design is deemed suitable for our application, we did consider alternative approaches, such as ","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"vvhuiling"},"content":"integrating the view transaction functionality directly within the Nuscents class without introducing a ViewCommand. ","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"vvhuiling"},"content":"However, we opted for the current design to promote a cleaner separation of concerns and to facilitate future expansions ","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"vvhuiling"},"content":"and modifications.","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"vvhuiling"},"content":"The following sequence diagram shows how the add transaction operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"vvhuiling"},"content":"\u003cimg src\u003d\"images/ViewSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":80,"author":{"gitId":"lckjosh"},"content":"### List transactions feature","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"lckjosh"},"content":"The list transaction feature is facilitated by the `Parser` class which parses user input and creates a new","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"lckjosh"},"content":"`ListCommand` object. The `ListCommand` object will get all the transactions in the `TransactionList` and display them ","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"lckjosh"},"content":"to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"lckjosh"},"content":"Given below is the example usage scenario and how the list transaction mechanism behaves at each step.","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"lckjosh"},"content":"Step 1. The user launches the application. The `TransactionList` will be initialized with the transactions stored in ","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"lckjosh"},"content":"the `nuscents.txt` file. If the file is empty or does not exist, the `TransactionList` will be empty. ","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":"Step 2. The user executes `list` command to list the transactions. The `list` command calls `ListCommand#execute()`, ","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":"which gets the transactions from the `TransactionList` and displays them to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"lckjosh"},"content":"The following sequence diagram shows how the list transaction operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"lckjosh"},"content":"\u003cimg src\u003d\"images/ListTransactionSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"choonkit-nus"},"content":"In addition to that, the list transaction feature further computes and displays the net balance amount based on the ","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"choonkit-nus"},"content":"following formula (net balance \u003d total allowance amount - total expense amount). The `showTransactionList()` method in ","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"choonkit-nus"},"content":"the `Ui` class, it utilizes the float `netBalance` to store the net balance amount. When the `TransactionList` is","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"choonkit-nus"},"content":"iterated to print the transactions, it does a simple calculation based on whether it is an allowance or expense, to add","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"choonkit-nus"},"content":"or minus off respectively from the net balance.","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"aaronxujiachen"},"content":"### `helpCommand` Feature","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"aaronxujiachen"},"content":"#### I. Architecture-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"aaronxujiachen"},"content":"The `helpCommand` feature serves as an informative component to assist users unfamiliar with the application commands. It integrates the following components:","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"aaronxujiachen"},"content":"1. **Parser**: Determines if the user input matches the `help` command.","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"aaronxujiachen"},"content":"2. **HelpCommand**: A subclass of the Command class. Represents the `help` command, and provides command details when executed.","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"aaronxujiachen"},"content":"3. **Nuscents**: The main application class that receives and executes commands. It invokes the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"aaronxujiachen"},"content":"4. **UI**: Manages user interface interactions, such as displaying the help menu.","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"aaronxujiachen"},"content":"#### II. Component-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"aaronxujiachen"},"content":"1. **Parser**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"aaronxujiachen"},"content":" The `Parser` class recognizes the user\u0027s intention to access the help menu through the `help` keyword.","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"aaronxujiachen"},"content":"2. **HelpCommand**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"aaronxujiachen"},"content":" When the `Parser` identifies a `help` command, it instantiates a `HelpCommand` object. This object encapsulates the user\u0027s request to view the command instructions.","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"aaronxujiachen"},"content":"3. **Nuscents**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"aaronxujiachen"},"content":" Upon receiving the `HelpCommand` object, the `Nuscents` class triggers the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":123,"author":{"gitId":"aaronxujiachen"},"content":"4. **UI**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":124,"author":{"gitId":"aaronxujiachen"},"content":" The `UI` class is then responsible for fetching the `HELP_MENU` static string from the `HelpCommand` class and displaying it to the user. This ensures the user receives a comprehensive list of commands available in the application.","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":126,"author":{"gitId":"aaronxujiachen"},"content":"#### III. Alternatives Considered","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"aaronxujiachen"},"content":"Initially, we pondered over embedding the help details directly within the main application class, `Nuscents`. This would eliminate the need for a separate `HelpCommand` class. However, segregating the `HelpCommand` ensures better modularity, making future expansions or modifications seamless.","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"aaronxujiachen"},"content":"### `helpCommand` Usage Scenario","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"aaronxujiachen"},"content":"1. **Step 1**: The user launches the application. The initial screen appears.","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"aaronxujiachen"},"content":"2. **Step 2**: Unsure of the commands, the user inputs the `help` command.","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"aaronxujiachen"},"content":"3. **Step 3**: The application recognizes the command through the `Parser` and creates a `HelpCommand` object.","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"aaronxujiachen"},"content":"4. **Step 4**: The `Nuscents` class invokes the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"aaronxujiachen"},"content":"5. **Step 5**: The `UI` fetches the `HELP_MENU` string and displays the comprehensive list of commands to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":138,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":140,"author":{"gitId":"choonkit-nus"},"content":"### Target user profile","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"choonkit-nus"},"content":"SOC students at NUS who are tech-savvy, with limited allowance to monitor their finances and expense management","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"choonkit-nus"},"content":"while balancing aspects of university-life, academics and social activities. SOC students are known to be familiar with ","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"choonkit-nus"},"content":"CLI applications, which are often built to be efficient and clutter-free.","lastModifiedDate":"2023-10-27"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":145,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":146,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":147,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":148,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":149,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":150,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":151,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":152,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":154,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":155,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":157,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":158,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":160,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":161,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"aaronxujiachen":33,"spaceman03":19,"lckjosh":17,"-":31,"vvhuiling":50,"choonkit-nus":11}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"choonkit-nus"},"content":"# NUScents","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"-"},"content":"{Give product intro here}","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"choonkit-nus":1,"-":7}},{"path":"docs/diagrams/AddTransactionSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"!include Style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"Participant \":Expense\" as expense PARSER_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"Participant \":AddCommand\" as AddCommand COMMAND_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"nuscents -\u003e parser : parseCommand(\"expense /amt ...\")","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"parser -\u003e AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"activate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"AddCommand -\u003e parser : parseExpense(\"/amt ...\")","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"deactivate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"create expense","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":"parser -\u003e expense","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"activate expense","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":"expense --\u003e parser","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":"deactivate expense","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":"deactivate parser","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":"nuscents -\u003e AddCommand : execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":"activate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":"AddCommand -\u003e TransactionList : add()","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":"activate TransactionList","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":"TransactionList --\u003e AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":"AddCommand --\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"deactivate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"spaceman03":49}},{"path":"docs/diagrams/ListTransactionSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"Participant \":ListCommand\" as ListCommand COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":"nuscents -\u003e parser : parseCommand(\"list\")","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":"create ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":"parser -\u003e ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":"activate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":"ListCommand --\u003e parser","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":"deactivate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":"deactivate parser","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"nuscents -\u003e ListCommand : execute()","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":"activate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":"ListCommand -\u003e TransactionList : getTransactions()","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":"activate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":"TransactionList --\u003e ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":"ListCommand --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"deactivate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"lckjosh":42}},{"path":"docs/diagrams/ViewSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":"Participant \":ViewCommand\" as ViewCommand COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":"nuscents -\u003e parser : parseCommand(\"view 1\")","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"vvhuiling"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"vvhuiling"},"content":"create ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"vvhuiling"},"content":"parser -\u003e ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"vvhuiling"},"content":"activate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"vvhuiling"},"content":"ViewCommand --\u003e parser","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"vvhuiling"},"content":"deactivate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"vvhuiling"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"vvhuiling"},"content":"deactivate parser","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"vvhuiling"},"content":"nuscents -\u003e ViewCommand : execute()","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"vvhuiling"},"content":"activate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"vvhuiling"},"content":"ViewCommand -\u003e TransactionList : viewTransaction()","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"vvhuiling"},"content":"activate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"TransactionList --\u003e ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"vvhuiling"},"content":"ViewCommand --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":"deactivate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"vvhuiling"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"vvhuiling"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"vvhuiling"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"vvhuiling":42}},{"path":"docs/diagrams/style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR #ADD8E6","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"spaceman03":25}},{"path":"src/main/java/seedu/nuscents/Nuscents.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.storage.Storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"public class Nuscents {","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":" private Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":" private Storage storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":" private TransactionList transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":" * Sets up the required objects and loads up the data from the storage file.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" * @param filePath path of the file used to store data","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":" public Nuscents(String filePath) throws IOException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":" storage \u003d new Storage(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" transactions \u003d new TransactionList(storage.readDataFromFile());","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" } catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" Ui.showReadDataError();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" file.getParentFile().mkdirs();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" file.createNewFile();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" transactions \u003d new TransactionList(storage.readDataFromFile());","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" * Runs the program until termination.","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" public void run() {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" Ui.showWelcomeMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" runProgramUntilTermination();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" * Reads the user command and executes it, until the user issues the \"bye\" command.","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" * This method continuously prompts the user for commands and executes them until the user enters \"bye\".","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" private void runProgramUntilTermination() {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" String fullCommand \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" Command command \u003d Parser.parseCommand(fullCommand, transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" command.execute(transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" isExit \u003d ExitCommand.isExit(command);","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" storage.writeToFile(transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" } catch (NuscentsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" } catch (IOException | ParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Something went wrong: \" + e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":" public static void main(String[] args) throws IOException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" new Nuscents(\"./data/nuscents.txt\").run();","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"spaceman03":68,"lckjosh":7}},{"path":"src/main/java/seedu/nuscents/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":" private Transaction transaction;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public AddCommand(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":" this.transaction \u003d transaction;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":" transactions.addTransaction(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":11,"lckjosh":6}},{"path":"src/main/java/seedu/nuscents/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" * Executes the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" public abstract void execute(TransactionList transactionList) throws NuscentsException;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":10,"lckjosh":1}},{"path":"src/main/java/seedu/nuscents/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" private int taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" public DeleteCommand (int taskIndex) {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" this.taskIndex \u003d taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":" tasks.deleteTransaction(taskIndex);","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":14,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" Ui.showGoodbyeMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" public static boolean isExit(Command command) {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" return command instanceof ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":13,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/FilterCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":"public class FilterCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":" private TransactionCategory category;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":" public FilterCommand(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":" tasks.filterTransaction(category);","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"vvhuiling"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"vvhuiling":17}},{"path":"src/main/java/seedu/nuscents/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" private String keyword;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" public FindCommand(String keyword) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" this.keyword \u003d keyword;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":" tasks.findTask(keyword);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":14,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" Ui.showHelpMenu();","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":10,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/InvalidCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_UNKNOWN;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"public class InvalidCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN);","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":12,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionList(tasks);","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":8,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/commands/ListOfCommands.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" * Container for valid commands executed by the user in the application.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ListOfCommands {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"aaronxujiachen"},"content":" public static final String COMMAND_EXIT \u003d \"exit\";","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_LIST \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public static final String COMMAND_ALLOWANCE \u003d \"allowance\";","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":" public static final String COMMAND_EXPENSE \u003d \"expense\";","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_DELETE \u003d \"delete\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_FIND \u003d \"find\";","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" public static final String COMMAND_VIEW \u003d \"view\";","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" public static final String COMMAND_FILTER \u003d \"filter\";","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_HELP \u003d \"help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":1,"spaceman03":11,"lckjosh":2,"vvhuiling":2}},{"path":"src/main/java/seedu/nuscents/commands/ViewCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"public class ViewCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":" private int taskIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":" public ViewCommand (int taskIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":" this.taskIndex \u003d taskIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" tasks.viewTransaction(taskIndex);","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"vvhuiling":15}},{"path":"src/main/java/seedu/nuscents/data/TransactionList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"package seedu.nuscents.data;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.LINE;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"public class TransactionList {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":" private ArrayList\u003cTransaction\u003e transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public TransactionList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" transactions \u003d new ArrayList\u003cTransaction\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":" public TransactionList(ArrayList\u003cTransaction\u003e transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":" this.transactions \u003d transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":" public ArrayList\u003cTransaction\u003e getTransactions() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":" return transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" public void addTransaction(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" transactions.add(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionAddedMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" public void deleteTransaction(int transactionIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":" Transaction transaction \u003d transactions.get(transactionIndex-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" transactions.remove(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" Transaction.decreaseTransactionCountByOne();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionRemovedMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" public void findTask(String keyword) {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e results \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" boolean isFound \u003d false;","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":" if (transaction.getDescription().contains(keyword.toLowerCase())) {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"lckjosh"},"content":" isFound \u003d true;","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":" results.add(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"lckjosh"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"lckjosh"},"content":" if (isFound) {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"lckjosh"},"content":" int resultCount \u003d 1;","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Here are the matching tasks in your list:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : results) {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" System.out.println(resultCount + \". \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"No matching tasks are found :/\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"vvhuiling"},"content":" public void viewTransaction(int transactionIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"vvhuiling"},"content":" Transaction transaction \u003d transactions.get(transactionIndex-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"vvhuiling"},"content":" Ui.showTransactionViewMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"vvhuiling"},"content":" public void filterTransaction(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"vvhuiling"},"content":" ArrayList\u003cTransaction\u003e filteredTransactions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"vvhuiling"},"content":" boolean isFound \u003d false;","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"vvhuiling"},"content":" if (transaction.getCategory() \u003d\u003d category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"vvhuiling"},"content":" filteredTransactions.add(transaction);","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"vvhuiling"},"content":" isFound \u003d true;","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"vvhuiling"},"content":" if (isFound) {","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"vvhuiling"},"content":" Ui.showFilterMessage(filteredTransactions, category);","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Filtered transactions in the category \" + category + \":\");","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"vvhuiling"},"content":" int transactionCount \u003d 1;","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : filteredTransactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" System.out.println(transactionCount + \". \" + transaction.getDescription());","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" transactionCount++;","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"vvhuiling"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"vvhuiling"},"content":" Ui.showFilterNotFoundMessage(category);","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":"}","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spaceman03":3,"lckjosh":56,"vvhuiling":32}},{"path":"src/main/java/seedu/nuscents/data/exception/NuscentsException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.exception;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public class NuscentsException extends Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" public NuscentsException(String message) {","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" super(message);","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":7}},{"path":"src/main/java/seedu/nuscents/data/transaction/Allowance.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"public class Allowance extends Transaction {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" public Allowance(float amount, Date date, String description, String additionalInfo, AllowanceCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" super(amount, date, description, additionalInfo, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":9}},{"path":"src/main/java/seedu/nuscents/data/transaction/AllowanceCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public enum AllowanceCategory implements TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" NO_ALLOWANCE_CATEGORY","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":5}},{"path":"src/main/java/seedu/nuscents/data/transaction/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"public class Expense extends Transaction {","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" public Expense(float amount, Date date, String description, String additionalInfo, ExpenseCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" super(amount, date, description, additionalInfo, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":7,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/data/transaction/ExpenseCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public enum ExpenseCategory implements TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" FOOD, ENTERTAINMENT, TRANSPORTATION, UTILITY, RENT, OTHERS, NO_EXPENSE_CATEGORY","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":5}},{"path":"src/main/java/seedu/nuscents/data/transaction/Transaction.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":" * Represents a Transaction in the TransactionList","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"public class Transaction {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" private static int count \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"choonkit-nus"},"content":" protected float amount;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" protected Date date;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" protected String description;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" protected String additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" protected TransactionCategory category;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":" public Transaction(String description) {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":" count++;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"choonkit-nus"},"content":" public Transaction(float amount, Date date, String description) {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" count++;","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public Transaction(float amount, Date date, String description, String additionalInfo,","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" TransactionCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" this.additionalInfo \u003d additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" count++;","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"choonkit-nus"},"content":" public float getAmount() {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" return amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" public Date getDate() {","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":" return date;","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" public String getFormattedDate() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd MMMM, yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" return formatter.format(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" public String getDescription() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" return description;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" public String getAdditionalInfo() {","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" return additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" public TransactionCategory getCategory() {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" public String toString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" return getAmount() + \" | \" + getFormattedDate() + \" | \" + getDescription() + \" | \" + getAdditionalInfo()","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" + \" | \" + getCategory();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"lckjosh"},"content":" public static int getTransactionCount() {","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" return count;","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"spaceman03"},"content":" * Decrease the task count by one when a task is deleted.","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"lckjosh"},"content":" public static void decreaseTransactionCountByOne() {","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"spaceman03"},"content":" count--;","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":48,"lckjosh":29,"choonkit-nus":3}},{"path":"src/main/java/seedu/nuscents/data/transaction/TransactionCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public interface TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":4}},{"path":"src/main/java/seedu/nuscents/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ListCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.AddCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.DeleteCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.FindCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.HelpCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.InvalidCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.commands.ViewCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.commands.FilterCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.AllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"aaronxujiachen"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_EXIT;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_LIST;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_ALLOWANCE;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_EXPENSE;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_DELETE;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_FIND;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_HELP;","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_VIEW;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_FILTER;","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_UNKNOWN_CATEGORY;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_DATE;","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_ALLOWANCE;","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_EXPENSE;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_AMOUNT;","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_INDEX;","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_INDEX;","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_INDEX_ARGUMENTS;","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_FATAL_ERROR;","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_KEYWORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"public class Parser {","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" private static final String DATE_PATTERN1 \u003d \"\\\\d{1,2}-\\\\d{1,2}-\\\\d{4}\"; // dd-mm-yyyy","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" private static final String DATE_PATTERN2 \u003d \"\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}\"; // yyyy-mm-dd","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"lckjosh"},"content":" private static final String AMT_PATTERN \u003d \"/amt ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" private static final String DATE_PATTERN \u003d \"/date ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" private static final String DESC_PATTERN \u003d \"/desc ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"lckjosh"},"content":" private static final String NOTE_PATTERN \u003d \"/note ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" private static final String CATEGORY_PATTERN \u003d \"/cat ([^/]+)\";","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" public static \u003cTaskList\u003e Command parseCommand(String text, TaskList tasks) throws NuscentsException,","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":" String[] commandTypeAndArgs \u003d text.split(\" \", 2);","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" String commandType \u003d commandTypeAndArgs[0];","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":" String arguments;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" if (commandTypeAndArgs.length \u003e 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" arguments \u003d commandTypeAndArgs[1];","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" arguments \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" switch (commandType) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"aaronxujiachen"},"content":" case COMMAND_EXIT:","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" return new ExitCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":" case COMMAND_LIST:","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"lckjosh"},"content":" case COMMAND_ALLOWANCE:","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" return new AddCommand(parseAllowance(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"lckjosh"},"content":" case COMMAND_EXPENSE:","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"lckjosh"},"content":" return new AddCommand(parseExpense(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" case COMMAND_DELETE:","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"spaceman03"},"content":" return new DeleteCommand(parseTaskIndex(arguments));","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"spaceman03"},"content":" case COMMAND_FIND:","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" return new FindCommand(parseFind(arguments));","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"vvhuiling"},"content":" case COMMAND_VIEW:","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":" return new ViewCommand(parseTaskIndex(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" case COMMAND_FILTER:","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" return new FilterCommand(parseCategory(arguments));","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"spaceman03"},"content":" case COMMAND_HELP:","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"aaronxujiachen"},"content":" if (arguments !\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"aaronxujiachen"},"content":" throw new NuscentsException(\"OOPS!!! The correct format is \u0027help\u0027 alone.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"spaceman03"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"spaceman03"},"content":" return new InvalidCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"spaceman03"},"content":" } catch (NuscentsException | ParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"spaceman03"},"content":" throw e;","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"spaceman03"},"content":" private static String datePatternValidation(String date) throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"spaceman03"},"content":" if (date.matches(DATE_PATTERN1)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"spaceman03"},"content":" return \"d-M-yyyy\";","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"spaceman03"},"content":" } else if (date.matches(DATE_PATTERN2)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spaceman03"},"content":" return \"yyyy-M-d\";","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_INVALID_DATE);","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"spaceman03"},"content":" public static Date parseDate(String date, String format, SimpleDateFormat formatter)","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"spaceman03"},"content":" throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"spaceman03"},"content":" String separator;","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"spaceman03"},"content":" if (format.contains(\"-\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"spaceman03"},"content":" separator \u003d \"-\";","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"spaceman03"},"content":" separator \u003d \"/\";","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"spaceman03"},"content":" String[] dateMonthYear \u003d date.split(separator);","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"spaceman03"},"content":" if (Integer.parseInt(dateMonthYear[1]) \u003e 12) {","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_INVALID_DATE);","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"spaceman03"},"content":" return formatter.parse(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":119,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"lckjosh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":122,"author":{"gitId":"lckjosh"},"content":" * Parsers arguments in the context of adding an allowance.","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"lckjosh"},"content":" * @param arguments full command argument string","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"lckjosh"},"content":" * @return a {@link Allowance} object","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"lckjosh"},"content":" * @throws NuscentsException If the description of the allowance is empty.","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"lckjosh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"spaceman03"},"content":" public static Allowance parseAllowance(String arguments) throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_ALLOWANCE);","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"choonkit-nus"},"content":" float amount \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":133,"author":{"gitId":"choonkit-nus"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(extractValue(\"allowance\", arguments, AMT_PATTERN, false));","lastModifiedDate":"2023-10-23"},{"lineNumber":135,"author":{"gitId":"choonkit-nus"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"choonkit-nus"},"content":" throw new NuscentsException(MESSAGE_INVALID_AMOUNT);","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"choonkit-nus"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"lckjosh"},"content":" String date \u003d extractValue(\"allowance\", arguments, DATE_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"lckjosh"},"content":" String description \u003d extractValue(\"allowance\", arguments, DESC_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"lckjosh"},"content":" String additionalInformation \u003d extractValue(\"allowance\", arguments, NOTE_PATTERN, true);","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"spaceman03"},"content":" String category \u003d extractValue(\"allowance\", arguments, CATEGORY_PATTERN, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory allowanceCategory \u003d parseAllowanceCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"spaceman03"},"content":" String format \u003d datePatternValidation(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":144,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(format);","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(date, format, formatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"spaceman03"},"content":" return new Allowance(amount, formattedDate, description, additionalInformation, allowanceCategory);","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"lckjosh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":151,"author":{"gitId":"lckjosh"},"content":" * Parsers arguments in the context of adding an expense.","lastModifiedDate":"2023-10-17"},{"lineNumber":152,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"lckjosh"},"content":" * @param arguments full command argument string","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"lckjosh"},"content":" * @return a {@link Expense} object","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"lckjosh"},"content":" * @throws NuscentsException If the description of the expense is empty.","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"lckjosh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"spaceman03"},"content":" public static Expense parseExpense(String arguments) throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":158,"author":{"gitId":"lckjosh"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-17"},{"lineNumber":159,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_EXPENSE);","lastModifiedDate":"2023-10-17"},{"lineNumber":160,"author":{"gitId":"lckjosh"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":161,"author":{"gitId":"choonkit-nus"},"content":" float amount \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":162,"author":{"gitId":"choonkit-nus"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":163,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(extractValue(\"expense\", arguments, AMT_PATTERN, false));","lastModifiedDate":"2023-10-22"},{"lineNumber":164,"author":{"gitId":"choonkit-nus"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":165,"author":{"gitId":"choonkit-nus"},"content":" throw new NuscentsException(MESSAGE_INVALID_AMOUNT);","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"choonkit-nus"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"lckjosh"},"content":" String date \u003d extractValue(\"expense\", arguments, DATE_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":168,"author":{"gitId":"lckjosh"},"content":" String description \u003d extractValue(\"expense\", arguments, DESC_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":169,"author":{"gitId":"lckjosh"},"content":" String additionalInformation \u003d extractValue(\"expense\", arguments, NOTE_PATTERN, true);","lastModifiedDate":"2023-10-17"},{"lineNumber":170,"author":{"gitId":"spaceman03"},"content":" String category \u003d extractValue(\"expense\", arguments, CATEGORY_PATTERN, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":171,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory expenseCategory \u003d parseExpenseCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":172,"author":{"gitId":"spaceman03"},"content":" String format \u003d datePatternValidation(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":173,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(format);","lastModifiedDate":"2023-10-17"},{"lineNumber":174,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(date, format, formatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":175,"author":{"gitId":"spaceman03"},"content":" return new Expense(amount, formattedDate, description, additionalInformation, expenseCategory);","lastModifiedDate":"2023-10-23"},{"lineNumber":176,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":178,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":179,"author":{"gitId":"spaceman03"},"content":" public static ExpenseCategory parseExpenseCategory(String expenseCategory) throws NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":180,"author":{"gitId":"spaceman03"},"content":" String expenseCategoryLowercase \u003d expenseCategory.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory category \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":182,"author":{"gitId":"spaceman03"},"content":" switch (expenseCategoryLowercase) {","lastModifiedDate":"2023-10-23"},{"lineNumber":183,"author":{"gitId":"spaceman03"},"content":" case \"food\":","lastModifiedDate":"2023-10-23"},{"lineNumber":184,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.FOOD;","lastModifiedDate":"2023-10-23"},{"lineNumber":185,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":186,"author":{"gitId":"spaceman03"},"content":" case \"entertainment\":","lastModifiedDate":"2023-10-23"},{"lineNumber":187,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.ENTERTAINMENT;","lastModifiedDate":"2023-10-23"},{"lineNumber":188,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":189,"author":{"gitId":"spaceman03"},"content":" case \"transportation\":","lastModifiedDate":"2023-10-23"},{"lineNumber":190,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.TRANSPORTATION;","lastModifiedDate":"2023-10-23"},{"lineNumber":191,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":192,"author":{"gitId":"spaceman03"},"content":" case \"utility\":","lastModifiedDate":"2023-10-23"},{"lineNumber":193,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.UTILITY;","lastModifiedDate":"2023-10-23"},{"lineNumber":194,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":195,"author":{"gitId":"spaceman03"},"content":" case \"rent\":","lastModifiedDate":"2023-10-23"},{"lineNumber":196,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.RENT;","lastModifiedDate":"2023-10-23"},{"lineNumber":197,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":198,"author":{"gitId":"spaceman03"},"content":" case \"others\":","lastModifiedDate":"2023-10-23"},{"lineNumber":199,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.OTHERS;","lastModifiedDate":"2023-10-23"},{"lineNumber":200,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":201,"author":{"gitId":"spaceman03"},"content":" case \"\":","lastModifiedDate":"2023-10-23"},{"lineNumber":202,"author":{"gitId":"spaceman03"},"content":" case \"no_expense_category\":","lastModifiedDate":"2023-10-23"},{"lineNumber":203,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.NO_EXPENSE_CATEGORY;","lastModifiedDate":"2023-10-23"},{"lineNumber":204,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":205,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":206,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_CATEGORY);","lastModifiedDate":"2023-10-23"},{"lineNumber":207,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":208,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":209,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":210,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":211,"author":{"gitId":"spaceman03"},"content":" public static AllowanceCategory parseAllowanceCategory(String allowanceCategory) throws NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":212,"author":{"gitId":"spaceman03"},"content":" String allowanceCategoryLowerCase \u003d allowanceCategory.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":213,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory category \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":214,"author":{"gitId":"spaceman03"},"content":" switch (allowanceCategoryLowerCase) {","lastModifiedDate":"2023-10-23"},{"lineNumber":215,"author":{"gitId":"spaceman03"},"content":" case \"work\":","lastModifiedDate":"2023-10-23"},{"lineNumber":216,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":217,"author":{"gitId":"spaceman03"},"content":" case \"\":","lastModifiedDate":"2023-10-23"},{"lineNumber":218,"author":{"gitId":"spaceman03"},"content":" case \"no_allowance_category\":","lastModifiedDate":"2023-10-23"},{"lineNumber":219,"author":{"gitId":"spaceman03"},"content":" category \u003d AllowanceCategory.NO_ALLOWANCE_CATEGORY;","lastModifiedDate":"2023-10-23"},{"lineNumber":220,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":221,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":222,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_CATEGORY);","lastModifiedDate":"2023-10-23"},{"lineNumber":223,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":224,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":225,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":226,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":227,"author":{"gitId":"vvhuiling"},"content":" public static TransactionCategory parseCategory(String transactionCategory) throws NuscentsException {","lastModifiedDate":"2023-10-28"},{"lineNumber":228,"author":{"gitId":"vvhuiling"},"content":" String allowanceCategoryLowerCase \u003d transactionCategory.toLowerCase();","lastModifiedDate":"2023-10-28"},{"lineNumber":229,"author":{"gitId":"vvhuiling"},"content":" TransactionCategory category \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":230,"author":{"gitId":"vvhuiling"},"content":" switch (allowanceCategoryLowerCase) {","lastModifiedDate":"2023-10-28"},{"lineNumber":231,"author":{"gitId":"vvhuiling"},"content":" case \"work\":","lastModifiedDate":"2023-10-28"},{"lineNumber":232,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":233,"author":{"gitId":"vvhuiling"},"content":" case \"food\":","lastModifiedDate":"2023-10-28"},{"lineNumber":234,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.FOOD;","lastModifiedDate":"2023-10-28"},{"lineNumber":235,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":236,"author":{"gitId":"vvhuiling"},"content":" case \"entertainment\":","lastModifiedDate":"2023-10-28"},{"lineNumber":237,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.ENTERTAINMENT;","lastModifiedDate":"2023-10-28"},{"lineNumber":238,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":239,"author":{"gitId":"vvhuiling"},"content":" case \"transportation\":","lastModifiedDate":"2023-10-28"},{"lineNumber":240,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.TRANSPORTATION;","lastModifiedDate":"2023-10-28"},{"lineNumber":241,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":242,"author":{"gitId":"vvhuiling"},"content":" case \"utility\":","lastModifiedDate":"2023-10-28"},{"lineNumber":243,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.UTILITY;","lastModifiedDate":"2023-10-28"},{"lineNumber":244,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":245,"author":{"gitId":"vvhuiling"},"content":" case \"rent\":","lastModifiedDate":"2023-10-28"},{"lineNumber":246,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.RENT;","lastModifiedDate":"2023-10-28"},{"lineNumber":247,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":248,"author":{"gitId":"vvhuiling"},"content":" case \"others\":","lastModifiedDate":"2023-10-28"},{"lineNumber":249,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.OTHERS;","lastModifiedDate":"2023-10-28"},{"lineNumber":250,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":251,"author":{"gitId":"vvhuiling"},"content":" default:","lastModifiedDate":"2023-10-28"},{"lineNumber":252,"author":{"gitId":"vvhuiling"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_CATEGORY);","lastModifiedDate":"2023-10-28"},{"lineNumber":253,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":254,"author":{"gitId":"vvhuiling"},"content":" return category;","lastModifiedDate":"2023-10-28"},{"lineNumber":255,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":256,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":257,"author":{"gitId":"spaceman03"},"content":" public static int parseTaskIndex(String arguments) throws IndexOutOfBoundsException,","lastModifiedDate":"2023-10-16"},{"lineNumber":258,"author":{"gitId":"spaceman03"},"content":" NuscentsException {","lastModifiedDate":"2023-10-16"},{"lineNumber":259,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":260,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_EMPTY_INDEX);","lastModifiedDate":"2023-10-16"},{"lineNumber":261,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":262,"author":{"gitId":"vvhuiling"},"content":" try {","lastModifiedDate":"2023-10-18"},{"lineNumber":263,"author":{"gitId":"spaceman03"},"content":" int taskIndex \u003d Integer.parseInt(arguments);","lastModifiedDate":"2023-10-16"},{"lineNumber":264,"author":{"gitId":"lckjosh"},"content":" if (taskIndex \u003e Transaction.getTransactionCount() || taskIndex \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":265,"author":{"gitId":"spaceman03"},"content":" throw new IndexOutOfBoundsException(MESSAGE_INVALID_INDEX);","lastModifiedDate":"2023-10-16"},{"lineNumber":266,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":267,"author":{"gitId":"spaceman03"},"content":" return taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":268,"author":{"gitId":"vvhuiling"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-18"},{"lineNumber":269,"author":{"gitId":"vvhuiling"},"content":" throw new NuscentsException(MESSAGE_INVALID_INDEX_ARGUMENTS);","lastModifiedDate":"2023-10-18"},{"lineNumber":270,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":271,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":272,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":273,"author":{"gitId":"spaceman03"},"content":" public static String parseFind(String arguments) throws NuscentsException {","lastModifiedDate":"2023-10-16"},{"lineNumber":274,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":275,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_EMPTY_KEYWORD);","lastModifiedDate":"2023-10-16"},{"lineNumber":276,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":277,"author":{"gitId":"spaceman03"},"content":" return arguments;","lastModifiedDate":"2023-10-16"},{"lineNumber":278,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":279,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":280,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":281,"author":{"gitId":"lckjosh"},"content":" private static String extractValue(String command, String input, String pattern, boolean isOptional)","lastModifiedDate":"2023-10-17"},{"lineNumber":282,"author":{"gitId":"lckjosh"},"content":" throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":283,"author":{"gitId":"lckjosh"},"content":" java.util.regex.Pattern p \u003d java.util.regex.Pattern.compile(pattern);","lastModifiedDate":"2023-10-17"},{"lineNumber":284,"author":{"gitId":"lckjosh"},"content":" java.util.regex.Matcher m \u003d p.matcher(input);","lastModifiedDate":"2023-10-17"},{"lineNumber":285,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":286,"author":{"gitId":"lckjosh"},"content":" if (m.find()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":287,"author":{"gitId":"lckjosh"},"content":" return m.group(1).trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":288,"author":{"gitId":"lckjosh"},"content":" } else if (!isOptional) {","lastModifiedDate":"2023-10-17"},{"lineNumber":289,"author":{"gitId":"lckjosh"},"content":" switch (command) {","lastModifiedDate":"2023-10-17"},{"lineNumber":290,"author":{"gitId":"lckjosh"},"content":" case \"allowance\":","lastModifiedDate":"2023-10-17"},{"lineNumber":291,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_ALLOWANCE);","lastModifiedDate":"2023-10-17"},{"lineNumber":292,"author":{"gitId":"lckjosh"},"content":" case \"expense\":","lastModifiedDate":"2023-10-17"},{"lineNumber":293,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_EXPENSE);","lastModifiedDate":"2023-10-17"},{"lineNumber":294,"author":{"gitId":"lckjosh"},"content":" default:","lastModifiedDate":"2023-10-17"},{"lineNumber":295,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_FATAL_ERROR);","lastModifiedDate":"2023-10-17"},{"lineNumber":296,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":297,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":298,"author":{"gitId":"lckjosh"},"content":" return \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":299,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":300,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":5,"spaceman03":177,"lckjosh":62,"vvhuiling":44,"choonkit-nus":12}},{"path":"src/main/java/seedu/nuscents/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.AllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseAllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":"public class Storage {","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" private static final Logger logger \u003d Logger.getLogger(Storage.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" private String filePath;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" public Storage(String filePath) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" this.filePath \u003d filePath;","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" FileHandler fileHandler \u003d new FileHandler(\"storage.log\");","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":" logger.addHandler(fileHandler);","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" logger.setUseParentHandlers(false);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" logger.log(Level.SEVERE, \"Logging to file not working.\", e);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" public String getPath() {","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" return filePath;","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" * Reads data from the storage file and return it.","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" * @return an arraylist of tasks","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" * @throws FileNotFoundException If the storage file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" public ArrayList\u003cTransaction\u003e readDataFromFile() throws FileNotFoundException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Creating a File object to read data from file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" transactionDecoder(file, transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" } catch (ParseException | NuscentsException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.WARNING, \"Something went wrong when reading data from file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Something went wrong: \" + e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"All data successfully loaded\");","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"lckjosh"},"content":" return transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" * Decodes the storage data file and store it into the arraylist of tasks.","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" * @param file storage data file","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"lckjosh"},"content":" * @param transactions arraylist of tasks","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" * @throws FileNotFoundException If the storage data file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"lckjosh"},"content":" private static void transactionDecoder(File file, ArrayList\u003cTransaction\u003e transactions)","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" throws FileNotFoundException, ParseException, NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":" Scanner data \u003d new Scanner(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":" while (data.hasNext()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"lckjosh"},"content":" String transactionDetails \u003d data.nextLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"lckjosh"},"content":" char transactionType \u003d transactionDetails.charAt(0);","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"lckjosh"},"content":" String[] columns;","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"choonkit-nus"},"content":" float amount;","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spaceman03"},"content":" Date date;","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"lckjosh"},"content":" String description \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"lckjosh"},"content":" String note \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spaceman03"},"content":" String category\u003d \"\";","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd MMMM, yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":" switch (transactionType) {","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":" case \u0027A\u0027:","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"lckjosh"},"content":" columns \u003d transactionDetails.split(\"\\\\s*\\\\|\\\\s*\");","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(columns[1]);","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" date \u003d formatter.parse(columns[2]);","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"lckjosh"},"content":" description \u003d columns[3];","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"lckjosh"},"content":" note \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"lckjosh"},"content":" if (columns.length \u003e 4) {","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"lckjosh"},"content":" note \u003d columns[4];","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory allowanceCategory \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"spaceman03"},"content":" if (columns.length \u003e 5) {","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"spaceman03"},"content":" category \u003d columns[5];","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"spaceman03"},"content":" allowanceCategory \u003d parseAllowanceCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"spaceman03"},"content":" transactions.add(new Allowance(amount, date, description, note, allowanceCategory));","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"lckjosh"},"content":" case \u0027E\u0027:","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"lckjosh"},"content":" columns \u003d transactionDetails.split(\"\\\\s*\\\\|\\\\s*\");","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(columns[1]);","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"spaceman03"},"content":" date \u003d formatter.parse(columns[2]);","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"lckjosh"},"content":" description \u003d columns[3];","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"lckjosh"},"content":" if (columns.length \u003e 4) {","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"lckjosh"},"content":" note \u003d columns[4];","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory expenseCategory \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"spaceman03"},"content":" if (columns.length \u003e 5) {","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"spaceman03"},"content":" category \u003d columns[5];","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"spaceman03"},"content":" expenseCategory \u003d parseExpenseCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"spaceman03"},"content":" transactions.add(new Expense(amount, date, description, note, expenseCategory));","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"spaceman03"},"content":" * Writes the data to the storage file.","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"spaceman03"},"content":" * Creates a new file if the file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"lckjosh"},"content":" * @param transactionList list of tasks","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"spaceman03"},"content":" * @throws IOException If there were errors converting and/or storing the data to the file.","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"lckjosh"},"content":" public void writeToFile(TransactionList transactionList) throws IOException {","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":139,"author":{"gitId":"spaceman03"},"content":" FileWriter fw \u003d new FileWriter(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":140,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Creating a File object to write data to file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d transactionList.getTransactions();","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Converting info to storage format\");","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"spaceman03"},"content":" String output \u003d toStorageFormat(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"spaceman03"},"content":" fw.write(output);","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"spaceman03"},"content":" fw.write(\"\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Transaction data successfully stored\");","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"spaceman03"},"content":" fw.close();","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":151,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"spaceman03"},"content":" private static String toStorageFormat(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"lckjosh"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"spaceman03"},"content":" return \"A\" + \" | \" + transaction.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"lckjosh"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"spaceman03"},"content":" return \"E\" + \" | \" + transaction.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":158,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":159,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":160,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.WARNING, \"Invalid transaction format\");","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"spaceman03"},"content":" return null;","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":163,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":164,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"},{"lineNumber":165,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":116,"lckjosh":46,"choonkit-nus":3}},{"path":"src/main/java/seedu/nuscents/ui/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public class Messages {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" public static final String LINE \u003d \"-------------------------------------------------------------------------------\"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" + \"--------------\";","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" public static final String LOGO \u003d \" __ __ __ __ ____ _____ _____ __ __ ________ ____\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" + \"| \\\\ | | | | |/ / / __| | \\\\ | |__ __|/ /\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" + \"| \\\\| | | | |\\\\ __\\\\| / | __| \\\\| | | | \\\\ __\\\\\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" + \"| | | | | \\\\__ | | | __| | | | \\\\__ |\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" + \"| | |__| |/ | \\\\__| | | | | / |\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" + \"|__|\\\\___|________|______/ \\\\_____|_____|__|\\\\___| |__| |_____/\\n\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"aaronxujiachen"},"content":" public static final String MESSAGE_EXIT \u003d \"Thank you for using NUScents. Hope to see you again soon!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"aaronxujiachen"},"content":" public static final String HELP_MENU \u003d","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"aaronxujiachen"},"content":" \"- `list` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"aaronxujiachen"},"content":" \" Show a list of all entries.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"aaronxujiachen"},"content":" \"- `allowance /amt AMOUNT /date DATE /desc DESCRIPTION /cat CATEGORY \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"aaronxujiachen"},"content":" \"[/note ADDITIONAL_INFORMATION]` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"aaronxujiachen"},"content":" \" Add an allowance.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"aaronxujiachen"},"content":" \"- `expense /amt AMOUNT /date DATE /desc DESCRIPTION /cat CATEGORY \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"aaronxujiachen"},"content":" \"[/note ADDITIONAL_INFORMATION]` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"aaronxujiachen"},"content":" \" Add an expense.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"aaronxujiachen"},"content":" \"- `delete ENTRY_NUMBER` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"aaronxujiachen"},"content":" \" Delete an entry.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"aaronxujiachen"},"content":" \"- `view ENTRY_NUMBER` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"aaronxujiachen"},"content":" \" View an entry detail.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"aaronxujiachen"},"content":" \"- `exit` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"aaronxujiachen"},"content":" \" Exit the program.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_UNKNOWN \u003d \"OOPS!!! I\u0027m sorry, but I don\u0027t know what that means :-(\";","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_ALLOWANCE \u003d \"OOPS!!! Invalid input format for adding an allowance.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_EXPENSE \u003d \"OOPS!!! Invalid input format for adding an expense.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"choonkit-nus"},"content":" public static final String MESSAGE_INVALID_AMOUNT \u003d \"OOPS!!! The amount entered needs to be a float!\";","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_INVALID_DATE \u003d \"OOPS!!! The format of the date is invalid.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"OOPS!!! This is an invalid transaction index.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":" public static final String MESSAGE_INVALID_INDEX_ARGUMENTS \u003d \"OOPS!!! The input should consist only of digits.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_LIST \u003d \"You have not made any transactions!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_EMPTY_KEYWORD \u003d \"OOPS!!! The keyword of a find command cannot be empty.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":" public static final String MESSAGE_EMPTY_INDEX \u003d \"OOPS!!! The index of a delete/view command cannot be empty.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_FATAL_ERROR \u003d \"OOPS!!! Fatal error occurred...\";","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_READ_ERROR \u003d \"OOPS!!! A problem occurred while reading the data file.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_UNKNOWN_CATEGORY \u003d \"OOPS!!! The category you provided is not a valid category.\\n\"","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" + \"Valid categories are FOOD/ENTERTAINMENT/TRANSPORTATION/UTILITY/RENT/OTHERS.\";","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":17,"spaceman03":18,"lckjosh":5,"choonkit-nus":1,"vvhuiling":2}},{"path":"src/main/java/seedu/nuscents/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"aaronxujiachen"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EXIT;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.LINE;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.LOGO;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_LIST;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"public class Ui {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":" private final Scanner input;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":" public Ui() {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":" this.input \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" return input.nextLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public static void showLine() {","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" public static void showWelcomeMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Hello from\\n\" + LOGO);","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"What can I do for you?\");","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(\"Hint: To view a list of all possible commands, please enter \u0027help\u0027.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" public static void showGoodbyeMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(MESSAGE_EXIT);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" public void showException(Exception e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionCount( ) {","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Now you have \" + Transaction.getTransactionCount() + \" transactions in the list.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionAddedMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Got it. I\u0027ve added this transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" System.out.println(\" \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"lckjosh"},"content":" showTransactionCount();","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionRemovedMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Noted. I\u0027ve removed this transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" System.out.println(\" \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"lckjosh"},"content":" showTransactionCount();","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionList(TransactionList transactionList) {","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"choonkit-nus"},"content":" float netBalance \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"lckjosh"},"content":" if (transactionList.getTransactions().isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"spaceman03"},"content":" System.out.println(MESSAGE_EMPTY_LIST);","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"spaceman03"},"content":" assert transactionList.getTransactions() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Here are the transactions in your list:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spaceman03"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-10s %-5s %n\",","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"spaceman03"},"content":" \"S/N\", \"TYPE\", \"AMOUNT\", \"DATE\", \"DESCRIPTION\", \"NOTE\", \"CATEGORY\");","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d transactionList.getTransactions();","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"spaceman03"},"content":" int index \u003d transactions.indexOf(transaction) + 1;","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"spaceman03"},"content":" String additionalInfo \u003d transaction.getAdditionalInfo();","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"spaceman03"},"content":" String note;","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"spaceman03"},"content":" if (additionalInfo.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"spaceman03"},"content":" note \u003d \"-\";","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"spaceman03"},"content":" note \u003d additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"spaceman03"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"spaceman03"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-5s %n\", index, \"Allowance\",","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"choonkit-nus"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"choonkit-nus"},"content":" transaction.getDescription(), note);","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"choonkit-nus"},"content":" netBalance +\u003d transaction.getAmount();","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spaceman03"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"spaceman03"},"content":" TransactionCategory expenseCategory \u003d transaction.getCategory();","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"spaceman03"},"content":" String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"spaceman03"},"content":" if (expenseCategory \u003d\u003d ExpenseCategory.NO_EXPENSE_CATEGORY) {","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"spaceman03"},"content":" category \u003d \"-\";","lastModifiedDate":"2023-10-23"},{"lineNumber":107,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":108,"author":{"gitId":"spaceman03"},"content":" category \u003d expenseCategory.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":109,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":110,"author":{"gitId":"spaceman03"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-10s %-5s %n\", index, \"Expense\",","lastModifiedDate":"2023-10-23"},{"lineNumber":111,"author":{"gitId":"choonkit-nus"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"spaceman03"},"content":" transaction.getDescription(), note, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"choonkit-nus"},"content":" netBalance -\u003d transaction.getAmount();","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"choonkit-nus"},"content":" System.out.println(\"Net Balance \u003d \" + String.format(\"%.2f\", netBalance));","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"choonkit-nus"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"spaceman03"},"content":" public static void showReadDataError() {","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"No previous data found /:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"vvhuiling"},"content":" public static void showTransactionViewMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Following are details of the transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"vvhuiling"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":131,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"TYPE: ALLOWANCE\");","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"vvhuiling"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"TYPE: EXPENSE\");","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"DATE: \" + transaction.getFormattedDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"AMOUNT: \" + transaction.getAmount());","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"DESCRIPTION: \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"NOTE: \" + transaction.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"vvhuiling"},"content":" public static void showFilterMessage(ArrayList\u003cTransaction\u003e filteredTransactions, TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Filtered transactions in the category \" + category.toString() + \":\");","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"vvhuiling"},"content":" float netBalance \u003d 0;","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : filteredTransactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"vvhuiling"},"content":" int index \u003d filteredTransactions.indexOf(transaction) + 1;","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"vvhuiling"},"content":" String additionalInfo \u003d transaction.getAdditionalInfo();","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"vvhuiling"},"content":" String note;","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"vvhuiling"},"content":" if (additionalInfo.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"vvhuiling"},"content":" note \u003d \"-\";","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"vvhuiling"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"vvhuiling"},"content":" note \u003d additionalInfo;","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"vvhuiling"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-5s %n\", index, \"Allowance\",","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"vvhuiling"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"vvhuiling"},"content":" transaction.getDescription(), note);","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"vvhuiling"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"vvhuiling"},"content":" netBalance +\u003d transaction.getAmount();","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"vvhuiling"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"vvhuiling"},"content":" netBalance -\u003d transaction.getAmount();","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Net Balance \u003d \" + String.format(\"%.2f\", netBalance));","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"vvhuiling"},"content":" public static void showFilterNotFoundMessage(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"No transactions found in the category \" + category.toString());","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":174,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":175,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":176,"author":{"gitId":"spaceman03"},"content":" public static void showHelpMenu() {","lastModifiedDate":"2023-10-16"},{"lineNumber":177,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":178,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(Messages.HELP_MENU);","lastModifiedDate":"2023-10-18"},{"lineNumber":179,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":180,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":181,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":182,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":5,"spaceman03":106,"lckjosh":14,"choonkit-nus":8,"vvhuiling":49}},{"path":"src/test/java/seedu/nuscents/NuscentsTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"class NuscentsTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"spaceman03":2,"-":10}},{"path":"src/test/java/seedu/nuscents/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"package seedu.nuscents.parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"aaronxujiachen"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"aaronxujiachen"},"content":"import seedu.nuscents.commands.HelpCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"aaronxujiachen"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":"public class ParserTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_validInput_success() throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"choonkit-nus"},"content":" String arguments \u003d \"/amt 100.0 /date 15-10-2023 /desc Birthday Gift /note From friends\";","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" Allowance allowance \u003d Parser.parseAllowance(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"choonkit-nus"},"content":" assertEquals(100.0, allowance.getAmount());","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"d-M-yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" String formattedDate \u003d formatter.format(allowance.getDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"15-10-2023\", formattedDate);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Birthday Gift\", allowance.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"From friends\", allowance.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_validInput_success() throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"choonkit-nus"},"content":" String arguments \u003d \"/amt 50.0 /date 16-10-2023 /desc Dinner /note Alone\";","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" Expense expense \u003d Parser.parseExpense(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"choonkit-nus"},"content":" assertEquals(50.0, expense.getAmount());","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"d-M-yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" String formattedDate \u003d formatter.format(expense.getDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"16-10-2023\", formattedDate);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Dinner\", expense.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Alone\", expense.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_missingArguments_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"allowance /amt 100.0 /desc Pocket Money\";","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! Invalid input format for adding an allowance.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_missingArguments_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"expense /amt 50.0 /desc Dinner\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! Invalid input format for adding an expense.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_invalidDateTime_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"allowance /amt 100.0 /date 15/10/2023 /desc Lunch\";","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! The format of the date is invalid.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_invalidDateTime_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"expense /amt 50.0 /date 16.10.2023 /desc Dinner\";","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! The format of the date is invalid.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_validInput_success() throws NuscentsException, IndexOutOfBoundsException {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"1\";","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"vvhuiling"},"content":" Transaction transaction \u003d new Transaction(\"test description\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"vvhuiling"},"content":" assertEquals(1, Parser.parseTaskIndex(input));","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_outOfBoundsIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"-6\";","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! This is an invalid transaction index.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_invalidArgument_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"InvalidArgument\";","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! The input should consist only of digits.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_emptyArgument_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"vvhuiling"},"content":" String input \u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! The index of a delete/view command cannot be empty.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"aaronxujiachen"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"aaronxujiachen"},"content":" public void parseCommand_helpCommandWithCorrectInput_returnsHelpCommand() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"aaronxujiachen"},"content":" Command result \u003d Parser.parseCommand(\"help\", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"aaronxujiachen"},"content":" assertTrue(result instanceof HelpCommand);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"aaronxujiachen"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"aaronxujiachen"},"content":" public void parseCommand_helpCommandWithIncorrectInput_throwsException() {","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"aaronxujiachen"},"content":" Exception exceptionWithSpace \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"aaronxujiachen"},"content":" Parser.parseCommand(\"help \", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"aaronxujiachen"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"aaronxujiachen"},"content":" assertEquals(\"OOPS!!! The correct format is \u0027help\u0027 alone.\", exceptionWithSpace.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"aaronxujiachen"},"content":" Exception exceptionWithExtraChars \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"aaronxujiachen"},"content":" Parser.parseCommand(\"help extra\", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"aaronxujiachen"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"aaronxujiachen"},"content":" assertEquals(\"OOPS!!! The correct format is \u0027help\u0027 alone.\", exceptionWithExtraChars.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"lckjosh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"aaronxujiachen":22,"spaceman03":3,"lckjosh":65,"choonkit-nus":8,"vvhuiling":35}},{"path":"src/test/java/seedu/nuscents/storage/StorageTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.storage;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import java.nio.charset.Charset;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Paths;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"public class StorageTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" @TempDir","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":" public static Path testFolder;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" private static final String TEST_DATA_FOLDER \u003d \"src/test/data/StorageFileTest\";","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public void save_validTransactionList() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" TransactionList transactions \u003d getTestTransactionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" Storage storage \u003d getTempStorage();","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" storage.writeToFile(transactions);","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" assertStorageFilesEqual(storage, getStorage(\"ValidData.txt\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" private void assertStorageFilesEqual(Storage sf1, Storage sf2) throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" assertTextFilesEqual(Paths.get(sf1.getPath()), Paths.get(sf2.getPath()));","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" public static void assertTextFilesEqual(Path path1, Path path2) throws IOException {","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" List\u003cString\u003e list1 \u003d Files.readAllLines(path1, Charset.defaultCharset());","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" List\u003cString\u003e list2 \u003d Files.readAllLines(path2, Charset.defaultCharset());","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" assertEquals(String.join(\"\\n\", list1), String.join(\"\\n\", list2));","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":" private Storage getStorage(String fileName) throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" return new Storage(TEST_DATA_FOLDER + \"/\" + fileName);","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" private Storage getTempStorage() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" return new Storage(testFolder.resolve(\"temp.txt\").toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" private TransactionList getTestTransactionList() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" TransactionList transactions \u003d new TransactionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd-MM-yyyy\");","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(\"23-10-2023\", \"dd-MM-yyyy\", formatter);","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" transactions.addTransaction(new Expense(50, formattedDate, \"Lunch\", \"Pasta\",","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory.FOOD));","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" return transactions;","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spaceman03":62}}] +[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" mainClass.set(\"seedu.nuscents.Nuscents\")","lastModifiedDate":"2023-10-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" archiveBaseName.set(\"nuscents\")","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":"run {","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":6,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"--------|:--------------:|:-------------------------------------------:|:---------:","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"aaronxujiachen"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Xu JiaChen | [Github](https://github.com/aaronxujiachen) | [Portfolio](docs/team/xujiachen.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Joshua Lim | [Github](https://github.com/lckjosh) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Chung Zhi Xuan | [Github](https://github.com/spaceman03) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"choonkit-nus"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ong Choon Kit | [Github](https://github.com/choonkit-nus) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Huang Huiling | [Github](https://github.com/vvhuiling) | [Portfolio](docs/team/huiling.md)","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"aaronxujiachen":1,"spaceman03":1,"lckjosh":2,"-":3,"choonkit-nus":1,"vvhuiling":1}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"## Design","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"## **Implementation**","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"### Add transaction feature","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"The add transaction feature is facilitated by the `Parser` class which parses user input and creates a `Expense` or","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"`Allowance` object which extends from the `Transaction` class. The created `Transaction` object will be stored in a ","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"`TransactionList`.","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"Given below is an example usage scenario and how the add transaction mechanism behaves at each step.","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"Step 1. The user launches the application for the first time. The `TransactionList` will be initialized.","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"Step 2. The user executes `expense /amt 20 /date 24-10-2023 /desc Lunch /note Pasta /cat Food` command to create a","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"transaction. The `expense` command calls `Parser#parseExpense()` to create an `Expense` object. The ","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"`AddCommand#execute()` is then called to store the `Expense` object in the `TransactionList`.","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"The following sequence diagram shows how the add transaction operation works:","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"\u003cimg src\u003d\"images/AddTransactionSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"vvhuiling"},"content":"### View transaction feature","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"vvhuiling"},"content":"In this section, I will describe the implementation of the \"View Transaction\" feature which allows users to ","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"vvhuiling"},"content":"view transaction details by specifying an index.","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"choonkit-nus"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"vvhuiling"},"content":"#### I. Architecture-Level Design","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"vvhuiling"},"content":"The \"View Transaction\" feature primarily involves the following components:","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"1. Parser: Responsible for interpreting user input and generating a ViewCommand object.","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"vvhuiling"},"content":"2. ViewCommand: A subclass of the Command class, created by the Parser to represent the \"view\" command.","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":"3. Nuscents: The main application class that receives and executes commands. It invokes the execute() method of the ViewCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"vvhuiling"},"content":"4. TransactionList: A data structure to store and manage transactions.","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"vvhuiling"},"content":"5. Transaction: Represents individual transactions.","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"vvhuiling"},"content":"6. UI: Handles user interface and messaging.","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"choonkit-nus"},"content":"#### II. Component-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"vvhuiling"},"content":"1. Parser","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"vvhuiling"},"content":"The Parser class identifies the \"view\" command and extracts the taskIndex (transaction index) from the user\u0027s input.","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"vvhuiling"},"content":"2. ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"vvhuiling"},"content":"The ViewCommand object is created by the Parser. It encapsulates the user\u0027s request to view a specific transaction. This object is passed to the Nuscents class for execution.","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"vvhuiling"},"content":"3. Nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"vvhuiling"},"content":"In the Nuscents class, the execute() method of the ViewCommand is called, and the taskIndex is extracted from the command. It then calls the viewTransaction(taskIndex) method on the TransactionList.","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"vvhuiling"},"content":"4. TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"vvhuiling"},"content":"The TransactionList contains a list of Transaction objects. The viewTransaction(taskIndex) method retrieves the specific Transaction object based on the taskIndex.","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"vvhuiling"},"content":"5. Transaction","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"vvhuiling"},"content":"The Transaction class represents an individual transaction, and it contains all the relevant details of a transaction.","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"vvhuiling"},"content":"6. UI","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"vvhuiling"},"content":"The UI class displays the transaction details using the UI.showTransactionViewMessage method, which receives the Transaction object as input and presents the detailed transaction information to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"vvhuiling"},"content":"#### III. Alternatives Considered","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"vvhuiling"},"content":"While the current design is deemed suitable for our application, we did consider alternative approaches, such as ","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"vvhuiling"},"content":"integrating the view transaction functionality directly within the Nuscents class without introducing a ViewCommand. ","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"vvhuiling"},"content":"However, we opted for the current design to promote a cleaner separation of concerns and to facilitate future expansions ","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"vvhuiling"},"content":"and modifications.","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"vvhuiling"},"content":"The following sequence diagram shows how the add transaction operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"vvhuiling"},"content":"\u003cimg src\u003d\"images/ViewSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":80,"author":{"gitId":"lckjosh"},"content":"### List transactions feature","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"lckjosh"},"content":"The list transaction feature is facilitated by the `Parser` class which parses user input and creates a new","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"lckjosh"},"content":"`ListCommand` object. The `ListCommand` object will get all the transactions in the `TransactionList` and display them ","lastModifiedDate":"2023-10-26"},{"lineNumber":83,"author":{"gitId":"lckjosh"},"content":"to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"lckjosh"},"content":"Given below is the example usage scenario and how the list transaction mechanism behaves at each step.","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"lckjosh"},"content":"Step 1. The user launches the application. The `TransactionList` will be initialized with the transactions stored in ","lastModifiedDate":"2023-10-26"},{"lineNumber":88,"author":{"gitId":"lckjosh"},"content":"the `nuscents.txt` file. If the file is empty or does not exist, the `TransactionList` will be empty. ","lastModifiedDate":"2023-10-26"},{"lineNumber":89,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":"Step 2. The user executes `list` command to list the transactions. The `list` command calls `ListCommand#execute()`, ","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":"which gets the transactions from the `TransactionList` and displays them to the user.","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"lckjosh"},"content":"The following sequence diagram shows how the list transaction operation works:","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"lckjosh"},"content":"\u003cimg src\u003d\"images/ListTransactionSequenceDiagram.png\" width\u003d\"600\" /\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"choonkit-nus"},"content":"In addition to that, the list transaction feature further computes and displays the net balance amount based on the ","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"choonkit-nus"},"content":"following formula (net balance \u003d total allowance amount - total expense amount). The `showTransactionList()` method in ","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"choonkit-nus"},"content":"the `Ui` class, it utilizes the float `netBalance` to store the net balance amount. When the `TransactionList` is","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"choonkit-nus"},"content":"iterated to print the transactions, it does a simple calculation based on whether it is an allowance or expense, to add","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"choonkit-nus"},"content":"or minus off respectively from the net balance.","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"aaronxujiachen"},"content":"### `helpCommand` Feature","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"aaronxujiachen"},"content":"#### I. Architecture-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"aaronxujiachen"},"content":"The `helpCommand` feature serves as an informative component to assist users unfamiliar with the application commands. It integrates the following components:","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"aaronxujiachen"},"content":"1. **Parser**: Determines if the user input matches the `help` command.","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"aaronxujiachen"},"content":"2. **HelpCommand**: A subclass of the Command class. Represents the `help` command, and provides command details when executed.","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"aaronxujiachen"},"content":"3. **Nuscents**: The main application class that receives and executes commands. It invokes the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"aaronxujiachen"},"content":"4. **UI**: Manages user interface interactions, such as displaying the help menu.","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"aaronxujiachen"},"content":"#### II. Component-Level Design","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"aaronxujiachen"},"content":"1. **Parser**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"aaronxujiachen"},"content":" The `Parser` class recognizes the user\u0027s intention to access the help menu through the `help` keyword.","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"aaronxujiachen"},"content":"2. **HelpCommand**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"aaronxujiachen"},"content":" When the `Parser` identifies a `help` command, it instantiates a `HelpCommand` object. This object encapsulates the user\u0027s request to view the command instructions.","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"aaronxujiachen"},"content":"3. **Nuscents**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"aaronxujiachen"},"content":" Upon receiving the `HelpCommand` object, the `Nuscents` class triggers the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":123,"author":{"gitId":"aaronxujiachen"},"content":"4. **UI**: ","lastModifiedDate":"2023-10-27"},{"lineNumber":124,"author":{"gitId":"aaronxujiachen"},"content":" The `UI` class is then responsible for fetching the `HELP_MENU` static string from the `HelpCommand` class and displaying it to the user. This ensures the user receives a comprehensive list of commands available in the application.","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":126,"author":{"gitId":"aaronxujiachen"},"content":"#### III. Alternatives Considered","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"aaronxujiachen"},"content":"Initially, we pondered over embedding the help details directly within the main application class, `Nuscents`. This would eliminate the need for a separate `HelpCommand` class. However, segregating the `HelpCommand` ensures better modularity, making future expansions or modifications seamless.","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"aaronxujiachen"},"content":"### `helpCommand` Usage Scenario","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"aaronxujiachen"},"content":"1. **Step 1**: The user launches the application. The initial screen appears.","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"aaronxujiachen"},"content":"2. **Step 2**: Unsure of the commands, the user inputs the `help` command.","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"aaronxujiachen"},"content":"3. **Step 3**: The application recognizes the command through the `Parser` and creates a `HelpCommand` object.","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"aaronxujiachen"},"content":"4. **Step 4**: The `Nuscents` class invokes the `execute()` method of the `HelpCommand`.","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"aaronxujiachen"},"content":"5. **Step 5**: The `UI` fetches the `HELP_MENU` string and displays the comprehensive list of commands to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":138,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":140,"author":{"gitId":"choonkit-nus"},"content":"### Target user profile","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"choonkit-nus"},"content":"SOC students at NUS who are tech-savvy, with limited allowance to monitor their finances and expense management","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"choonkit-nus"},"content":"while balancing aspects of university-life, academics and social activities. SOC students are known to be familiar with ","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"choonkit-nus"},"content":"CLI applications, which are often built to be efficient and clutter-free.","lastModifiedDate":"2023-10-27"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":145,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":146,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":147,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":148,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":149,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":150,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":151,"author":{"gitId":"-"},"content":"|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2020-05-24"},{"lineNumber":152,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":154,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":155,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":157,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":158,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":160,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":161,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"aaronxujiachen":33,"spaceman03":19,"lckjosh":17,"-":31,"vvhuiling":50,"choonkit-nus":11}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"choonkit-nus"},"content":"# NUScents","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"-"},"content":"{Give product intro here}","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"choonkit-nus":1,"-":7}},{"path":"docs/diagrams/AddTransactionSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"!include Style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"Participant \":Expense\" as expense PARSER_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"Participant \":AddCommand\" as AddCommand COMMAND_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"nuscents -\u003e parser : parseCommand(\"expense /amt ...\")","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"parser -\u003e AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"activate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"AddCommand -\u003e parser : parseExpense(\"/amt ...\")","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"deactivate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"create expense","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":"parser -\u003e expense","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"activate expense","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":"expense --\u003e parser","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":"deactivate expense","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":"deactivate parser","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":"nuscents -\u003e AddCommand : execute()","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":"activate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":"AddCommand -\u003e TransactionList : add()","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":"activate TransactionList","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":"TransactionList --\u003e AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":"AddCommand --\u003e nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"deactivate AddCommand","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"spaceman03":49}},{"path":"docs/diagrams/ListTransactionSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"Participant \":ListCommand\" as ListCommand COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":"nuscents -\u003e parser : parseCommand(\"list\")","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":"create ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":"parser -\u003e ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":"activate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":"ListCommand --\u003e parser","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":"deactivate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":"deactivate parser","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"nuscents -\u003e ListCommand : execute()","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":"activate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":"ListCommand -\u003e TransactionList : getTransactions()","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":"activate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":"TransactionList --\u003e ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":"ListCommand --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"deactivate ListCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"lckjosh":42}},{"path":"docs/diagrams/ViewSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":"Participant \":Nuscents\" as nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":"Participant \":Parser\" as parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":"Participant \":ViewCommand\" as ViewCommand COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":"Participant \":TransactionList\" as TransactionList UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":"user -[USER_COLOR]\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"activate nuscents UI_COLOR_T1","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":"nuscents -\u003e parser : parseCommand(\"view 1\")","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"vvhuiling"},"content":"activate parser PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"vvhuiling"},"content":"create ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"vvhuiling"},"content":"parser -\u003e ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"vvhuiling"},"content":"activate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"vvhuiling"},"content":"ViewCommand --\u003e parser","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"vvhuiling"},"content":"deactivate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"vvhuiling"},"content":"parser --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"vvhuiling"},"content":"deactivate parser","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"vvhuiling"},"content":"nuscents -\u003e ViewCommand : execute()","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"vvhuiling"},"content":"activate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"vvhuiling"},"content":"ViewCommand -\u003e TransactionList : viewTransaction()","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"vvhuiling"},"content":"activate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"TransactionList --\u003e ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":"deactivate TransactionList","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"vvhuiling"},"content":"ViewCommand --\u003e nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":"deactivate ViewCommand","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"vvhuiling"},"content":"nuscents --\u003e user","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"vvhuiling"},"content":"deactivate nuscents","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"vvhuiling"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"vvhuiling":42}},{"path":"docs/diagrams/style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR #ADD8E6","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"!define PARSER_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"!define COMMAND_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"!define STORAGE_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"spaceman03":25}},{"path":"src/main/java/seedu/nuscents/Nuscents.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.storage.Storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"public class Nuscents {","lastModifiedDate":"2023-10-13"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":" private Ui ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":" private Storage storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":" private TransactionList transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":" * Sets up the required objects and loads up the data from the storage file.","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" * @param filePath path of the file used to store data","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":" public Nuscents(String filePath) throws IOException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" ui \u003d new Ui();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":" storage \u003d new Storage(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" transactions \u003d new TransactionList(storage.readDataFromFile());","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" } catch (FileNotFoundException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" Ui.showReadDataError();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" file.getParentFile().mkdirs();","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" file.createNewFile();","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" transactions \u003d new TransactionList(storage.readDataFromFile());","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" * Runs the program until termination.","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" public void run() {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" Ui.showWelcomeMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" runProgramUntilTermination();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" * Reads the user command and executes it, until the user issues the \"bye\" command.","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" * This method continuously prompts the user for commands and executes them until the user enters \"bye\".","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" private void runProgramUntilTermination() {","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" boolean isExit \u003d false;","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" while (!isExit) {","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" String fullCommand \u003d ui.getUserCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" Command command \u003d Parser.parseCommand(fullCommand, transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" command.execute(transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" isExit \u003d ExitCommand.isExit(command);","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" storage.writeToFile(transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" } catch (NuscentsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" } catch (IOException | ParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Something went wrong: \" + e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" } catch (IndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" ui.showException(e);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":" public static void main(String[] args) throws IOException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" new Nuscents(\"./data/nuscents.txt\").run();","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"spaceman03":68,"lckjosh":7}},{"path":"src/main/java/seedu/nuscents/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":" private Transaction transaction;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public AddCommand(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":" this.transaction \u003d transaction;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":" transactions.addTransaction(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":11,"lckjosh":6}},{"path":"src/main/java/seedu/nuscents/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" * Executes the command.","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" public abstract void execute(TransactionList transactionList) throws NuscentsException;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":10,"lckjosh":1}},{"path":"src/main/java/seedu/nuscents/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" private int taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" public DeleteCommand (int taskIndex) {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" this.taskIndex \u003d taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":" tasks.deleteTransaction(taskIndex);","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":14,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ExitCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" Ui.showGoodbyeMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" public static boolean isExit(Command command) {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" return command instanceof ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":13,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/FilterCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":"public class FilterCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":" private TransactionCategory category;","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":" public FilterCommand(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" @Override","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":" tasks.filterTransaction(category);","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"vvhuiling"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"vvhuiling":17}},{"path":"src/main/java/seedu/nuscents/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" private String keyword;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" public FindCommand(String keyword) {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" this.keyword \u003d keyword;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":" tasks.findTask(keyword);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":14,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" Ui.showHelpMenu();","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":10,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/InvalidCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_UNKNOWN;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"public class InvalidCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN);","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":12,"lckjosh":2}},{"path":"src/main/java/seedu/nuscents/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" @Override","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionList(tasks);","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":8,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/commands/ListOfCommands.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" * Container for valid commands executed by the user in the application.","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"public class ListOfCommands {","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"aaronxujiachen"},"content":" public static final String COMMAND_EXIT \u003d \"exit\";","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_LIST \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" public static final String COMMAND_ALLOWANCE \u003d \"allowance\";","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":" public static final String COMMAND_EXPENSE \u003d \"expense\";","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_DELETE \u003d \"delete\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_FIND \u003d \"find\";","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" public static final String COMMAND_VIEW \u003d \"view\";","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" public static final String COMMAND_FILTER \u003d \"filter\";","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" public static final String COMMAND_HELP \u003d \"help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":1,"spaceman03":11,"lckjosh":2,"vvhuiling":2}},{"path":"src/main/java/seedu/nuscents/commands/ViewCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"vvhuiling"},"content":"package seedu.nuscents.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"vvhuiling"},"content":"public class ViewCommand extends Command {","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"vvhuiling"},"content":" private int taskIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"vvhuiling"},"content":" public ViewCommand (int taskIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"vvhuiling"},"content":" this.taskIndex \u003d taskIndex;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":" @Override","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":" public void execute(TransactionList tasks) {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"vvhuiling"},"content":" tasks.viewTransaction(taskIndex);","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"vvhuiling"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"vvhuiling":15}},{"path":"src/main/java/seedu/nuscents/data/TransactionList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"package seedu.nuscents.data;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.LINE;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"public class TransactionList {","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":" private ArrayList\u003cTransaction\u003e transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" public TransactionList() {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" transactions \u003d new ArrayList\u003cTransaction\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":" public TransactionList(ArrayList\u003cTransaction\u003e transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":" this.transactions \u003d transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":" public ArrayList\u003cTransaction\u003e getTransactions() {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":" return transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" public void addTransaction(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" transactions.add(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionAddedMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" public void deleteTransaction(int transactionIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":" Transaction transaction \u003d transactions.get(transactionIndex-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" transactions.remove(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" Transaction.decreaseTransactionCountByOne();","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" Ui.showTransactionRemovedMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" public void findTask(String keyword) {","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e results \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" boolean isFound \u003d false;","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":" if (transaction.getDescription().contains(keyword.toLowerCase())) {","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"lckjosh"},"content":" isFound \u003d true;","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":" results.add(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"lckjosh"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"lckjosh"},"content":" if (isFound) {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"lckjosh"},"content":" int resultCount \u003d 1;","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Here are the matching tasks in your list:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : results) {","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" System.out.println(resultCount + \". \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"No matching tasks are found :/\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"vvhuiling"},"content":" public void viewTransaction(int transactionIndex) {","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"vvhuiling"},"content":" Transaction transaction \u003d transactions.get(transactionIndex-1);","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"vvhuiling"},"content":" Ui.showTransactionViewMessage(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"vvhuiling"},"content":" public void filterTransaction(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"vvhuiling"},"content":" ArrayList\u003cTransaction\u003e filteredTransactions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"vvhuiling"},"content":" boolean isFound \u003d false;","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"vvhuiling"},"content":" if (transaction.getCategory() \u003d\u003d category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"vvhuiling"},"content":" filteredTransactions.add(transaction);","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"vvhuiling"},"content":" isFound \u003d true;","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"vvhuiling"},"content":" if (isFound) {","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"vvhuiling"},"content":" Ui.showFilterMessage(filteredTransactions, category);","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Filtered transactions in the category \" + category + \":\");","lastModifiedDate":"2023-10-28"},{"lineNumber":79,"author":{"gitId":"vvhuiling"},"content":" int transactionCount \u003d 1;","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : filteredTransactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" System.out.println(transactionCount + \". \" + transaction.getDescription());","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" transactionCount++;","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"vvhuiling"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"vvhuiling"},"content":" Ui.showFilterNotFoundMessage(category);","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":"}","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spaceman03":3,"lckjosh":56,"vvhuiling":32}},{"path":"src/main/java/seedu/nuscents/data/exception/NuscentsException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.exception;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public class NuscentsException extends Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" public NuscentsException(String message) {","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" super(message);","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":7}},{"path":"src/main/java/seedu/nuscents/data/transaction/Allowance.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"public class Allowance extends Transaction {","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" public Allowance(float amount, Date date, String description, String additionalInfo, AllowanceCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" super(amount, date, description, additionalInfo, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":9}},{"path":"src/main/java/seedu/nuscents/data/transaction/AllowanceCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public enum AllowanceCategory implements TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":" SALARY, ALLOWANCE, INVESTMENTS, GIFTS, OTHERS, NO_ALLOWANCE_CATEGORY","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":4,"lckjosh":1}},{"path":"src/main/java/seedu/nuscents/data/transaction/Expense.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"public class Expense extends Transaction {","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" public Expense(float amount, Date date, String description, String additionalInfo, ExpenseCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" super(amount, date, description, additionalInfo, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":7,"lckjosh":3}},{"path":"src/main/java/seedu/nuscents/data/transaction/ExpenseCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public enum ExpenseCategory implements TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" FOOD, ENTERTAINMENT, TRANSPORTATION, UTILITY, RENT, OTHERS, NO_EXPENSE_CATEGORY","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":5}},{"path":"src/main/java/seedu/nuscents/data/transaction/Transaction.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"/**","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":" * Represents a Transaction in the TransactionList","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"public class Transaction {","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" private static int count \u003d 0;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"choonkit-nus"},"content":" protected float amount;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":" protected Date date;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":" protected String description;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":" protected String additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":" protected TransactionCategory category;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"lckjosh"},"content":" public Transaction(String description) {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":" count++;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"choonkit-nus"},"content":" public Transaction(float amount, Date date, String description) {","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"lckjosh"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"lckjosh"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" count++;","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public Transaction(float amount, Date date, String description, String additionalInfo,","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" TransactionCategory category) {","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" this.amount \u003d amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":" this.date \u003d date;","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" this.additionalInfo \u003d additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":" this.category \u003d category;","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" count++;","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"choonkit-nus"},"content":" public float getAmount() {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" return amount;","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" public Date getDate() {","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":" return date;","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" public String getFormattedDate() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd MMMM, yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" return formatter.format(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" public String getDescription() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" return description;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" public String getAdditionalInfo() {","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" return additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" public TransactionCategory getCategory() {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" public String toString() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" return getAmount() + \" | \" + getFormattedDate() + \" | \" + getDescription() + \" | \" + getAdditionalInfo()","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" + \" | \" + getCategory();","lastModifiedDate":"2023-10-23"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"lckjosh"},"content":" public static int getTransactionCount() {","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" return count;","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"spaceman03"},"content":" * Decrease the task count by one when a task is deleted.","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"lckjosh"},"content":" public static void decreaseTransactionCountByOne() {","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"spaceman03"},"content":" count--;","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":48,"lckjosh":29,"choonkit-nus":3}},{"path":"src/main/java/seedu/nuscents/data/transaction/TransactionCategory.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.data.transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public interface TransactionCategory {","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"spaceman03":4}},{"path":"src/main/java/seedu/nuscents/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ExitCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.ListCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.AddCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.DeleteCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.FindCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.HelpCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.commands.InvalidCommand;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.commands.ViewCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.commands.FilterCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.AllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"vvhuiling"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"aaronxujiachen"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_EXIT;","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_LIST;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_ALLOWANCE;","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_EXPENSE;","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_DELETE;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_FIND;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_HELP;","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_VIEW;","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.commands.ListOfCommands.COMMAND_FILTER;","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_UNKNOWN_EXPENSE_CATEGORY;","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_UNKNOWN_ALLOWANCE_CATEGORY;","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_DATE;","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_ALLOWANCE;","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_EXPENSE;","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_AMOUNT;","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_INDEX;","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_INDEX;","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"vvhuiling"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_INVALID_INDEX_ARGUMENTS;","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_FATAL_ERROR;","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_KEYWORD;","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"public class Parser {","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" private static final String DATE_PATTERN1 \u003d \"\\\\d{1,2}-\\\\d{1,2}-\\\\d{4}\"; // dd-mm-yyyy","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" private static final String DATE_PATTERN2 \u003d \"\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}\"; // yyyy-mm-dd","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" private static final String AMT_PATTERN \u003d \"/amt ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" private static final String DATE_PATTERN \u003d \"/date ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"lckjosh"},"content":" private static final String DESC_PATTERN \u003d \"/desc ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":" private static final String NOTE_PATTERN \u003d \"/note ([^/]+)\";","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" private static final String CATEGORY_PATTERN \u003d \"/cat ([^/]+)\";","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"lckjosh"},"content":" public static \u003cTransactionList\u003e Command parseCommand(String text, TransactionList transactions)","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" String[] commandTypeAndArgs \u003d text.split(\" \", 2);","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":" String commandType \u003d commandTypeAndArgs[0];","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" String arguments;","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" if (commandTypeAndArgs.length \u003e 1) {","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" arguments \u003d commandTypeAndArgs[1];","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" arguments \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" switch (commandType) {","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"aaronxujiachen"},"content":" case COMMAND_EXIT:","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":" return new ExitCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" case COMMAND_LIST:","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" case COMMAND_ALLOWANCE:","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"lckjosh"},"content":" return new AddCommand(parseAllowance(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"lckjosh"},"content":" case COMMAND_EXPENSE:","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"lckjosh"},"content":" return new AddCommand(parseExpense(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"spaceman03"},"content":" case COMMAND_DELETE:","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"spaceman03"},"content":" return new DeleteCommand(parseTaskIndex(arguments));","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" case COMMAND_FIND:","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":" return new FindCommand(parseFind(arguments));","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":" case COMMAND_VIEW:","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" return new ViewCommand(parseTaskIndex(arguments));","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" case COMMAND_FILTER:","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"vvhuiling"},"content":" return new FilterCommand(parseCategory(arguments));","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"spaceman03"},"content":" case COMMAND_HELP:","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"aaronxujiachen"},"content":" if (arguments !\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"aaronxujiachen"},"content":" throw new NuscentsException(\"OOPS!!! The correct format is \u0027help\u0027 alone.\");","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"spaceman03"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"spaceman03"},"content":" return new InvalidCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"spaceman03"},"content":" } catch (NuscentsException | ParseException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"spaceman03"},"content":" throw e;","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"spaceman03"},"content":" private static String datePatternValidation(String date) throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"spaceman03"},"content":" if (date.matches(DATE_PATTERN1)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"spaceman03"},"content":" return \"d-M-yyyy\";","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spaceman03"},"content":" } else if (date.matches(DATE_PATTERN2)) {","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"spaceman03"},"content":" return \"yyyy-M-d\";","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_INVALID_DATE);","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"spaceman03"},"content":" public static Date parseDate(String date, String format, SimpleDateFormat formatter)","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"spaceman03"},"content":" throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"spaceman03"},"content":" String separator;","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"spaceman03"},"content":" if (format.contains(\"-\")) {","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"spaceman03"},"content":" separator \u003d \"-\";","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"spaceman03"},"content":" separator \u003d \"/\";","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"spaceman03"},"content":" String[] dateMonthYear \u003d date.split(separator);","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" if (Integer.parseInt(dateMonthYear[1]) \u003e 12) {","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_INVALID_DATE);","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"spaceman03"},"content":" return formatter.parse(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"lckjosh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"lckjosh"},"content":" * Parsers arguments in the context of adding an allowance.","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":125,"author":{"gitId":"lckjosh"},"content":" * @param arguments full command argument string","lastModifiedDate":"2023-10-17"},{"lineNumber":126,"author":{"gitId":"lckjosh"},"content":" * @return a {@link Allowance} object","lastModifiedDate":"2023-10-17"},{"lineNumber":127,"author":{"gitId":"lckjosh"},"content":" * @throws NuscentsException If the description of the allowance is empty.","lastModifiedDate":"2023-10-17"},{"lineNumber":128,"author":{"gitId":"lckjosh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":129,"author":{"gitId":"spaceman03"},"content":" public static Allowance parseAllowance(String arguments) throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_ALLOWANCE);","lastModifiedDate":"2023-10-17"},{"lineNumber":132,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"choonkit-nus"},"content":" float amount \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"choonkit-nus"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":135,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(extractValue(\"allowance\", arguments, AMT_PATTERN, false));","lastModifiedDate":"2023-10-23"},{"lineNumber":136,"author":{"gitId":"choonkit-nus"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"choonkit-nus"},"content":" throw new NuscentsException(MESSAGE_INVALID_AMOUNT);","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"choonkit-nus"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"lckjosh"},"content":" String date \u003d extractValue(\"allowance\", arguments, DATE_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"lckjosh"},"content":" String description \u003d extractValue(\"allowance\", arguments, DESC_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"lckjosh"},"content":" String additionalInformation \u003d extractValue(\"allowance\", arguments, NOTE_PATTERN, true);","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"spaceman03"},"content":" String category \u003d extractValue(\"allowance\", arguments, CATEGORY_PATTERN, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory allowanceCategory \u003d parseAllowanceCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"spaceman03"},"content":" String format \u003d datePatternValidation(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(format);","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(date, format, formatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"lckjosh"},"content":" assert formattedDate !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":148,"author":{"gitId":"lckjosh"},"content":" assert description !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":149,"author":{"gitId":"lckjosh"},"content":" assert additionalInformation !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":150,"author":{"gitId":"lckjosh"},"content":" assert category !\u003d null;","lastModifiedDate":"2023-10-29"},{"lineNumber":151,"author":{"gitId":"spaceman03"},"content":" return new Allowance(amount, formattedDate, description, additionalInformation, allowanceCategory);","lastModifiedDate":"2023-10-23"},{"lineNumber":152,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":153,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":154,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":155,"author":{"gitId":"lckjosh"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"lckjosh"},"content":" * Parsers arguments in the context of adding an expense.","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":158,"author":{"gitId":"lckjosh"},"content":" * @param arguments full command argument string","lastModifiedDate":"2023-10-17"},{"lineNumber":159,"author":{"gitId":"lckjosh"},"content":" * @return a {@link Expense} object","lastModifiedDate":"2023-10-17"},{"lineNumber":160,"author":{"gitId":"lckjosh"},"content":" * @throws NuscentsException If the description of the expense is empty.","lastModifiedDate":"2023-10-17"},{"lineNumber":161,"author":{"gitId":"lckjosh"},"content":" */","lastModifiedDate":"2023-10-17"},{"lineNumber":162,"author":{"gitId":"spaceman03"},"content":" public static Expense parseExpense(String arguments) throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":163,"author":{"gitId":"lckjosh"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-17"},{"lineNumber":164,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_EXPENSE);","lastModifiedDate":"2023-10-17"},{"lineNumber":165,"author":{"gitId":"lckjosh"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":166,"author":{"gitId":"choonkit-nus"},"content":" float amount \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"choonkit-nus"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":168,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(extractValue(\"expense\", arguments, AMT_PATTERN, false));","lastModifiedDate":"2023-10-22"},{"lineNumber":169,"author":{"gitId":"choonkit-nus"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":170,"author":{"gitId":"choonkit-nus"},"content":" throw new NuscentsException(MESSAGE_INVALID_AMOUNT);","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"choonkit-nus"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":172,"author":{"gitId":"lckjosh"},"content":" String date \u003d extractValue(\"expense\", arguments, DATE_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":173,"author":{"gitId":"lckjosh"},"content":" String description \u003d extractValue(\"expense\", arguments, DESC_PATTERN, false);","lastModifiedDate":"2023-10-17"},{"lineNumber":174,"author":{"gitId":"lckjosh"},"content":" String additionalInformation \u003d extractValue(\"expense\", arguments, NOTE_PATTERN, true);","lastModifiedDate":"2023-10-17"},{"lineNumber":175,"author":{"gitId":"spaceman03"},"content":" String category \u003d extractValue(\"expense\", arguments, CATEGORY_PATTERN, true);","lastModifiedDate":"2023-10-23"},{"lineNumber":176,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory expenseCategory \u003d parseExpenseCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":177,"author":{"gitId":"spaceman03"},"content":" String format \u003d datePatternValidation(date);","lastModifiedDate":"2023-10-17"},{"lineNumber":178,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(format);","lastModifiedDate":"2023-10-17"},{"lineNumber":179,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(date, format, formatter);","lastModifiedDate":"2023-10-17"},{"lineNumber":180,"author":{"gitId":"spaceman03"},"content":" return new Expense(amount, formattedDate, description, additionalInformation, expenseCategory);","lastModifiedDate":"2023-10-23"},{"lineNumber":181,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":182,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":183,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":184,"author":{"gitId":"spaceman03"},"content":" public static ExpenseCategory parseExpenseCategory(String expenseCategory) throws NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":185,"author":{"gitId":"spaceman03"},"content":" String expenseCategoryLowercase \u003d expenseCategory.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":186,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory category \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":187,"author":{"gitId":"spaceman03"},"content":" switch (expenseCategoryLowercase) {","lastModifiedDate":"2023-10-23"},{"lineNumber":188,"author":{"gitId":"spaceman03"},"content":" case \"food\":","lastModifiedDate":"2023-10-23"},{"lineNumber":189,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.FOOD;","lastModifiedDate":"2023-10-23"},{"lineNumber":190,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":191,"author":{"gitId":"spaceman03"},"content":" case \"entertainment\":","lastModifiedDate":"2023-10-23"},{"lineNumber":192,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.ENTERTAINMENT;","lastModifiedDate":"2023-10-23"},{"lineNumber":193,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":194,"author":{"gitId":"spaceman03"},"content":" case \"transportation\":","lastModifiedDate":"2023-10-23"},{"lineNumber":195,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.TRANSPORTATION;","lastModifiedDate":"2023-10-23"},{"lineNumber":196,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":197,"author":{"gitId":"spaceman03"},"content":" case \"utility\":","lastModifiedDate":"2023-10-23"},{"lineNumber":198,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.UTILITY;","lastModifiedDate":"2023-10-23"},{"lineNumber":199,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":200,"author":{"gitId":"spaceman03"},"content":" case \"rent\":","lastModifiedDate":"2023-10-23"},{"lineNumber":201,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.RENT;","lastModifiedDate":"2023-10-23"},{"lineNumber":202,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":203,"author":{"gitId":"spaceman03"},"content":" case \"others\":","lastModifiedDate":"2023-10-23"},{"lineNumber":204,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.OTHERS;","lastModifiedDate":"2023-10-23"},{"lineNumber":205,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":206,"author":{"gitId":"spaceman03"},"content":" case \"\":","lastModifiedDate":"2023-10-23"},{"lineNumber":207,"author":{"gitId":"lckjosh"},"content":" // fallthrough","lastModifiedDate":"2023-10-29"},{"lineNumber":208,"author":{"gitId":"spaceman03"},"content":" case \"no_expense_category\":","lastModifiedDate":"2023-10-23"},{"lineNumber":209,"author":{"gitId":"spaceman03"},"content":" category \u003d ExpenseCategory.NO_EXPENSE_CATEGORY;","lastModifiedDate":"2023-10-23"},{"lineNumber":210,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":211,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":212,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_EXPENSE_CATEGORY);","lastModifiedDate":"2023-10-29"},{"lineNumber":213,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":214,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":215,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":216,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":217,"author":{"gitId":"spaceman03"},"content":" public static AllowanceCategory parseAllowanceCategory(String allowanceCategory) throws NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":218,"author":{"gitId":"spaceman03"},"content":" String allowanceCategoryLowerCase \u003d allowanceCategory.toLowerCase();","lastModifiedDate":"2023-10-23"},{"lineNumber":219,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory category \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":220,"author":{"gitId":"spaceman03"},"content":" switch (allowanceCategoryLowerCase) {","lastModifiedDate":"2023-10-23"},{"lineNumber":221,"author":{"gitId":"lckjosh"},"content":" case \"salary\":","lastModifiedDate":"2023-10-29"},{"lineNumber":222,"author":{"gitId":"lckjosh"},"content":" category \u003d AllowanceCategory.SALARY;","lastModifiedDate":"2023-10-29"},{"lineNumber":223,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-29"},{"lineNumber":224,"author":{"gitId":"lckjosh"},"content":" case \"allowance\":","lastModifiedDate":"2023-10-29"},{"lineNumber":225,"author":{"gitId":"lckjosh"},"content":" category \u003d AllowanceCategory.ALLOWANCE;","lastModifiedDate":"2023-10-29"},{"lineNumber":226,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-29"},{"lineNumber":227,"author":{"gitId":"lckjosh"},"content":" case \"investments\":","lastModifiedDate":"2023-10-29"},{"lineNumber":228,"author":{"gitId":"lckjosh"},"content":" category \u003d AllowanceCategory.INVESTMENTS;","lastModifiedDate":"2023-10-29"},{"lineNumber":229,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-29"},{"lineNumber":230,"author":{"gitId":"lckjosh"},"content":" case \"gifts\":","lastModifiedDate":"2023-10-29"},{"lineNumber":231,"author":{"gitId":"lckjosh"},"content":" category \u003d AllowanceCategory.GIFTS;","lastModifiedDate":"2023-10-29"},{"lineNumber":232,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-29"},{"lineNumber":233,"author":{"gitId":"lckjosh"},"content":" case \"others\":","lastModifiedDate":"2023-10-29"},{"lineNumber":234,"author":{"gitId":"lckjosh"},"content":" category \u003d AllowanceCategory.OTHERS;","lastModifiedDate":"2023-10-29"},{"lineNumber":235,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":236,"author":{"gitId":"spaceman03"},"content":" case \"\":","lastModifiedDate":"2023-10-23"},{"lineNumber":237,"author":{"gitId":"lckjosh"},"content":" // fallthrough","lastModifiedDate":"2023-10-29"},{"lineNumber":238,"author":{"gitId":"spaceman03"},"content":" case \"no_allowance_category\":","lastModifiedDate":"2023-10-23"},{"lineNumber":239,"author":{"gitId":"spaceman03"},"content":" category \u003d AllowanceCategory.NO_ALLOWANCE_CATEGORY;","lastModifiedDate":"2023-10-23"},{"lineNumber":240,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-23"},{"lineNumber":241,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-23"},{"lineNumber":242,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_ALLOWANCE_CATEGORY);","lastModifiedDate":"2023-10-29"},{"lineNumber":243,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":244,"author":{"gitId":"spaceman03"},"content":" return category;","lastModifiedDate":"2023-10-23"},{"lineNumber":245,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":246,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":247,"author":{"gitId":"vvhuiling"},"content":" public static TransactionCategory parseCategory(String transactionCategory) throws NuscentsException {","lastModifiedDate":"2023-10-28"},{"lineNumber":248,"author":{"gitId":"vvhuiling"},"content":" String allowanceCategoryLowerCase \u003d transactionCategory.toLowerCase();","lastModifiedDate":"2023-10-28"},{"lineNumber":249,"author":{"gitId":"vvhuiling"},"content":" TransactionCategory category \u003d null;","lastModifiedDate":"2023-10-28"},{"lineNumber":250,"author":{"gitId":"vvhuiling"},"content":" switch (allowanceCategoryLowerCase) {","lastModifiedDate":"2023-10-28"},{"lineNumber":251,"author":{"gitId":"vvhuiling"},"content":" case \"work\":","lastModifiedDate":"2023-10-28"},{"lineNumber":252,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":253,"author":{"gitId":"vvhuiling"},"content":" case \"food\":","lastModifiedDate":"2023-10-28"},{"lineNumber":254,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.FOOD;","lastModifiedDate":"2023-10-28"},{"lineNumber":255,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":256,"author":{"gitId":"vvhuiling"},"content":" case \"entertainment\":","lastModifiedDate":"2023-10-28"},{"lineNumber":257,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.ENTERTAINMENT;","lastModifiedDate":"2023-10-28"},{"lineNumber":258,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":259,"author":{"gitId":"vvhuiling"},"content":" case \"transportation\":","lastModifiedDate":"2023-10-28"},{"lineNumber":260,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.TRANSPORTATION;","lastModifiedDate":"2023-10-28"},{"lineNumber":261,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":262,"author":{"gitId":"vvhuiling"},"content":" case \"utility\":","lastModifiedDate":"2023-10-28"},{"lineNumber":263,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.UTILITY;","lastModifiedDate":"2023-10-28"},{"lineNumber":264,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":265,"author":{"gitId":"vvhuiling"},"content":" case \"rent\":","lastModifiedDate":"2023-10-28"},{"lineNumber":266,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.RENT;","lastModifiedDate":"2023-10-28"},{"lineNumber":267,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":268,"author":{"gitId":"vvhuiling"},"content":" case \"others\":","lastModifiedDate":"2023-10-28"},{"lineNumber":269,"author":{"gitId":"vvhuiling"},"content":" category \u003d ExpenseCategory.OTHERS;","lastModifiedDate":"2023-10-28"},{"lineNumber":270,"author":{"gitId":"vvhuiling"},"content":" break;","lastModifiedDate":"2023-10-28"},{"lineNumber":271,"author":{"gitId":"vvhuiling"},"content":" default:","lastModifiedDate":"2023-10-28"},{"lineNumber":272,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_UNKNOWN_EXPENSE_CATEGORY);","lastModifiedDate":"2023-10-29"},{"lineNumber":273,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":274,"author":{"gitId":"vvhuiling"},"content":" return category;","lastModifiedDate":"2023-10-28"},{"lineNumber":275,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":276,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":277,"author":{"gitId":"spaceman03"},"content":" public static int parseTaskIndex(String arguments) throws IndexOutOfBoundsException,","lastModifiedDate":"2023-10-16"},{"lineNumber":278,"author":{"gitId":"spaceman03"},"content":" NuscentsException {","lastModifiedDate":"2023-10-16"},{"lineNumber":279,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":280,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_EMPTY_INDEX);","lastModifiedDate":"2023-10-16"},{"lineNumber":281,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":282,"author":{"gitId":"vvhuiling"},"content":" try {","lastModifiedDate":"2023-10-18"},{"lineNumber":283,"author":{"gitId":"spaceman03"},"content":" int taskIndex \u003d Integer.parseInt(arguments);","lastModifiedDate":"2023-10-16"},{"lineNumber":284,"author":{"gitId":"lckjosh"},"content":" if (taskIndex \u003e Transaction.getTransactionCount() || taskIndex \u003c\u003d 0) {","lastModifiedDate":"2023-10-17"},{"lineNumber":285,"author":{"gitId":"spaceman03"},"content":" throw new IndexOutOfBoundsException(MESSAGE_INVALID_INDEX);","lastModifiedDate":"2023-10-16"},{"lineNumber":286,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":287,"author":{"gitId":"spaceman03"},"content":" return taskIndex;","lastModifiedDate":"2023-10-16"},{"lineNumber":288,"author":{"gitId":"vvhuiling"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-18"},{"lineNumber":289,"author":{"gitId":"vvhuiling"},"content":" throw new NuscentsException(MESSAGE_INVALID_INDEX_ARGUMENTS);","lastModifiedDate":"2023-10-18"},{"lineNumber":290,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":291,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":292,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":293,"author":{"gitId":"spaceman03"},"content":" public static String parseFind(String arguments) throws NuscentsException {","lastModifiedDate":"2023-10-16"},{"lineNumber":294,"author":{"gitId":"spaceman03"},"content":" if (arguments \u003d\u003d null) {","lastModifiedDate":"2023-10-16"},{"lineNumber":295,"author":{"gitId":"spaceman03"},"content":" throw new NuscentsException(MESSAGE_EMPTY_KEYWORD);","lastModifiedDate":"2023-10-16"},{"lineNumber":296,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":297,"author":{"gitId":"spaceman03"},"content":" return arguments;","lastModifiedDate":"2023-10-16"},{"lineNumber":298,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":299,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":300,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":301,"author":{"gitId":"lckjosh"},"content":" private static String extractValue(String command, String input, String pattern, boolean isOptional)","lastModifiedDate":"2023-10-17"},{"lineNumber":302,"author":{"gitId":"lckjosh"},"content":" throws NuscentsException {","lastModifiedDate":"2023-10-17"},{"lineNumber":303,"author":{"gitId":"lckjosh"},"content":" java.util.regex.Pattern p \u003d java.util.regex.Pattern.compile(pattern);","lastModifiedDate":"2023-10-17"},{"lineNumber":304,"author":{"gitId":"lckjosh"},"content":" java.util.regex.Matcher m \u003d p.matcher(input);","lastModifiedDate":"2023-10-17"},{"lineNumber":305,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":306,"author":{"gitId":"lckjosh"},"content":" if (m.find()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":307,"author":{"gitId":"lckjosh"},"content":" return m.group(1).trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":308,"author":{"gitId":"lckjosh"},"content":" } else if (!isOptional) {","lastModifiedDate":"2023-10-17"},{"lineNumber":309,"author":{"gitId":"lckjosh"},"content":" switch (command) {","lastModifiedDate":"2023-10-17"},{"lineNumber":310,"author":{"gitId":"lckjosh"},"content":" case \"allowance\":","lastModifiedDate":"2023-10-17"},{"lineNumber":311,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_ALLOWANCE);","lastModifiedDate":"2023-10-17"},{"lineNumber":312,"author":{"gitId":"lckjosh"},"content":" case \"expense\":","lastModifiedDate":"2023-10-17"},{"lineNumber":313,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_EMPTY_EXPENSE);","lastModifiedDate":"2023-10-17"},{"lineNumber":314,"author":{"gitId":"lckjosh"},"content":" default:","lastModifiedDate":"2023-10-17"},{"lineNumber":315,"author":{"gitId":"lckjosh"},"content":" throw new NuscentsException(MESSAGE_FATAL_ERROR);","lastModifiedDate":"2023-10-17"},{"lineNumber":316,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":317,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":318,"author":{"gitId":"lckjosh"},"content":" return \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":319,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":320,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":5,"spaceman03":171,"lckjosh":89,"vvhuiling":43,"choonkit-nus":12}},{"path":"src/main/java/seedu/nuscents/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.storage;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.AllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.ui.Ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.io.File;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseAllowanceCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":"public class Storage {","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" private static final Logger logger \u003d Logger.getLogger(Storage.class.getName());","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" private String filePath;","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" public Storage(String filePath) {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" this.filePath \u003d filePath;","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"lckjosh"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" FileHandler fileHandler \u003d new FileHandler(\"storage.log\");","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"lckjosh"},"content":" logger.addHandler(fileHandler);","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" logger.setUseParentHandlers(false);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" logger.log(Level.SEVERE, \"Logging to file not working.\", e);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" public String getPath() {","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" return filePath;","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" * Reads data from the storage file and return it.","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" * @return an arraylist of tasks","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" * @throws FileNotFoundException If the storage file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" public ArrayList\u003cTransaction\u003e readDataFromFile() throws FileNotFoundException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Creating a File object to read data from file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" transactionDecoder(file, transactions);","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" } catch (ParseException | NuscentsException e) {","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.WARNING, \"Something went wrong when reading data from file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Something went wrong: \" + e.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" Ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"All data successfully loaded\");","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"lckjosh"},"content":" return transactions;","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" * Decodes the storage data file and store it into the arraylist of tasks.","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":" * @param file storage data file","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"lckjosh"},"content":" * @param transactions arraylist of tasks","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"spaceman03"},"content":" * @throws FileNotFoundException If the storage data file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"lckjosh"},"content":" private static void transactionDecoder(File file, ArrayList\u003cTransaction\u003e transactions)","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" throws FileNotFoundException, ParseException, NuscentsException {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":" Scanner data \u003d new Scanner(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":" while (data.hasNext()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"lckjosh"},"content":" String transactionDetails \u003d data.nextLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"lckjosh"},"content":" char transactionType \u003d transactionDetails.charAt(0);","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"lckjosh"},"content":" String[] columns;","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"choonkit-nus"},"content":" float amount;","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spaceman03"},"content":" Date date;","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"lckjosh"},"content":" String description \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"lckjosh"},"content":" String note \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spaceman03"},"content":" String category\u003d \"\";","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd MMMM, yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"lckjosh"},"content":" switch (transactionType) {","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"lckjosh"},"content":" case \u0027A\u0027:","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"lckjosh"},"content":" columns \u003d transactionDetails.split(\"\\\\s*\\\\|\\\\s*\");","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(columns[1]);","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" date \u003d formatter.parse(columns[2]);","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"lckjosh"},"content":" description \u003d columns[3];","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"lckjosh"},"content":" note \u003d \"\";","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"lckjosh"},"content":" if (columns.length \u003e 4) {","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"lckjosh"},"content":" note \u003d columns[4];","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spaceman03"},"content":" AllowanceCategory allowanceCategory \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":101,"author":{"gitId":"spaceman03"},"content":" if (columns.length \u003e 5) {","lastModifiedDate":"2023-10-23"},{"lineNumber":102,"author":{"gitId":"spaceman03"},"content":" category \u003d columns[5];","lastModifiedDate":"2023-10-23"},{"lineNumber":103,"author":{"gitId":"spaceman03"},"content":" allowanceCategory \u003d parseAllowanceCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":104,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":105,"author":{"gitId":"spaceman03"},"content":" transactions.add(new Allowance(amount, date, description, note, allowanceCategory));","lastModifiedDate":"2023-10-23"},{"lineNumber":106,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":108,"author":{"gitId":"lckjosh"},"content":" case \u0027E\u0027:","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"lckjosh"},"content":" columns \u003d transactionDetails.split(\"\\\\s*\\\\|\\\\s*\");","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"choonkit-nus"},"content":" amount \u003d Float.parseFloat(columns[1]);","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"spaceman03"},"content":" date \u003d formatter.parse(columns[2]);","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"lckjosh"},"content":" description \u003d columns[3];","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"lckjosh"},"content":" if (columns.length \u003e 4) {","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"lckjosh"},"content":" note \u003d columns[4];","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory expenseCategory \u003d null;","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"spaceman03"},"content":" if (columns.length \u003e 5) {","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"spaceman03"},"content":" category \u003d columns[5];","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"spaceman03"},"content":" expenseCategory \u003d parseExpenseCategory(category);","lastModifiedDate":"2023-10-23"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"spaceman03"},"content":" transactions.add(new Expense(amount, date, description, note, expenseCategory));","lastModifiedDate":"2023-10-23"},{"lineNumber":122,"author":{"gitId":"lckjosh"},"content":" break;","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":124,"author":{"gitId":"spaceman03"},"content":" default:","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"spaceman03"},"content":" break;","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"spaceman03"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"spaceman03"},"content":" * Writes the data to the storage file.","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"spaceman03"},"content":" * Creates a new file if the file does not exist.","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"lckjosh"},"content":" *","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"lckjosh"},"content":" * @param transactionList list of tasks","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"spaceman03"},"content":" * @throws IOException If there were errors converting and/or storing the data to the file.","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"spaceman03"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"lckjosh"},"content":" public void writeToFile(TransactionList transactionList) throws IOException {","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"spaceman03"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2023-10-16"},{"lineNumber":139,"author":{"gitId":"spaceman03"},"content":" FileWriter fw \u003d new FileWriter(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":140,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Creating a File object to write data to file\");","lastModifiedDate":"2023-10-18"},{"lineNumber":141,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d transactionList.getTransactions();","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Converting info to storage format\");","lastModifiedDate":"2023-10-18"},{"lineNumber":144,"author":{"gitId":"spaceman03"},"content":" String output \u003d toStorageFormat(transaction);","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"spaceman03"},"content":" fw.write(output);","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"spaceman03"},"content":" fw.write(\"\\n\");","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.INFO, \"Transaction data successfully stored\");","lastModifiedDate":"2023-10-18"},{"lineNumber":149,"author":{"gitId":"spaceman03"},"content":" fw.close();","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":151,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"spaceman03"},"content":" private static String toStorageFormat(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":153,"author":{"gitId":"lckjosh"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":154,"author":{"gitId":"spaceman03"},"content":" return \"A\" + \" | \" + transaction.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":155,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":156,"author":{"gitId":"lckjosh"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":157,"author":{"gitId":"spaceman03"},"content":" return \"E\" + \" | \" + transaction.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":158,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":159,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":160,"author":{"gitId":"spaceman03"},"content":" logger.log(Level.WARNING, \"Invalid transaction format\");","lastModifiedDate":"2023-10-18"},{"lineNumber":161,"author":{"gitId":"spaceman03"},"content":" return null;","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":163,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":164,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"},{"lineNumber":165,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spaceman03":116,"lckjosh":46,"choonkit-nus":3}},{"path":"src/main/java/seedu/nuscents/ui/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"public class Messages {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":" public static final String LINE \u003d \"-------------------------------------------------------------------------------\"","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":" + \"--------------\";","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":" public static final String LOGO \u003d \" __ __ __ __ ____ _____ _____ __ __ ________ ____\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":" + \"| \\\\ | | | | |/ / / __| | \\\\ | |__ __|/ /\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":" + \"| \\\\| | | | |\\\\ __\\\\| / | __| \\\\| | | | \\\\ __\\\\\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":" + \"| | | | | \\\\__ | | | __| | | | \\\\__ |\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":" + \"| | |__| |/ | \\\\__| | | | | / |\\n\"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":" + \"|__|\\\\___|________|______/ \\\\_____|_____|__|\\\\___| |__| |_____/\\n\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"aaronxujiachen"},"content":" public static final String MESSAGE_EXIT \u003d \"Thank you for using NUScents. Hope to see you again soon!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"aaronxujiachen"},"content":" public static final String HELP_MENU \u003d","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"aaronxujiachen"},"content":" \"- `list` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"aaronxujiachen"},"content":" \" Show a list of all entries.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"aaronxujiachen"},"content":" \"- `allowance /amt AMOUNT /date DATE /desc DESCRIPTION /cat CATEGORY \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"aaronxujiachen"},"content":" \"[/note ADDITIONAL_INFORMATION]` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"aaronxujiachen"},"content":" \" Add an allowance.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"aaronxujiachen"},"content":" \"- `expense /amt AMOUNT /date DATE /desc DESCRIPTION /cat CATEGORY \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"aaronxujiachen"},"content":" \"[/note ADDITIONAL_INFORMATION]` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"aaronxujiachen"},"content":" \" Add an expense.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"aaronxujiachen"},"content":" \"- `delete ENTRY_NUMBER` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"aaronxujiachen"},"content":" \" Delete an entry.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"aaronxujiachen"},"content":" \"- `view ENTRY_NUMBER` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"aaronxujiachen"},"content":" \" View an entry detail.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"aaronxujiachen"},"content":" \"- `exit` :\" + System.lineSeparator() +","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"aaronxujiachen"},"content":" \" Exit the program.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_UNKNOWN \u003d \"OOPS!!! I\u0027m sorry, but I don\u0027t know what that means :-(\";","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_ALLOWANCE \u003d \"OOPS!!! Invalid input format for adding an allowance.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_EXPENSE \u003d \"OOPS!!! Invalid input format for adding an expense.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"choonkit-nus"},"content":" public static final String MESSAGE_INVALID_AMOUNT \u003d \"OOPS!!! The amount entered needs to be a float!\";","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_INVALID_DATE \u003d \"OOPS!!! The format of the date is invalid.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"OOPS!!! This is an invalid transaction index.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"vvhuiling"},"content":" public static final String MESSAGE_INVALID_INDEX_ARGUMENTS \u003d \"OOPS!!! The input should consist only of digits.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_EMPTY_LIST \u003d \"You have not made any transactions!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_EMPTY_KEYWORD \u003d \"OOPS!!! The keyword of a find command cannot be empty.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"vvhuiling"},"content":" public static final String MESSAGE_EMPTY_INDEX \u003d \"OOPS!!! The index of a delete/view command cannot be empty.\";","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_FATAL_ERROR \u003d \"OOPS!!! Fatal error occurred...\";","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" public static final String MESSAGE_READ_ERROR \u003d \"OOPS!!! A problem occurred while reading the data file.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_UNKNOWN_EXPENSE_CATEGORY \u003d \"OOPS!!! The category you provided is not a \"","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":" + \"valid category.\\n\"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" + \"Valid categories are FOOD/ENTERTAINMENT/TRANSPORTATION/UTILITY/RENT/OTHERS.\";","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":" public static final String MESSAGE_UNKNOWN_ALLOWANCE_CATEGORY \u003d \"OOPS!!! The category you provided is not a \"","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" + \"valid category.\\n\"","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":" + \"Valid categories are SALARY/ALLOWANCE/INVESTMENTS/GIFTS/OTHERS.\";","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":17,"spaceman03":17,"lckjosh":10,"choonkit-nus":1,"vvhuiling":2}},{"path":"src/main/java/seedu/nuscents/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.AllowanceCategory;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.transaction.TransactionCategory;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"aaronxujiachen"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EXIT;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.LINE;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.LOGO;","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.ui.Messages.MESSAGE_EMPTY_LIST;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"public class Ui {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":" private final Scanner input;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":" public Ui() {","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" this.input \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" public String getUserCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":" return input.nextLine();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" public static void showLine() {","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" public static void showWelcomeMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"Hello from\\n\" + LOGO);","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"What can I do for you?\");","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(\"Hint: To view a list of all possible commands, please enter \u0027help\u0027.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" public static void showGoodbyeMessage() {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(MESSAGE_EXIT);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" public void showException(Exception e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionCount( ) {","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Now you have \" + Transaction.getTransactionCount() + \" transactions in the list.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionAddedMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Got it. I\u0027ve added this transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" System.out.println(\" \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"lckjosh"},"content":" showTransactionCount();","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionRemovedMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Noted. I\u0027ve removed this transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"spaceman03"},"content":" System.out.println(\" \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"lckjosh"},"content":" showTransactionCount();","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"lckjosh"},"content":" public static void showTransactionList(TransactionList transactionList) {","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"choonkit-nus"},"content":" float netBalance \u003d 0;","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"lckjosh"},"content":" if (transactionList.getTransactions().isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"spaceman03"},"content":" System.out.println(MESSAGE_EMPTY_LIST);","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"spaceman03"},"content":" return;","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"spaceman03"},"content":" assert transactionList.getTransactions() !\u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"lckjosh"},"content":" System.out.println(\"Here are the transactions in your list:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"spaceman03"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-10s %-5s %n\",","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"spaceman03"},"content":" \"S/N\", \"TYPE\", \"AMOUNT\", \"DATE\", \"DESCRIPTION\", \"NOTE\", \"CATEGORY\");","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"lckjosh"},"content":" ArrayList\u003cTransaction\u003e transactions \u003d transactionList.getTransactions();","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"lckjosh"},"content":" for (Transaction transaction : transactions) {","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"spaceman03"},"content":" int index \u003d transactions.indexOf(transaction) + 1;","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"spaceman03"},"content":" String additionalInfo \u003d transaction.getAdditionalInfo();","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"spaceman03"},"content":" String note;","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"spaceman03"},"content":" if (additionalInfo.isEmpty()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"spaceman03"},"content":" note \u003d \"-\";","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"spaceman03"},"content":" note \u003d additionalInfo;","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"spaceman03"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"lckjosh"},"content":" TransactionCategory allowanceCategory \u003d transaction.getCategory();","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"lckjosh"},"content":" String category;","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"lckjosh"},"content":" if (allowanceCategory \u003d\u003d AllowanceCategory.NO_ALLOWANCE_CATEGORY) {","lastModifiedDate":"2023-10-29"},{"lineNumber":102,"author":{"gitId":"lckjosh"},"content":" category \u003d \"-\";","lastModifiedDate":"2023-10-29"},{"lineNumber":103,"author":{"gitId":"lckjosh"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":104,"author":{"gitId":"lckjosh"},"content":" category \u003d allowanceCategory.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":105,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":106,"author":{"gitId":"lckjosh"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-10s %-5s %n\", index, \"Allowance\",","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"choonkit-nus"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"lckjosh"},"content":" transaction.getDescription(), note, category);","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"choonkit-nus"},"content":" netBalance +\u003d transaction.getAmount();","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"spaceman03"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"spaceman03"},"content":" TransactionCategory expenseCategory \u003d transaction.getCategory();","lastModifiedDate":"2023-10-23"},{"lineNumber":112,"author":{"gitId":"spaceman03"},"content":" String category;","lastModifiedDate":"2023-10-23"},{"lineNumber":113,"author":{"gitId":"spaceman03"},"content":" if (expenseCategory \u003d\u003d ExpenseCategory.NO_EXPENSE_CATEGORY) {","lastModifiedDate":"2023-10-23"},{"lineNumber":114,"author":{"gitId":"spaceman03"},"content":" category \u003d \"-\";","lastModifiedDate":"2023-10-23"},{"lineNumber":115,"author":{"gitId":"spaceman03"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":116,"author":{"gitId":"spaceman03"},"content":" category \u003d expenseCategory.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":117,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":118,"author":{"gitId":"spaceman03"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-10s %-5s %n\", index, \"Expense\",","lastModifiedDate":"2023-10-23"},{"lineNumber":119,"author":{"gitId":"choonkit-nus"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"spaceman03"},"content":" transaction.getDescription(), note, category);","lastModifiedDate":"2023-10-23"},{"lineNumber":121,"author":{"gitId":"choonkit-nus"},"content":" netBalance -\u003d transaction.getAmount();","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":123,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"choonkit-nus"},"content":" System.out.println(\"Net Balance \u003d \" + String.format(\"%.2f\", netBalance));","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"choonkit-nus"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"spaceman03"},"content":" public static void showReadDataError() {","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"spaceman03"},"content":" System.out.println(\"No previous data found /:\");","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":134,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"vvhuiling"},"content":" public static void showTransactionViewMessage(Transaction transaction) {","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Following are details of the transaction:\");","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"vvhuiling"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"TYPE: ALLOWANCE\");","lastModifiedDate":"2023-10-17"},{"lineNumber":140,"author":{"gitId":"vvhuiling"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-17"},{"lineNumber":141,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"TYPE: EXPENSE\");","lastModifiedDate":"2023-10-17"},{"lineNumber":142,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"DATE: \" + transaction.getFormattedDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":144,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"AMOUNT: \" + transaction.getAmount());","lastModifiedDate":"2023-10-17"},{"lineNumber":145,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"DESCRIPTION: \" + transaction.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"NOTE: \" + transaction.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-17"},{"lineNumber":148,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":150,"author":{"gitId":"vvhuiling"},"content":" public static void showFilterMessage(ArrayList\u003cTransaction\u003e filteredTransactions, TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Filtered transactions in the category \" + category.toString() + \":\");","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"vvhuiling"},"content":" float netBalance \u003d 0;","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"vvhuiling"},"content":" for (Transaction transaction : filteredTransactions) {","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"vvhuiling"},"content":" int index \u003d filteredTransactions.indexOf(transaction) + 1;","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"vvhuiling"},"content":" String additionalInfo \u003d transaction.getAdditionalInfo();","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"vvhuiling"},"content":" String note;","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"vvhuiling"},"content":" if (additionalInfo.isEmpty()) {","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"vvhuiling"},"content":" note \u003d \"-\";","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"vvhuiling"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"vvhuiling"},"content":" note \u003d additionalInfo;","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"vvhuiling"},"content":" System.out.printf(\"%-5s %-10s %-7s %-18s %-15s %-5s %n\", index, \"Allowance\",","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"vvhuiling"},"content":" \"$\" + String.format(\"%.2f\", transaction.getAmount()), transaction.getFormattedDate(),","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"vvhuiling"},"content":" transaction.getDescription(), note);","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"vvhuiling"},"content":" if (transaction instanceof Allowance) {","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"vvhuiling"},"content":" netBalance +\u003d transaction.getAmount();","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"vvhuiling"},"content":" } else if (transaction instanceof Expense) {","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"vvhuiling"},"content":" netBalance -\u003d transaction.getAmount();","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"Net Balance \u003d \" + String.format(\"%.2f\", netBalance));","lastModifiedDate":"2023-10-28"},{"lineNumber":174,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":175,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":176,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":177,"author":{"gitId":"vvhuiling"},"content":" public static void showFilterNotFoundMessage(TransactionCategory category) {","lastModifiedDate":"2023-10-28"},{"lineNumber":178,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":179,"author":{"gitId":"vvhuiling"},"content":" System.out.println(\"No transactions found in the category \" + category.toString());","lastModifiedDate":"2023-10-28"},{"lineNumber":180,"author":{"gitId":"vvhuiling"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-28"},{"lineNumber":181,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":184,"author":{"gitId":"spaceman03"},"content":" public static void showHelpMenu() {","lastModifiedDate":"2023-10-16"},{"lineNumber":185,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":186,"author":{"gitId":"aaronxujiachen"},"content":" System.out.println(Messages.HELP_MENU);","lastModifiedDate":"2023-10-18"},{"lineNumber":187,"author":{"gitId":"spaceman03"},"content":" System.out.println(LINE);","lastModifiedDate":"2023-10-16"},{"lineNumber":188,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":189,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":190,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"aaronxujiachen":5,"spaceman03":100,"lckjosh":29,"choonkit-nus":7,"vvhuiling":49}},{"path":"src/test/java/seedu/nuscents/NuscentsTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents;","lastModifiedDate":"2023-10-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"class NuscentsTest {","lastModifiedDate":"2023-10-13"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"spaceman03":2,"-":10}},{"path":"src/test/java/seedu/nuscents/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"lckjosh"},"content":"package seedu.nuscents.parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"lckjosh"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Transaction;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Allowance;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"lckjosh"},"content":"import seedu.nuscents.data.exception.NuscentsException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"aaronxujiachen"},"content":"import seedu.nuscents.commands.Command;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"aaronxujiachen"},"content":"import seedu.nuscents.commands.HelpCommand;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lckjosh"},"content":"import java.text.ParseException;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"lckjosh"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"lckjosh"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"lckjosh"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"aaronxujiachen"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"lckjosh"},"content":"public class ParserTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_validInput_success() throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"choonkit-nus"},"content":" String arguments \u003d \"/amt 100.0 /date 15-10-2023 /desc Birthday Gift /note From friends\";","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"lckjosh"},"content":" Allowance allowance \u003d Parser.parseAllowance(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"choonkit-nus"},"content":" assertEquals(100.0, allowance.getAmount());","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"lckjosh"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"d-M-yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"lckjosh"},"content":" String formattedDate \u003d formatter.format(allowance.getDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"15-10-2023\", formattedDate);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Birthday Gift\", allowance.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"From friends\", allowance.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_validInput_success() throws NuscentsException, ParseException {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"choonkit-nus"},"content":" String arguments \u003d \"/amt 50.0 /date 16-10-2023 /desc Dinner /note Alone\";","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lckjosh"},"content":" Expense expense \u003d Parser.parseExpense(arguments);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"choonkit-nus"},"content":" assertEquals(50.0, expense.getAmount());","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"lckjosh"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"d-M-yyyy\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lckjosh"},"content":" String formattedDate \u003d formatter.format(expense.getDate());","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"16-10-2023\", formattedDate);","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Dinner\", expense.getDescription());","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"Alone\", expense.getAdditionalInfo());","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_missingArguments_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"allowance /amt 100.0 /desc Pocket Money\";","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! Invalid input format for adding an allowance.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_missingArguments_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"expense /amt 50.0 /desc Dinner\";","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! Invalid input format for adding an expense.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"lckjosh"},"content":" public void parseAllowance_invalidDateTime_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"allowance /amt 100.0 /date 15/10/2023 /desc Lunch\";","lastModifiedDate":"2023-10-23"},{"lineNumber":66,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! The format of the date is invalid.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"lckjosh"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"lckjosh"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"lckjosh"},"content":" public void parseExpense_invalidDateTime_exceptionThrown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"choonkit-nus"},"content":" String input \u003d \"expense /amt 50.0 /date 16.10.2023 /desc Dinner\";","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"lckjosh"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"lckjosh"},"content":" Parser.parseCommand(input, null);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"lckjosh"},"content":" });","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"lckjosh"},"content":" assertEquals(\"OOPS!!! The format of the date is invalid.\", exception.getMessage());","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"lckjosh"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_validInput_success() throws NuscentsException, IndexOutOfBoundsException {","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"1\";","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"vvhuiling"},"content":" Transaction transaction \u003d new Transaction(\"test description\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"vvhuiling"},"content":" assertEquals(1, Parser.parseTaskIndex(input));","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_outOfBoundsIndex_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"-6\";","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(IndexOutOfBoundsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! This is an invalid transaction index.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_invalidArgument_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"vvhuiling"},"content":" String input \u003d \"InvalidArgument\";","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! The input should consist only of digits.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"vvhuiling"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"vvhuiling"},"content":" public void parseTaskIndex_emptyArgument_exceptionThrown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"vvhuiling"},"content":" String input \u003d null;","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"vvhuiling"},"content":" Exception exception \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"vvhuiling"},"content":" Parser.parseTaskIndex(input);","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"vvhuiling"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"vvhuiling"},"content":" assertEquals(\"OOPS!!! The index of a delete/view command cannot be empty.\", exception.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"vvhuiling"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"vvhuiling"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"aaronxujiachen"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"aaronxujiachen"},"content":" public void parseCommand_helpCommandWithCorrectInput_returnsHelpCommand() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"aaronxujiachen"},"content":" Command result \u003d Parser.parseCommand(\"help\", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":118,"author":{"gitId":"aaronxujiachen"},"content":" assertTrue(result instanceof HelpCommand);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":121,"author":{"gitId":"aaronxujiachen"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":122,"author":{"gitId":"aaronxujiachen"},"content":" public void parseCommand_helpCommandWithIncorrectInput_throwsException() {","lastModifiedDate":"2023-10-18"},{"lineNumber":123,"author":{"gitId":"aaronxujiachen"},"content":" Exception exceptionWithSpace \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":124,"author":{"gitId":"aaronxujiachen"},"content":" Parser.parseCommand(\"help \", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":125,"author":{"gitId":"aaronxujiachen"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":126,"author":{"gitId":"aaronxujiachen"},"content":" assertEquals(\"OOPS!!! The correct format is \u0027help\u0027 alone.\", exceptionWithSpace.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":127,"author":{"gitId":"aaronxujiachen"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":128,"author":{"gitId":"aaronxujiachen"},"content":" Exception exceptionWithExtraChars \u003d assertThrows(NuscentsException.class, () -\u003e {","lastModifiedDate":"2023-10-18"},{"lineNumber":129,"author":{"gitId":"aaronxujiachen"},"content":" Parser.parseCommand(\"help extra\", null);","lastModifiedDate":"2023-10-18"},{"lineNumber":130,"author":{"gitId":"aaronxujiachen"},"content":" });","lastModifiedDate":"2023-10-18"},{"lineNumber":131,"author":{"gitId":"aaronxujiachen"},"content":" assertEquals(\"OOPS!!! The correct format is \u0027help\u0027 alone.\", exceptionWithExtraChars.getMessage());","lastModifiedDate":"2023-10-18"},{"lineNumber":132,"author":{"gitId":"aaronxujiachen"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":133,"author":{"gitId":"lckjosh"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"aaronxujiachen":22,"spaceman03":3,"lckjosh":65,"choonkit-nus":8,"vvhuiling":35}},{"path":"src/test/java/seedu/nuscents/storage/StorageTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spaceman03"},"content":"package seedu.nuscents.storage;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spaceman03"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"spaceman03"},"content":"import static seedu.nuscents.parser.Parser.parseDate;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"spaceman03"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"spaceman03"},"content":"import java.nio.charset.Charset;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Files;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"spaceman03"},"content":"import java.text.SimpleDateFormat;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"spaceman03"},"content":"import java.nio.file.Paths;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"spaceman03"},"content":"import java.util.Date;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"spaceman03"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"spaceman03"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"spaceman03"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.Expense;","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.TransactionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"spaceman03"},"content":"import seedu.nuscents.data.transaction.ExpenseCategory;","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"spaceman03"},"content":"public class StorageTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"spaceman03"},"content":" @TempDir","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"spaceman03"},"content":" public static Path testFolder;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"spaceman03"},"content":" private static final String TEST_DATA_FOLDER \u003d \"src/test/data/StorageFileTest\";","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"spaceman03"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"spaceman03"},"content":" public void save_validTransactionList() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"spaceman03"},"content":" TransactionList transactions \u003d getTestTransactionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"spaceman03"},"content":" Storage storage \u003d getTempStorage();","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"spaceman03"},"content":" storage.writeToFile(transactions);","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"spaceman03"},"content":" assertStorageFilesEqual(storage, getStorage(\"ValidData.txt\"));","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"spaceman03"},"content":" private void assertStorageFilesEqual(Storage sf1, Storage sf2) throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"spaceman03"},"content":" assertTextFilesEqual(Paths.get(sf1.getPath()), Paths.get(sf2.getPath()));","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"spaceman03"},"content":" public static void assertTextFilesEqual(Path path1, Path path2) throws IOException {","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"spaceman03"},"content":" List\u003cString\u003e list1 \u003d Files.readAllLines(path1, Charset.defaultCharset());","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"spaceman03"},"content":" List\u003cString\u003e list2 \u003d Files.readAllLines(path2, Charset.defaultCharset());","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"spaceman03"},"content":" assertEquals(String.join(\"\\n\", list1), String.join(\"\\n\", list2));","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"spaceman03"},"content":" private Storage getStorage(String fileName) throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"spaceman03"},"content":" return new Storage(TEST_DATA_FOLDER + \"/\" + fileName);","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"spaceman03"},"content":" private Storage getTempStorage() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"spaceman03"},"content":" return new Storage(testFolder.resolve(\"temp.txt\").toString());","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"spaceman03"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"spaceman03"},"content":" private TransactionList getTestTransactionList() throws Exception {","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"spaceman03"},"content":" TransactionList transactions \u003d new TransactionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"spaceman03"},"content":" SimpleDateFormat formatter \u003d new SimpleDateFormat(\"dd-MM-yyyy\");","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"spaceman03"},"content":" Date formattedDate \u003d parseDate(\"23-10-2023\", \"dd-MM-yyyy\", formatter);","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"spaceman03"},"content":" transactions.addTransaction(new Expense(50, formattedDate, \"Lunch\", \"Pasta\",","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"spaceman03"},"content":" ExpenseCategory.FOOD));","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"spaceman03"},"content":" return transactions;","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"spaceman03"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"spaceman03"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spaceman03":62}}] diff --git a/AY2324S1-CS2113-T18-4_tp_master/commits.json b/AY2324S1-CS2113-T18-4_tp_master/commits.json index 5e735b9..56f3290 100644 --- a/AY2324S1-CS2113-T18-4_tp_master/commits.json +++ b/AY2324S1-CS2113-T18-4_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"aaronxujiachen":[{"date":"2023-10-05","commitResults":[{"hash":"17c9a4e3a542ff3dc4a6c3ed6a9bd9da669b145b","isMergeCommit":false,"messageTitle":"Update AboutUs.md by JiaChen","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"ec6f013464e01ce604f2a63f6d61b455ab004167","isMergeCommit":true,"messageTitle":"Merge pull request #1 from aaronxujiachen/master","messageBody":"Update AboutUs.md by JiaChen","fileTypesAndContributionMap":{}}]},{"date":"2023-10-06","commitResults":[{"hash":"6e3f56311ee411e153f38eeb41bc75a57ae2855a","isMergeCommit":true,"messageTitle":"Merge pull request #3 from spaceman03/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"850d7a31292733b20329d8ba32a63238bc1356b1","isMergeCommit":false,"messageTitle":"Change ByeCommand to ExitCommand and add expected output.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"8bda423e797242a4bc1fd5c4e1d23d790bb198f9","isMergeCommit":true,"messageTitle":"Merge pull request #15 from aaronxujiachen/branch-exitCommand","messageBody":"Change ByeCommand to ExitCommand and add expected output.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"8b83607f9cc27428bce02ee676e86dc2834cbabc","isMergeCommit":true,"messageTitle":"Merge pull request #17 from lckjosh/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"e93ce50f7c287a73645c998de40126edcc354e80","isMergeCommit":false,"messageTitle":"Add Help Command and expected output.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":10}}},{"hash":"fb4b452acd3f041bcefc1e25866722cb0702536e","isMergeCommit":true,"messageTitle":"Merge pull request #21 from aaronxujiachen/branch-helpCommand","messageBody":"Add Help Command and expected output.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"bf640476b177a63a63cd624f370e24300559e85a","isMergeCommit":false,"messageTitle":"Add exception handling and JUnit test for helpCommand.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":8},"test-code":{"insertions":23,"deletions":1}}},{"hash":"6bfe6c3dceb5c9390033fadfce4e5e976a17e12c","isMergeCommit":false,"messageTitle":"Fix method naming to adhere to Checkstyle requirements","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}},{"hash":"237dc4671d1f652487f7425161de4570b0a9ec8d","isMergeCommit":true,"messageTitle":"Merge pull request #29 from aaronxujiachen/branch-helpCommand","messageBody":"Add exception handling and JUnit test for helpCommand.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"66ec99db977bb62c580e524ccba441d0a9b1a6bc","isMergeCommit":false,"messageTitle":"Update Help Menu and Expected Output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"10f1243a4105af2f119f174f5b1a1750fb46ca7c","isMergeCommit":true,"messageTitle":"Merge pull request #46 from aaronxujiachen/branch-helpCommand","messageBody":"Update Help Menu and Expected Output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"7de34ee77059ca924107844a387f1270ccbc04a6","isMergeCommit":false,"messageTitle":"Update Developer Guide with HelpCommand Description","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":0}}},{"hash":"fdf7fedff16f1975c81383094b4bfcdbe41de273","isMergeCommit":true,"messageTitle":"Merge pull request #53 from aaronxujiachen/branch-helpCommand","messageBody":"Update Developer Guide with HelpCommand Description","fileTypesAndContributionMap":{}}]}],"spaceman03":[{"date":"2023-10-05","commitResults":[{"hash":"b907cadd31762b2a2bdb3a283a54dfd7f92927fa","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"faa31cbe7f7687f6c651a58e1748dcaed936fe18","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"3d5bdfe9a1272e0a46e389a96d56fdbd0316af75","isMergeCommit":false,"messageTitle":"Rename Duke to Nuscents","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":0}}},{"hash":"68d76a9cc00e597e05c8b5a3dcb4176bffcdef4c","isMergeCommit":false,"messageTitle":"Rename Duke to Nuscents","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":21}}},{"hash":"36c498dbe3012c4116c424f3afb1caeb9e4586a6","isMergeCommit":false,"messageTitle":"Rename DukeTest to NuscentsTest","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"1688d6be91f47c63662a52ccae34845c41115104","isMergeCommit":false,"messageTitle":"Fix CI failing","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"950aec2ffa8deab6e559dc180e2466052356287c","isMergeCommit":false,"messageTitle":"Remove whitespace","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3f40057ae31451b3d67b61439e6f1a2c87db19d5","isMergeCommit":true,"messageTitle":"Merge pull request #11 from spaceman03/rename","messageBody":"Rename Duke to NUScents","fileTypesAndContributionMap":{}},{"hash":"544f9081305f1ce200b7638a2b082ed90ffabb30","isMergeCommit":false,"messageTitle":"Update expected output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"83c0db186c2bb106cf0b9cd8eff469b689803008","isMergeCommit":true,"messageTitle":"Merge pull request #12 from spaceman03/rename","messageBody":"Update expected output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"f942bf08edf2e985993fed72163040feb0617647","isMergeCommit":false,"messageTitle":"Import code from ip","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":782,"deletions":13}}},{"hash":"47f9a0d4f54d553087355ca077ec5abfb5afd5f0","isMergeCommit":false,"messageTitle":"Remove * import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":44}}},{"hash":"ed9ece69fe252a2f52e73e437cfa013c3a9b601d","isMergeCommit":false,"messageTitle":"Edit code to abide java coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":4}}},{"hash":"b66d0a2e14d7944408ddbd987f555d887a00fd61","isMergeCommit":true,"messageTitle":"Merge pull request #13 from spaceman03/import-code","messageBody":"Import code from iP","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"25727fa186d10fabf724a65948ef866e4fd83983","isMergeCommit":true,"messageTitle":"Merge pull request #23 from lckjosh/branch-add-expense","messageBody":"Add ability to add expense","fileTypesAndContributionMap":{}},{"hash":"5e928b0b39424af517737bc04400b9e7ecc62706","isMergeCommit":false,"messageTitle":"Rename tasks to transactionList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"7f14cc11220dd5bee3df1e11c8d55f081bb3dfc2","isMergeCommit":false,"messageTitle":"Change date format","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":77,"deletions":63}}},{"hash":"ff7f92ca420aa8f5e1ebace350edc9822ba9a7f6","isMergeCommit":false,"messageTitle":"Change date format","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"f69aba7c7b86e1c50b10b3a3d80052e5be966b66","isMergeCommit":false,"messageTitle":"Add read error message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"fd92138a4e306c89f8c3d1a0595397dcdfef9a18","isMergeCommit":false,"messageTitle":"Remove unused import statements","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":6}}},{"hash":"77555c990ebdbaf52416f4b2dba7c01cf9eaac2e","isMergeCommit":false,"messageTitle":"Add newline at the end of file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"61f4961057f9a811c85965f87eb2f0faaaebb6ef","isMergeCommit":true,"messageTitle":"Merge pull request #25 from lckjosh/branch-add-transaction-test","messageBody":"Add JUnit testing for adding a transaction","fileTypesAndContributionMap":{}},{"hash":"5ba6e96b4eb1ec14c444bab4ca7b7d54036bd5d8","isMergeCommit":false,"messageTitle":"Display transaction index for each transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"5b065e3c7145dcb5a4e6a77526c9c3584f63eae2","isMergeCommit":false,"messageTitle":"Display additional info for transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":5}}},{"hash":"1ca4c9c376b58e158605dfabff1fec1c211cda31","isMergeCommit":true,"messageTitle":"Merge pull request #26 from spaceman03/list-feature","messageBody":"Display serial number and additional info for list feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"3dec0fc88434a962ce2871a04f3cf7a572c6c52e","isMergeCommit":true,"messageTitle":"Merge pull request #28 from vvhuiling/view-feature","messageBody":"Add the ability to view","fileTypesAndContributionMap":{}},{"hash":"a0cb0bcdfb50ce6e31d6922dc76ba577f47753e1","isMergeCommit":false,"messageTitle":"Add Junit test for Storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1},"test-code":{"insertions":63,"deletions":0}}},{"hash":"ddcd241833935eb0162106cb7f95b3d57fbeb241","isMergeCommit":true,"messageTitle":"Merge pull request #31 from vvhuiling/JUnit","messageBody":"Add JUnit for Parse.parseTaskIndex","fileTypesAndContributionMap":{}},{"hash":"b51fb88b291d3375bbc8f996ec4f8610a8ef23cb","isMergeCommit":false,"messageTitle":"Add assertions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"715e2bdaf0266244aa149895acc42c8811b82642","isMergeCommit":true,"messageTitle":"Merge pull request #32 from spaceman03/assertions","messageBody":"Add assertions","fileTypesAndContributionMap":{}},{"hash":"153959f9f867bd1b6654136b72c41276be598722","isMergeCommit":false,"messageTitle":"Add logging for Storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":18}}},{"hash":"b7421b2ee2b393c1b2cd7465f6315f3edcfecdc8","isMergeCommit":false,"messageTitle":"Edit code to abide java coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"9ed3e0451d16a8459ec078eefb93fbc7b158b39a","isMergeCommit":true,"messageTitle":"Merge pull request #33 from spaceman03/logging","messageBody":"Add logging for Storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"e95c76a83817807a7f2bc34aa2b8d649a18ee448","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-Update-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"214ee847617bfb6a14d40e7b94b829f0e8576bb0","isMergeCommit":true,"messageTitle":"Merge pull request #34 from choonkit-nus/branch-Update-AboutUs","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"abf7e0d383220862a29252891109986c6a18047a","isMergeCommit":false,"messageTitle":"Add enum for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":0},"other":{"insertions":0,"deletions":0}}},{"hash":"c7eb1e6cf5cdee9df3e7b4f9b396d60076ea534f","isMergeCommit":false,"messageTitle":"Add enum for allowance categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":9}}},{"hash":"d83ef516eb453895f47baa6f018732334ae31b62","isMergeCommit":false,"messageTitle":"Add enum for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3}}},{"hash":"d01598b037bc2d6ea81342b3645fa2523b089d57","isMergeCommit":false,"messageTitle":"Parse in user input for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":103,"deletions":22},"test-code":{"insertions":7,"deletions":8}}},{"hash":"adbc9ab88e8f1be5b219c11d9bb491984b6fe6dd","isMergeCommit":false,"messageTitle":"Remove unused code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"ac156217a18d0041fb306ddc01b08236e90f908a","isMergeCommit":false,"messageTitle":"Add unknown category message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8}}},{"hash":"890ece2b155415093eb71d34ab36fa68c6b86d84","isMergeCommit":false,"messageTitle":"Display expense category","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":7}}},{"hash":"ba2d8955958a559d5b5e1aaba5e11b1a0f4ec156","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":4,"deletions":0}}}]},{"date":"2023-10-24","commitResults":[{"hash":"163be2d0da1297d32078d9853932f29056f5aa5d","isMergeCommit":false,"messageTitle":"Update developer guide with add transaction implementation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":95,"deletions":2}}},{"hash":"e167b41b1b2fa098bf06f6ea21d423d6e3a0c425","isMergeCommit":false,"messageTitle":"Remove typo in messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e0453762b1f1541622dbcece541805672bdb3e80","isMergeCommit":true,"messageTitle":"Merge pull request #45 from spaceman03/categorise-expense","messageBody":"Categorise expense","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"2ab9510bcca09bb340a58bdbf90f85f8a48acf0b","isMergeCommit":false,"messageTitle":"Update add transaction sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e09280fbe2cc6cecf3319e69c4b5a3702c22fec8","isMergeCommit":true,"messageTitle":"Merge pull request #48 from spaceman03/categorise-expense","messageBody":"Update add transaction sequence diagram","fileTypesAndContributionMap":{}},{"hash":"673637e784ad81ec65f79bb9f132ce956eb9331f","isMergeCommit":true,"messageTitle":"Merge pull request #49 from spaceman03/categorise-expense","messageBody":"Rename add transaction sequence diagram","fileTypesAndContributionMap":{}}]}],"lckjosh":[{"date":"2023-10-17","commitResults":[{"hash":"2b2b3b78f2af5be61d76c7c5d276da8dbeb4151d","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"ec62f5e245ac20384cd1cb946bf88a92390af944","isMergeCommit":false,"messageTitle":"Rename Task to Transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":140,"deletions":140},"other":{"insertions":6,"deletions":6}}},{"hash":"55b6c1373057a6797b2a58afe4e07a09d52251ff","isMergeCommit":false,"messageTitle":"Rename task to transaction in UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":21}}},{"hash":"c8b1586d25c4622e571843619d413730178a427b","isMergeCommit":false,"messageTitle":"Rename the TransactionList variable from tasks to transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"e1bce9867751d941051d57b7d42363cc1c95bf6b","isMergeCommit":false,"messageTitle":"Fix typo by renamingg trasactions to transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"edf9ee5125927e5a29cfde07e29b902bee9c5860","isMergeCommit":false,"messageTitle":"Add ability to add allowance","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":26}}},{"hash":"f4dd482c6faeb0f74e20cab5cb74ef7ebc4c7ee9","isMergeCommit":false,"messageTitle":"Fix storage class such that it can now write and read allowances to and from file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":8}}},{"hash":"3ad42995f2f2d460b6637abce4cc99bfadc17a4c","isMergeCommit":false,"messageTitle":"Fix code style violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3}}},{"hash":"66ad8279f6d5ff9638a9794f1cdfea3cbb6b149c","isMergeCommit":false,"messageTitle":"Rename taskDecoder to transactionDecoder","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"1467f34d13f9f5f3238b0795d4a0eed08dce8788","isMergeCommit":false,"messageTitle":"Remove classes and methods related to marking and unmarking tasks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":107}}},{"hash":"39891815321430b803cecd30226c80d3004dc531","isMergeCommit":false,"messageTitle":"Update parser to only accept hyphen for datetime input and not forward slash","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":9}}},{"hash":"2063ea7a4cda9321d32e085bff31d981c6497c43","isMergeCommit":true,"messageTitle":"Merge pull request #22 from lckjosh/branch-add-allowance","messageBody":"Merge branch-add-allowance","fileTypesAndContributionMap":{}},{"hash":"f7f76befb8837e86c38494e840d1d4ccb4c22326","isMergeCommit":false,"messageTitle":"Add ability to add expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":12}}},{"hash":"bcd028a3048bfaceb3f923c4ee85543426dc7d61","isMergeCommit":false,"messageTitle":"Rename allowance to expense in parseExpense() header comment","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"861d27e5be59a84cec92f174d5c2ed6689a486f5","isMergeCommit":false,"messageTitle":"Add JUnit testing for adding a transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":11},"test-code":{"insertions":75,"deletions":0}}},{"hash":"f71cf094a277c1c5c7f65d22f8376c18c58d8e0c","isMergeCommit":false,"messageTitle":"Fix coding standard violations in ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":7,"deletions":6}}},{"hash":"5b42ba630ccf6e3eda827897344646ff18d92efd","isMergeCommit":true,"messageTitle":"Merge pull request #24 from spaceman03/list-feature","messageBody":"Add list feature\r\nFixes #9 ","fileTypesAndContributionMap":{}},{"hash":"d349b116005dcef8dcde7948b01f9b053dea8c60","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-4/tp into branch-add-transaction-test","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/nuscents/parser/Parser.java\n#\tsrc/main/java/seedu/nuscents/ui/Messages.java\n","fileTypesAndContributionMap":{}},{"hash":"564051ab0d85d2a6d4898af9d949fb94a451a1b0","isMergeCommit":false,"messageTitle":"Update ParserTest.java to use the simple date format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":10,"deletions":8}}},{"hash":"9df79b39c059353a93f08eafc8e4b7d18ad2f05d","isMergeCommit":false,"messageTitle":"Remove unused imports in ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"cf2a8632d771bd33ff541e631215fa836bea4197","isMergeCommit":false,"messageTitle":"Update test cases to use new date format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"25ef375710b28911a84a3ce82d04acdc42e3dd84","isMergeCommit":true,"messageTitle":"Merge pull request #30 from spaceman03/storage-test","messageBody":"Add JUnit test for Storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"e314cf72af2a1b98ea6f2a152066cf580c2869b7","isMergeCommit":false,"messageTitle":"Log to file instead of console","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"0e965221f371cc06be78781b85da225771a035df","isMergeCommit":true,"messageTitle":"Merge pull request #47 from lckjosh/log-to-file","messageBody":"Log to file instead of console","fileTypesAndContributionMap":{}},{"hash":"d1a3c2c1d4f2c22fced940d763cdf9451bf92ca4","isMergeCommit":false,"messageTitle":"Add sequence diagram and DG section for list transactions feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":60,"deletions":0}}},{"hash":"8b9c4e3ac6dd80e2d89c2deeb6a60eb69f2499c8","isMergeCommit":true,"messageTitle":"Merge pull request #50 from lckjosh/documentation-list-transactions","messageBody":"Add sequence diagram and DG section for list transactions feature","fileTypesAndContributionMap":{}}]}],"choonkit-nus":[{"date":"2023-10-05","commitResults":[{"hash":"1dbcb2d61ad0f260016699378b381211523c50bc","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-18","commitResults":[{"hash":"511c46e086a462bdae64f923b42917f0e7facd26","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-22","commitResults":[{"hash":"11399d0dca8f2bbc35a2f2e7b300d94c5999496e","isMergeCommit":false,"messageTitle":"Update transaction amount to float","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":9},"test-code":{"insertions":2,"deletions":2}}},{"hash":"ff5a0cc610e480f16d4746524642f73038322672","isMergeCommit":false,"messageTitle":"Add exception to ensure transaction amount is float","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"662449e464679a98e132cbdb36e643074248bcf9","isMergeCommit":false,"messageTitle":"Update list feature to calculate and show net balance","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"9362e236dd13c885dd8c0922948d152989060b4e","isMergeCommit":false,"messageTitle":"Fix coding standard violation in Parser.java and Ui.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":6}}},{"hash":"70d3e877d5aa55c2ea057bf809a93bd9e7693f92","isMergeCommit":false,"messageTitle":"Edit ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-23","commitResults":[{"hash":"76687e3496bb89d0a435713c1622e5d926fbdcb8","isMergeCommit":false,"messageTitle":"Edit ParserTest.java to use float for transaction amount","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"901313117dcfcea39e8fd49ae3f8d6abcb1bb5fb","isMergeCommit":false,"messageTitle":"Bug fixes on Parser.java for transaction exception message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e08ad91d443f58618cbb4e22838ba30c38c8348f","isMergeCommit":true,"messageTitle":"Merge pull request #36 from choonkit-nus/branch-netbalance","messageBody":"Branch netbalance","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"df70ddafe61839e54f7106526dc5ff723965d14d","isMergeCommit":false,"messageTitle":"Update DeveloperGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":14}}},{"hash":"97833f368c21040a46673b81e60ec7cee02488a3","isMergeCommit":true,"messageTitle":"Merge pull request #52 from choonkit-nus/developer-guide-netbalance","messageBody":"Update DeveloperGuide","fileTypesAndContributionMap":{}}]}],"vvhuiling":[{"date":"2023-10-17","commitResults":[{"hash":"52e38b24e3ec89852845e3f05891edb24089a5aa","isMergeCommit":false,"messageTitle":"Add the ability to view","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":0}}}]},{"date":"2023-10-18","commitResults":[{"hash":"55109d6d740a41d86769c6515a2fb9bea4dc0f14","isMergeCommit":false,"messageTitle":"Bug fix: remove unused import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"b733fd9a00b0a5e3d642b6514bc249340ae97136","isMergeCommit":false,"messageTitle":"Add JUnit for Parse.parseTaskIndex","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":5},"test-code":{"insertions":35,"deletions":0}}},{"hash":"85118bd8a57099c060b7ff36329d51c6377e4503","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into JUnit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f9917100e23506d9370660194c12ca887ab35b36","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7f5ee5148f17418aebe6f7c234a90fb2f2b86a8a","isMergeCommit":true,"messageTitle":"Merge pull request #35 from vvhuiling/doc-update","messageBody":"Update AboutUs.md","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"6451018435889679e89ef5a5c351fbf3bcf22062","isMergeCommit":false,"messageTitle":"Add sequence diagram and DG section for view transactions feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":93,"deletions":0}}},{"hash":"20f6f5e5ba1964ca30025c219981f384ed9c9e3b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Developer-Guide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d24db106d6ea0786077a110f6a3735003da68da9","isMergeCommit":true,"messageTitle":"Merge pull request #51 from vvhuiling/Developer-Guide","messageBody":"Add sequence diagram and DG section for view transactions feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d5310bf5f2db280b6a3269c34bd342ce76142b53","isMergeCommit":false,"messageTitle":"Add the ability to filter transactions by a specific category","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":114,"deletions":0}}},{"hash":"aeb5d79ba81547848b0c49d92e8f4c50b1132d74","isMergeCommit":false,"messageTitle":"Update help feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0}}},{"hash":"5646c066e32c37e3dacb4883ed04284f7a323001","isMergeCommit":false,"messageTitle":"Bug fix: remove updated line in help messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"3a74111ad5780aff61593815bf573dbd88869102","isMergeCommit":true,"messageTitle":"Merge pull request #55 from vvhuiling/filter-feature","messageBody":"Filter feature","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"aaronxujiachen":{"docs":34,"functional-code":28,"test-code":22},"spaceman03":{"docs":94,"functional-code":676,"test-code":67,"other":6},"lckjosh":{"docs":61,"functional-code":245,"test-code":65},"choonkit-nus":{"docs":13,"functional-code":27,"test-code":8},"vvhuiling":{"docs":93,"functional-code":161,"test-code":35}},"authorContributionVariance":{"aaronxujiachen":121.01825,"spaceman03":21980.586,"lckjosh":20076.246,"choonkit-nus":128.0745,"vvhuiling":667.7225},"authorDisplayNameMap":{"aaronxujiachen":"CS2113-T18-4 XU J..CHEN","spaceman03":"CS2113-T18-4 CHUN..XUAN","lckjosh":"CS2113-T18-4 LIM ..SHUA","choonkit-nus":"CS2113-T18-4 ONG .. KIT","vvhuiling":"CS2113-T18-4 HUAN..LING"}} +{"authorDailyContributionsMap":{"aaronxujiachen":[{"date":"2023-10-05","commitResults":[{"hash":"17c9a4e3a542ff3dc4a6c3ed6a9bd9da669b145b","isMergeCommit":false,"messageTitle":"Update AboutUs.md by JiaChen","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"ec6f013464e01ce604f2a63f6d61b455ab004167","isMergeCommit":true,"messageTitle":"Merge pull request #1 from aaronxujiachen/master","messageBody":"Update AboutUs.md by JiaChen","fileTypesAndContributionMap":{}}]},{"date":"2023-10-06","commitResults":[{"hash":"6e3f56311ee411e153f38eeb41bc75a57ae2855a","isMergeCommit":true,"messageTitle":"Merge pull request #3 from spaceman03/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"850d7a31292733b20329d8ba32a63238bc1356b1","isMergeCommit":false,"messageTitle":"Change ByeCommand to ExitCommand and add expected output.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"8bda423e797242a4bc1fd5c4e1d23d790bb198f9","isMergeCommit":true,"messageTitle":"Merge pull request #15 from aaronxujiachen/branch-exitCommand","messageBody":"Change ByeCommand to ExitCommand and add expected output.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"8b83607f9cc27428bce02ee676e86dc2834cbabc","isMergeCommit":true,"messageTitle":"Merge pull request #17 from lckjosh/master","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"e93ce50f7c287a73645c998de40126edcc354e80","isMergeCommit":false,"messageTitle":"Add Help Command and expected output.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":10}}},{"hash":"fb4b452acd3f041bcefc1e25866722cb0702536e","isMergeCommit":true,"messageTitle":"Merge pull request #21 from aaronxujiachen/branch-helpCommand","messageBody":"Add Help Command and expected output.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"bf640476b177a63a63cd624f370e24300559e85a","isMergeCommit":false,"messageTitle":"Add exception handling and JUnit test for helpCommand.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":8},"test-code":{"insertions":23,"deletions":1}}},{"hash":"6bfe6c3dceb5c9390033fadfce4e5e976a17e12c","isMergeCommit":false,"messageTitle":"Fix method naming to adhere to Checkstyle requirements","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}},{"hash":"237dc4671d1f652487f7425161de4570b0a9ec8d","isMergeCommit":true,"messageTitle":"Merge pull request #29 from aaronxujiachen/branch-helpCommand","messageBody":"Add exception handling and JUnit test for helpCommand.","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"66ec99db977bb62c580e524ccba441d0a9b1a6bc","isMergeCommit":false,"messageTitle":"Update Help Menu and Expected Output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"10f1243a4105af2f119f174f5b1a1750fb46ca7c","isMergeCommit":true,"messageTitle":"Merge pull request #46 from aaronxujiachen/branch-helpCommand","messageBody":"Update Help Menu and Expected Output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"7de34ee77059ca924107844a387f1270ccbc04a6","isMergeCommit":false,"messageTitle":"Update Developer Guide with HelpCommand Description","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":35,"deletions":0}}},{"hash":"fdf7fedff16f1975c81383094b4bfcdbe41de273","isMergeCommit":true,"messageTitle":"Merge pull request #53 from aaronxujiachen/branch-helpCommand","messageBody":"Update Developer Guide with HelpCommand Description","fileTypesAndContributionMap":{}}]}],"spaceman03":[{"date":"2023-10-05","commitResults":[{"hash":"b907cadd31762b2a2bdb3a283a54dfd7f92927fa","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"faa31cbe7f7687f6c651a58e1748dcaed936fe18","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-13","commitResults":[{"hash":"3d5bdfe9a1272e0a46e389a96d56fdbd0316af75","isMergeCommit":false,"messageTitle":"Rename Duke to Nuscents","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":0}}},{"hash":"68d76a9cc00e597e05c8b5a3dcb4176bffcdef4c","isMergeCommit":false,"messageTitle":"Rename Duke to Nuscents","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":21}}},{"hash":"36c498dbe3012c4116c424f3afb1caeb9e4586a6","isMergeCommit":false,"messageTitle":"Rename DukeTest to NuscentsTest","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"1688d6be91f47c63662a52ccae34845c41115104","isMergeCommit":false,"messageTitle":"Fix CI failing","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":2}}},{"hash":"950aec2ffa8deab6e559dc180e2466052356287c","isMergeCommit":false,"messageTitle":"Remove whitespace","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3f40057ae31451b3d67b61439e6f1a2c87db19d5","isMergeCommit":true,"messageTitle":"Merge pull request #11 from spaceman03/rename","messageBody":"Rename Duke to NUScents","fileTypesAndContributionMap":{}},{"hash":"544f9081305f1ce200b7638a2b082ed90ffabb30","isMergeCommit":false,"messageTitle":"Update expected output","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"83c0db186c2bb106cf0b9cd8eff469b689803008","isMergeCommit":true,"messageTitle":"Merge pull request #12 from spaceman03/rename","messageBody":"Update expected output","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"f942bf08edf2e985993fed72163040feb0617647","isMergeCommit":false,"messageTitle":"Import code from ip","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":782,"deletions":13}}},{"hash":"47f9a0d4f54d553087355ca077ec5abfb5afd5f0","isMergeCommit":false,"messageTitle":"Remove * import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":44}}},{"hash":"ed9ece69fe252a2f52e73e437cfa013c3a9b601d","isMergeCommit":false,"messageTitle":"Edit code to abide java coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":4}}},{"hash":"b66d0a2e14d7944408ddbd987f555d887a00fd61","isMergeCommit":true,"messageTitle":"Merge pull request #13 from spaceman03/import-code","messageBody":"Import code from iP","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"25727fa186d10fabf724a65948ef866e4fd83983","isMergeCommit":true,"messageTitle":"Merge pull request #23 from lckjosh/branch-add-expense","messageBody":"Add ability to add expense","fileTypesAndContributionMap":{}},{"hash":"5e928b0b39424af517737bc04400b9e7ecc62706","isMergeCommit":false,"messageTitle":"Rename tasks to transactionList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"7f14cc11220dd5bee3df1e11c8d55f081bb3dfc2","isMergeCommit":false,"messageTitle":"Change date format","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":77,"deletions":63}}},{"hash":"ff7f92ca420aa8f5e1ebace350edc9822ba9a7f6","isMergeCommit":false,"messageTitle":"Change date format","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":4}}},{"hash":"f69aba7c7b86e1c50b10b3a3d80052e5be966b66","isMergeCommit":false,"messageTitle":"Add read error message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"fd92138a4e306c89f8c3d1a0595397dcdfef9a18","isMergeCommit":false,"messageTitle":"Remove unused import statements","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":6}}},{"hash":"77555c990ebdbaf52416f4b2dba7c01cf9eaac2e","isMergeCommit":false,"messageTitle":"Add newline at the end of file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"61f4961057f9a811c85965f87eb2f0faaaebb6ef","isMergeCommit":true,"messageTitle":"Merge pull request #25 from lckjosh/branch-add-transaction-test","messageBody":"Add JUnit testing for adding a transaction","fileTypesAndContributionMap":{}},{"hash":"5ba6e96b4eb1ec14c444bab4ca7b7d54036bd5d8","isMergeCommit":false,"messageTitle":"Display transaction index for each transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3}}},{"hash":"5b065e3c7145dcb5a4e6a77526c9c3584f63eae2","isMergeCommit":false,"messageTitle":"Display additional info for transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":5}}},{"hash":"1ca4c9c376b58e158605dfabff1fec1c211cda31","isMergeCommit":true,"messageTitle":"Merge pull request #26 from spaceman03/list-feature","messageBody":"Display serial number and additional info for list feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"3dec0fc88434a962ce2871a04f3cf7a572c6c52e","isMergeCommit":true,"messageTitle":"Merge pull request #28 from vvhuiling/view-feature","messageBody":"Add the ability to view","fileTypesAndContributionMap":{}},{"hash":"a0cb0bcdfb50ce6e31d6922dc76ba577f47753e1","isMergeCommit":false,"messageTitle":"Add Junit test for Storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1},"test-code":{"insertions":63,"deletions":0}}},{"hash":"ddcd241833935eb0162106cb7f95b3d57fbeb241","isMergeCommit":true,"messageTitle":"Merge pull request #31 from vvhuiling/JUnit","messageBody":"Add JUnit for Parse.parseTaskIndex","fileTypesAndContributionMap":{}},{"hash":"b51fb88b291d3375bbc8f996ec4f8610a8ef23cb","isMergeCommit":false,"messageTitle":"Add assertions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"715e2bdaf0266244aa149895acc42c8811b82642","isMergeCommit":true,"messageTitle":"Merge pull request #32 from spaceman03/assertions","messageBody":"Add assertions","fileTypesAndContributionMap":{}},{"hash":"153959f9f867bd1b6654136b72c41276be598722","isMergeCommit":false,"messageTitle":"Add logging for Storage class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":18}}},{"hash":"b7421b2ee2b393c1b2cd7465f6315f3edcfecdc8","isMergeCommit":false,"messageTitle":"Edit code to abide java coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"9ed3e0451d16a8459ec078eefb93fbc7b158b39a","isMergeCommit":true,"messageTitle":"Merge pull request #33 from spaceman03/logging","messageBody":"Add logging for Storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"e95c76a83817807a7f2bc34aa2b8d649a18ee448","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-Update-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"214ee847617bfb6a14d40e7b94b829f0e8576bb0","isMergeCommit":true,"messageTitle":"Merge pull request #34 from choonkit-nus/branch-Update-AboutUs","messageBody":"Update AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"abf7e0d383220862a29252891109986c6a18047a","isMergeCommit":false,"messageTitle":"Add enum for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":0},"other":{"insertions":0,"deletions":0}}},{"hash":"c7eb1e6cf5cdee9df3e7b4f9b396d60076ea534f","isMergeCommit":false,"messageTitle":"Add enum for allowance categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":9}}},{"hash":"d83ef516eb453895f47baa6f018732334ae31b62","isMergeCommit":false,"messageTitle":"Add enum for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3}}},{"hash":"d01598b037bc2d6ea81342b3645fa2523b089d57","isMergeCommit":false,"messageTitle":"Parse in user input for expense categories","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":103,"deletions":22},"test-code":{"insertions":7,"deletions":8}}},{"hash":"adbc9ab88e8f1be5b219c11d9bb491984b6fe6dd","isMergeCommit":false,"messageTitle":"Remove unused code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"ac156217a18d0041fb306ddc01b08236e90f908a","isMergeCommit":false,"messageTitle":"Add unknown category message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8}}},{"hash":"890ece2b155415093eb71d34ab36fa68c6b86d84","isMergeCommit":false,"messageTitle":"Display expense category","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":7}}},{"hash":"ba2d8955958a559d5b5e1aaba5e11b1a0f4ec156","isMergeCommit":false,"messageTitle":"Enable assertions","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":4,"deletions":0}}}]},{"date":"2023-10-24","commitResults":[{"hash":"163be2d0da1297d32078d9853932f29056f5aa5d","isMergeCommit":false,"messageTitle":"Update developer guide with add transaction implementation","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":95,"deletions":2}}},{"hash":"e167b41b1b2fa098bf06f6ea21d423d6e3a0c425","isMergeCommit":false,"messageTitle":"Remove typo in messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e0453762b1f1541622dbcece541805672bdb3e80","isMergeCommit":true,"messageTitle":"Merge pull request #45 from spaceman03/categorise-expense","messageBody":"Categorise expense","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"2ab9510bcca09bb340a58bdbf90f85f8a48acf0b","isMergeCommit":false,"messageTitle":"Update add transaction sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e09280fbe2cc6cecf3319e69c4b5a3702c22fec8","isMergeCommit":true,"messageTitle":"Merge pull request #48 from spaceman03/categorise-expense","messageBody":"Update add transaction sequence diagram","fileTypesAndContributionMap":{}},{"hash":"673637e784ad81ec65f79bb9f132ce956eb9331f","isMergeCommit":true,"messageTitle":"Merge pull request #49 from spaceman03/categorise-expense","messageBody":"Rename add transaction sequence diagram","fileTypesAndContributionMap":{}}]}],"lckjosh":[{"date":"2023-10-17","commitResults":[{"hash":"2b2b3b78f2af5be61d76c7c5d276da8dbeb4151d","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"ec62f5e245ac20384cd1cb946bf88a92390af944","isMergeCommit":false,"messageTitle":"Rename Task to Transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":140,"deletions":140},"other":{"insertions":6,"deletions":6}}},{"hash":"55b6c1373057a6797b2a58afe4e07a09d52251ff","isMergeCommit":false,"messageTitle":"Rename task to transaction in UI","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":21}}},{"hash":"c8b1586d25c4622e571843619d413730178a427b","isMergeCommit":false,"messageTitle":"Rename the TransactionList variable from tasks to transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"e1bce9867751d941051d57b7d42363cc1c95bf6b","isMergeCommit":false,"messageTitle":"Fix typo by renamingg trasactions to transactions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":6}}},{"hash":"edf9ee5125927e5a29cfde07e29b902bee9c5860","isMergeCommit":false,"messageTitle":"Add ability to add allowance","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":26}}},{"hash":"f4dd482c6faeb0f74e20cab5cb74ef7ebc4c7ee9","isMergeCommit":false,"messageTitle":"Fix storage class such that it can now write and read allowances to and from file","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":8}}},{"hash":"3ad42995f2f2d460b6637abce4cc99bfadc17a4c","isMergeCommit":false,"messageTitle":"Fix code style violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":3}}},{"hash":"66ad8279f6d5ff9638a9794f1cdfea3cbb6b149c","isMergeCommit":false,"messageTitle":"Rename taskDecoder to transactionDecoder","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2}}},{"hash":"1467f34d13f9f5f3238b0795d4a0eed08dce8788","isMergeCommit":false,"messageTitle":"Remove classes and methods related to marking and unmarking tasks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":107}}},{"hash":"39891815321430b803cecd30226c80d3004dc531","isMergeCommit":false,"messageTitle":"Update parser to only accept hyphen for datetime input and not forward slash","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":9}}},{"hash":"2063ea7a4cda9321d32e085bff31d981c6497c43","isMergeCommit":true,"messageTitle":"Merge pull request #22 from lckjosh/branch-add-allowance","messageBody":"Merge branch-add-allowance","fileTypesAndContributionMap":{}},{"hash":"f7f76befb8837e86c38494e840d1d4ccb4c22326","isMergeCommit":false,"messageTitle":"Add ability to add expense","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":73,"deletions":12}}},{"hash":"bcd028a3048bfaceb3f923c4ee85543426dc7d61","isMergeCommit":false,"messageTitle":"Rename allowance to expense in parseExpense() header comment","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"861d27e5be59a84cec92f174d5c2ed6689a486f5","isMergeCommit":false,"messageTitle":"Add JUnit testing for adding a transaction","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":11},"test-code":{"insertions":75,"deletions":0}}},{"hash":"f71cf094a277c1c5c7f65d22f8376c18c58d8e0c","isMergeCommit":false,"messageTitle":"Fix coding standard violations in ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":7,"deletions":6}}},{"hash":"5b42ba630ccf6e3eda827897344646ff18d92efd","isMergeCommit":true,"messageTitle":"Merge pull request #24 from spaceman03/list-feature","messageBody":"Add list feature\r\nFixes #9 ","fileTypesAndContributionMap":{}},{"hash":"d349b116005dcef8dcde7948b01f9b053dea8c60","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-T18-4/tp into branch-add-transaction-test","messageBody":"# Conflicts:\n#\tsrc/main/java/seedu/nuscents/parser/Parser.java\n#\tsrc/main/java/seedu/nuscents/ui/Messages.java\n","fileTypesAndContributionMap":{}},{"hash":"564051ab0d85d2a6d4898af9d949fb94a451a1b0","isMergeCommit":false,"messageTitle":"Update ParserTest.java to use the simple date format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":10,"deletions":8}}},{"hash":"9df79b39c059353a93f08eafc8e4b7d18ad2f05d","isMergeCommit":false,"messageTitle":"Remove unused imports in ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":3}}},{"hash":"cf2a8632d771bd33ff541e631215fa836bea4197","isMergeCommit":false,"messageTitle":"Update test cases to use new date format","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-18","commitResults":[{"hash":"25ef375710b28911a84a3ce82d04acdc42e3dd84","isMergeCommit":true,"messageTitle":"Merge pull request #30 from spaceman03/storage-test","messageBody":"Add JUnit test for Storage class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"e314cf72af2a1b98ea6f2a152066cf580c2869b7","isMergeCommit":false,"messageTitle":"Log to file instead of console","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"0e965221f371cc06be78781b85da225771a035df","isMergeCommit":true,"messageTitle":"Merge pull request #47 from lckjosh/log-to-file","messageBody":"Log to file instead of console","fileTypesAndContributionMap":{}},{"hash":"d1a3c2c1d4f2c22fced940d763cdf9451bf92ca4","isMergeCommit":false,"messageTitle":"Add sequence diagram and DG section for list transactions feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":60,"deletions":0}}},{"hash":"8b9c4e3ac6dd80e2d89c2deeb6a60eb69f2499c8","isMergeCommit":true,"messageTitle":"Merge pull request #50 from lckjosh/documentation-list-transactions","messageBody":"Add sequence diagram and DG section for list transactions feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"2f6a79041cdcc74741429ba317d9994ea8636461","isMergeCommit":false,"messageTitle":"Add ability to categorise allowances","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":15}}},{"hash":"8a8b556a5c8ec44fc04f568aa8634986e62dd16a","isMergeCommit":false,"messageTitle":"Add assertions for parseAllowance","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"ab35c0ce1534804d6be0c5460311908caf20f17f","isMergeCommit":false,"messageTitle":"Fix coding style violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":5}}},{"hash":"e7f34924d4ec8f2650bafc826c70969db1dd8c4f","isMergeCommit":true,"messageTitle":"Merge pull request #56 from lckjosh/categorise-allowance","messageBody":"Categorise allowance","fileTypesAndContributionMap":{}}]}],"choonkit-nus":[{"date":"2023-10-05","commitResults":[{"hash":"1dbcb2d61ad0f260016699378b381211523c50bc","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-18","commitResults":[{"hash":"511c46e086a462bdae64f923b42917f0e7facd26","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-22","commitResults":[{"hash":"11399d0dca8f2bbc35a2f2e7b300d94c5999496e","isMergeCommit":false,"messageTitle":"Update transaction amount to float","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":9},"test-code":{"insertions":2,"deletions":2}}},{"hash":"ff5a0cc610e480f16d4746524642f73038322672","isMergeCommit":false,"messageTitle":"Add exception to ensure transaction amount is float","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"662449e464679a98e132cbdb36e643074248bcf9","isMergeCommit":false,"messageTitle":"Update list feature to calculate and show net balance","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4}}},{"hash":"9362e236dd13c885dd8c0922948d152989060b4e","isMergeCommit":false,"messageTitle":"Fix coding standard violation in Parser.java and Ui.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":6}}},{"hash":"70d3e877d5aa55c2ea057bf809a93bd9e7693f92","isMergeCommit":false,"messageTitle":"Edit ParserTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-23","commitResults":[{"hash":"76687e3496bb89d0a435713c1622e5d926fbdcb8","isMergeCommit":false,"messageTitle":"Edit ParserTest.java to use float for transaction amount","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":6}}},{"hash":"901313117dcfcea39e8fd49ae3f8d6abcb1bb5fb","isMergeCommit":false,"messageTitle":"Bug fixes on Parser.java for transaction exception message","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"e08ad91d443f58618cbb4e22838ba30c38c8348f","isMergeCommit":true,"messageTitle":"Merge pull request #36 from choonkit-nus/branch-netbalance","messageBody":"Branch netbalance","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"df70ddafe61839e54f7106526dc5ff723965d14d","isMergeCommit":false,"messageTitle":"Update DeveloperGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":14}}},{"hash":"97833f368c21040a46673b81e60ec7cee02488a3","isMergeCommit":true,"messageTitle":"Merge pull request #52 from choonkit-nus/developer-guide-netbalance","messageBody":"Update DeveloperGuide","fileTypesAndContributionMap":{}}]}],"vvhuiling":[{"date":"2023-10-17","commitResults":[{"hash":"52e38b24e3ec89852845e3f05891edb24089a5aa","isMergeCommit":false,"messageTitle":"Add the ability to view","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":0}}}]},{"date":"2023-10-18","commitResults":[{"hash":"55109d6d740a41d86769c6515a2fb9bea4dc0f14","isMergeCommit":false,"messageTitle":"Bug fix: remove unused import","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"b733fd9a00b0a5e3d642b6514bc249340ae97136","isMergeCommit":false,"messageTitle":"Add JUnit for Parse.parseTaskIndex","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":5},"test-code":{"insertions":35,"deletions":0}}},{"hash":"85118bd8a57099c060b7ff36329d51c6377e4503","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into JUnit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"f9917100e23506d9370660194c12ca887ab35b36","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7f5ee5148f17418aebe6f7c234a90fb2f2b86a8a","isMergeCommit":true,"messageTitle":"Merge pull request #35 from vvhuiling/doc-update","messageBody":"Update AboutUs.md","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"6451018435889679e89ef5a5c351fbf3bcf22062","isMergeCommit":false,"messageTitle":"Add sequence diagram and DG section for view transactions feature","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":93,"deletions":0}}},{"hash":"20f6f5e5ba1964ca30025c219981f384ed9c9e3b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into Developer-Guide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d24db106d6ea0786077a110f6a3735003da68da9","isMergeCommit":true,"messageTitle":"Merge pull request #51 from vvhuiling/Developer-Guide","messageBody":"Add sequence diagram and DG section for view transactions feature","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d5310bf5f2db280b6a3269c34bd342ce76142b53","isMergeCommit":false,"messageTitle":"Add the ability to filter transactions by a specific category","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":114,"deletions":0}}},{"hash":"aeb5d79ba81547848b0c49d92e8f4c50b1132d74","isMergeCommit":false,"messageTitle":"Update help feature","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":0}}},{"hash":"5646c066e32c37e3dacb4883ed04284f7a323001","isMergeCommit":false,"messageTitle":"Bug fix: remove updated line in help messages","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"3a74111ad5780aff61593815bf573dbd88869102","isMergeCommit":true,"messageTitle":"Merge pull request #55 from vvhuiling/filter-feature","messageBody":"Filter feature","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"aaronxujiachen":{"docs":34,"functional-code":28,"test-code":22},"spaceman03":{"docs":94,"functional-code":662,"test-code":67,"other":6},"lckjosh":{"docs":61,"functional-code":293,"test-code":65},"choonkit-nus":{"docs":13,"functional-code":26,"test-code":8},"vvhuiling":{"docs":93,"functional-code":160,"test-code":35}},"authorContributionVariance":{"aaronxujiachen":118.205696,"spaceman03":21447.762,"lckjosh":19603.484,"choonkit-nus":124.92244,"vvhuiling":651.91486},"authorDisplayNameMap":{"aaronxujiachen":"CS2113-T18-4 XU J..CHEN","spaceman03":"CS2113-T18-4 CHUN..XUAN","lckjosh":"CS2113-T18-4 LIM ..SHUA","choonkit-nus":"CS2113-T18-4 ONG .. KIT","vvhuiling":"CS2113-T18-4 HUAN..LING"}} diff --git a/AY2324S1-CS2113-W12-1_tp_master/authorship.json b/AY2324S1-CS2113-W12-1_tp_master/authorship.json index 93735bb..da1efe0 100644 --- a/AY2324S1-CS2113-W12-1_tp_master/authorship.json +++ b/AY2324S1-CS2113-W12-1_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"# QuizHub project template","lastModifiedDate":"2023-10-04"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"yeo-menghan":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" testImplementation \u0027junit:junit:4.13.1\u0027","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" mainClass.set(\"Quizhub\")","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" archiveBaseName.set(\"quizhub\")","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"spinoandraptos":3,"lisizhuang-0121":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"--------|:--------------:|:--------------------------------------------:|:---------:","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"![](https://www.comp.nus.edu.sg/~stevenha/images/sh7.jpg) | James Hong Jey | [Github](https://github.com/James-Hong-Jey) | [Portfolio](docs/team/jameshong.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"StevenGX12"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Guan Xiao | [Github](https://github.com/StevenGX12) | [Portfolio](docs/team/guanxiao.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"![](https://avatars.githubusercontent.com/u/111041948?s\u003d400\u0026u\u003d6619a8328eba45edbc88fe01cf54efeb1f986d11\u0026v\u003d4) | Man Juncheng | [Github](https://github.com/spinoandraptos) | [Portfolio](docs/team/juncheng.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":"![](https://i.redd.it/6do158vk2ue61.png) | Li Sizhuang | [Github](https://github.com/lisizhuang-0121) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Yeo Meng Han | [Github](https://github.com/yeo-menghan) | [Portfolio](https://linkedin.com/in/yeo-meng-han/)","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":1,"James-Hong-Jey":1,"yeo-menghan":1,"lisizhuang-0121":2,"-":3}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"## Table of Contents","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"* [Acknowledgements](#acknowledgements)","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"* [Design and Implementation](#design--implementation)","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":" * [Application Lifecycle](#application-lifecycle)","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":" * [Parser Component](#parser-component)","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":" * [Command Component](#command-components)","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":" * [Storage Component](#storage-component)","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"StevenGX12"},"content":" * [UI Component](#ui-component)","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":"* [Product Scope](#product-scope)","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"* [Non Functional Requirements](#non-functional-requirements)","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"* [Glossary](#glossary)","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"* [Instructions for Manual Testing](#instructions-for-manual-testing)","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":"1. For the main structure of the program, we have adapted the project structure","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"from the Individual Project of Man Juncheng at [Link](https://github.com/spinoandraptos/ip/tree/master) \u003c/li\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":"2. For JUnit testing, we have adapted the testing codes from the AddressBook level-2","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":"codes at [Link](https://github.com/se-edu/addressbook-level2)\u003c/li\u003e","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":"3. For the developer\u0027s guide, we have referenced the developer\u0027s guide from AddressBook","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":"level-3 [Link](https://se-education.org/addressbook-level3/DeveloperGuide.html)","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"# Design \u0026 implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"## Overall Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":"The main execution of the QuizHub application will concern 4 components which","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":"are the QuizHub, Ui, Parser and Command packages.","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":"![](./UML/architecture.jpg)","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":"`Quizhub` is the \"main\" class, which is responsible for starting the program,","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"James-Hong-Jey"},"content":"initialising all other objects, executing commands, and shutting down.","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":"`UI` is the component that interacts with the user, taking inputs and displaying","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":"the results of the executed commands.","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":"`Parser` acts as a multiplexer to determine which command to run, and what parameters","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":"it has, based on the user input.","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":"`Commands` refer to a package of individual commands with complex and specific","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":"logic, which is later executed in Quizhub and displayed by `UI`.","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"James-Hong-Jey"},"content":"`Storage` is the class through which questions can be stored on the hard drive and `Utility Classes`","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":"refer to any miscellaneous utility classes used by all the components.","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":"## Application Lifecycle","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":"![](./UML/lifecycle.jpg)","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":"The program begins with the `run()` call to `QuizHub` class.","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":"This starts a loop in which","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"user input is continuously read in from CLI for the user command to be extracted and executed.","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":"In each iteration of the loop, `QuizHub` makes a call to `Ui.getUserInput()` and returns the","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":"entire user input as a String object. Following which, `QuizHub` makes a call to","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":"`Parser.parseCommand()` to extract the user command from the String object and returns a","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":"`Command` object. Finally, `QuizHub` makes a call to `Command.executeCommand()` and performs","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":"the requested task.","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":"If `Command` is of Exit type, the loop will exit, and the program terminates.","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":"## Parser Component","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":"The `Parser` component is the backbone behind the program, functioning as the API","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"between the CLI user interface and the core functionalities of the program. It supports","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":"the direct communication between the program and user by converting user input into `Command`","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":"objects which can be interpreted by the program.","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":"### Design Considerations","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":"As the `Parser` functions as the API between user and program, it must be designed with a clear","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":"consideration of both human and machine requirements.","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":"Our target users are NUS students preparing for exams who wish to use our program to facilitate","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":"their practice. Considering that time is of the essence for revising students, the `Parser` must","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":"prioritise efficiency of use to not cause time delays to users\u0027 revision. With this in mind,","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":"we based our design off the following points for inputs taken in by the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":"1. **Ease of use**: Simple and short command structure \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"2. **Ease of familiarisation**: No excessive or complicated commands","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":"Consideration must also be given to the developers and machine executing the code. The exact","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":"mechanism behind the `Parser` must be able to effectively extract the relevant information from","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":"user inputs in a non-arbitrary way to be used by other classes. Hence, we also need to strike a balance with the","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":"following point for inputs taken in by the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":"1. **Ease of processing and validation**: Hierarchical command structure","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":"### Alternative Design Considerations","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":"In designing the `Parser`, an alternative design we considered is to follow that of `Unix`","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":"command interface. The `Unix` parser is designed such that input commands are required to","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":"have the syntax of ```command -(options) argument1 argument2 ...``` where the order of arguments","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":"does not matter. While this is a clean and neat parser design, we have decided not to adopt this","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":"design as we see a strong need of having a hierarchical command structure for our program.","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":"1. A hierarchical structure introduces logical sequence and flow to the command used,","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" facilitating a quick familiarisation process for users to quickly learn the command syntax.","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" This is in line with our design consideration to minimise learning and familiarisation time","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" for users. This is in addition to the ease of processing and validation of commands.","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" ```short [question]/[answer]/[module]/[difficulty]```, for one, is a command that has a","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" logical sequence to which the details of a question is entered. It is more intuitive to","lastModifiedDate":"2023-10-24"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" follow a structure instead of entering such details without a fixed order, which can easily","lastModifiedDate":"2023-10-24"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" lead to confusion. \u003cbr\u003e\u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":"2. The use of the delimiter `/` also better helps to introduce the concept of hierarchy than the","lastModifiedDate":"2023-10-24"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" delimiter `--` used in `Unix` commands as `/` can be more easily associated with layering and","lastModifiedDate":"2023-10-24"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" stacking, which create structures possessing hierarchy.","lastModifiedDate":"2023-10-24"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":"### Parser Command Syntax","lastModifiedDate":"2023-10-24"},{"lineNumber":112,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":"Our final design seeks to optimise both user experience and program effectiveness.","lastModifiedDate":"2023-10-24"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":"We have hence chosen the following general syntax for commands to be input into the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":"All commands require a starting payload, but some commands do not require the subsequent arguments.","lastModifiedDate":"2023-10-24"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":"commandType [payload] [/argument1 [payload1] /argument2 [payload2] ... ]","lastModifiedDate":"2023-10-24"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":"The command structure is simple, short, and intuitive. With commands rarely requiring more","lastModifiedDate":"2023-10-24"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":"than 2 arguments, typing and inputting the command in CLI is fast and efficient, allowing","lastModifiedDate":"2023-10-24"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":"revising students to quickly utilise the program. The hierarchical and logical structure to","lastModifiedDate":"2023-10-24"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":"the arrangement of arguments and payloads allows students to quickly familiarise with the","lastModifiedDate":"2023-10-24"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":"syntax and minimise delays to their learning schedule.","lastModifiedDate":"2023-10-24"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":"The hierarchical structure also allows for the respective payload to be easily extracted","lastModifiedDate":"2023-10-24"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":"with little ambiguity. Command validation can then be performed sequentially, facilitating","lastModifiedDate":"2023-10-24"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":"efficient checks.","lastModifiedDate":"2023-10-24"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":"### Implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":"The main function of `Parser` is to decode user input and extract relevant information to be","lastModifiedDate":"2023-10-24"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":"used by other classes. Hence, it supports 3 main methods as listed below.","lastModifiedDate":"2023-10-24"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"1. `parseCommand`","lastModifiedDate":"2023-10-24"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":"2. `getContentAfterKeyword`","lastModifiedDate":"2023-10-24"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":"3. `extractQuestionDifficulty`","lastModifiedDate":"2023-10-24"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":"`parseCommand`","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":"This method processes raw user input from CLI to extract information to be assembled into a","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":"`Command` object. It determines the type of command by reading the commandType from the","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":"very start of the user input.","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":"The following sequence diagram shows the implementation of `parseCommand`.","lastModifiedDate":"2023-10-24"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":"![](./UML/Parser.jpg)","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":"`getContentAfterKeyword`","lastModifiedDate":"2023-10-24"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"This method acts as a helper method to assist in extracting the payload following an argument","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":"in the user input. It is used in the constructing of `Command` objects when command-specific","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":"information need to be extracted from arguments in the user input.","lastModifiedDate":"2023-10-24"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"It simply breaks up an entire ```/argument [payload]``` String into ```/argument``` and","lastModifiedDate":"2023-10-24"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":"```[payload]``` and returns the `[payload]`. Hence, any String passed into this method must","lastModifiedDate":"2023-10-24"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":"take on the form of ```/argument [payload]``` or an exception will be thrown and handled by","lastModifiedDate":"2023-10-24"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":"printing an error message to the CLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":"`extractQuestionDifficulty`","lastModifiedDate":"2023-10-24"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":"This method acts as a helper method for extracting an `QnDifficulty` enum type from a user","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":"text input. This is used for setting question difficulty during the construction of a","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":"`Question` , or the execution of a `CommandMarkDifficulty`.","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":"If the string passed to this method does not describe an existing question difficulty level, an","lastModifiedDate":"2023-10-24"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":"exception will be thrown and handled by printing an error message to the CLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":168,"author":{"gitId":"yeo-menghan"},"content":"## Command Components","lastModifiedDate":"2023-10-24"},{"lineNumber":169,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":170,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":171,"author":{"gitId":"yeo-menghan"},"content":"### Start Command - Start Quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":172,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":173,"author":{"gitId":"yeo-menghan"},"content":"The start quiz feature allows users to start quizzing themselves with customizable characters to define which modules to quiz themselves on alongside whether to randomize the questions or use their pre-defined question order.","lastModifiedDate":"2023-10-24"},{"lineNumber":174,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":175,"author":{"gitId":"yeo-menghan"},"content":"![](./UML/CommandStart_Sequence.jpg)","lastModifiedDate":"2023-10-24"},{"lineNumber":176,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":177,"author":{"gitId":"yeo-menghan"},"content":"The start quiz mechanism is facilitated by CommandStart under package quizhub.command. The class utilises methods from `quizhub.questionlist.QuestionList`. It extends Command with 2 new prompts (`/[quiz mode]` and `/[qn mode]`) and 1 user input field (`/[start details]`). It implements the following operations:","lastModifiedDate":"2023-10-24"},{"lineNumber":178,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":179,"author":{"gitId":"yeo-menghan"},"content":"`/[quiz mode]`","lastModifiedDate":"2023-10-24"},{"lineNumber":180,"author":{"gitId":"yeo-menghan"},"content":"1. 2 configurations - `/module` and `/all`","lastModifiedDate":"2023-10-24"},{"lineNumber":181,"author":{"gitId":"yeo-menghan"},"content":"2.\t`/module` must be followed by a category name to retrieve questions from that specific category","lastModifiedDate":"2023-10-24"},{"lineNumber":182,"author":{"gitId":"yeo-menghan"},"content":"- The method categoriseListByModules from the package `quizhub.questionlist.QuestionList` will be called to retrieve the questions by that are listed within the specified category from the storage list","lastModifiedDate":"2023-10-24"},{"lineNumber":183,"author":{"gitId":"yeo-menghan"},"content":"- `/all` will not require any input from `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":184,"author":{"gitId":"yeo-menghan"},"content":"3.\tThe method `getAllQns()` from package `quizhub.questionlist.QuestionList` will be called to retrieve all questions from the storage list.","lastModifiedDate":"2023-10-24"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":186,"author":{"gitId":"yeo-menghan"},"content":"`/[qn mode]`","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"yeo-menghan"},"content":"1.\t2 configurations - `/random` and `/normal`","lastModifiedDate":"2023-10-24"},{"lineNumber":188,"author":{"gitId":"yeo-menghan"},"content":"2.\tThis prompt is activated after defining `/[quiz mode]` and `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":189,"author":{"gitId":"yeo-menghan"},"content":"3.\t/random will randomize the list of questions using `java.util.Collections.shuffle` and store it within a temporary array to prevent tempering with the original array in Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":190,"author":{"gitId":"yeo-menghan"},"content":"4.\t`/normal` will not require any further actions, using the previously generated list as specified by `/[quiz mode]` and `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"yeo-menghan"},"content":"`/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"yeo-menghan"},"content":"1.\tDefine the category of `/module` i.e. `/module` number to call upon the “number” tagged modules when starting the quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"yeo-menghan"},"content":"2.\tThis field can be left blank when `/all` is called for `/[quiz mode]` to tell the program to quiz the user on all questions stored within the local storage","lastModifiedDate":"2023-10-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":196,"author":{"gitId":"yeo-menghan"},"content":"Thereafter the quiz is started by calling the method `startQuiz()` in package `quizhub.questionlist.QuestionList`. Within `startQuiz()`, the program iterates through the list of totalQuestions while blocking out the answers. The user can input their answer in the input field which is utilized to match with the actual answer to provide “correct” or “wrong”. Each correct answer will increment correctAnswers variable by 1. The quiz ends when all the questions are displayed and the total number of correctAnswers will be displayed.","lastModifiedDate":"2023-10-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":198,"author":{"gitId":"James-Hong-Jey"},"content":"### Short Command - Add Short Answer Question to the Quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":199,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"James-Hong-Jey"},"content":"One of the supported question formats is the Short Answer Question, in which a question","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"James-Hong-Jey"},"content":"can be answered with a phrase of a few words, which will be matched to a corresponding answer","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"James-Hong-Jey"},"content":"of sufficient similarity.","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":204,"author":{"gitId":"James-Hong-Jey"},"content":"It is parsed as: `short [question]/[answer]/[module]/[difficulty]`","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"James-Hong-Jey"},"content":"1. `[question]` is the question, phrased as asking the user (i.e. What is 2 + 2? )","lastModifiedDate":"2023-10-24"},{"lineNumber":206,"author":{"gitId":"James-Hong-Jey"},"content":"2. `[answer]` is the answer or possible answer(s) that the user must","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"James-Hong-Jey"},"content":" input to count as correct. It is case-insensitive. (i.e. 4, four)","lastModifiedDate":"2023-10-24"},{"lineNumber":208,"author":{"gitId":"James-Hong-Jey"},"content":"3. `[module]` is the module that the question belongs in (i.e. CS2113)","lastModifiedDate":"2023-10-24"},{"lineNumber":209,"author":{"gitId":"James-Hong-Jey"},"content":"4. `[difficulty]` is the difficulty of the question for sorting later (i.e. Hard)","lastModifiedDate":"2023-10-24"},{"lineNumber":210,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":211,"author":{"gitId":"James-Hong-Jey"},"content":"*Condensed Class Diagram - Does not contain all attributes \u0026 methods","lastModifiedDate":"2023-10-25"},{"lineNumber":212,"author":{"gitId":"James-Hong-Jey"},"content":"![](./UML/AddShortCommand.jpg)","lastModifiedDate":"2023-10-25"},{"lineNumber":213,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":214,"author":{"gitId":"James-Hong-Jey"},"content":"Thereafter, the command is returned to the Quizhub component and executed,","lastModifiedDate":"2023-10-24"},{"lineNumber":215,"author":{"gitId":"James-Hong-Jey"},"content":"to add a Question object to the corresponding QuestionList object","lastModifiedDate":"2023-10-24"},{"lineNumber":216,"author":{"gitId":"James-Hong-Jey"},"content":"using the `addToQuestionList` method. This method will analyse the arguments above","lastModifiedDate":"2023-10-24"},{"lineNumber":217,"author":{"gitId":"James-Hong-Jey"},"content":"and add the Question to the appropriate list.","lastModifiedDate":"2023-10-24"},{"lineNumber":218,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":219,"author":{"gitId":"James-Hong-Jey"},"content":"### Find Command - Look for a matching question","lastModifiedDate":"2023-10-24"},{"lineNumber":220,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":221,"author":{"gitId":"James-Hong-Jey"},"content":"Quizhub supports searching for specific questions, by searching matching keywords","lastModifiedDate":"2023-10-24"},{"lineNumber":222,"author":{"gitId":"James-Hong-Jey"},"content":"in the format","lastModifiedDate":"2023-10-24"},{"lineNumber":223,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":224,"author":{"gitId":"James-Hong-Jey"},"content":"`find /[description]` OR `find /[module]`","lastModifiedDate":"2023-10-24"},{"lineNumber":225,"author":{"gitId":"James-Hong-Jey"},"content":"i.e. `find /CS2113`, `find /water buffalo`","lastModifiedDate":"2023-10-24"},{"lineNumber":226,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":227,"author":{"gitId":"James-Hong-Jey"},"content":"This command is passed to the corresponding QuestionList where the `searchList` method","lastModifiedDate":"2023-10-24"},{"lineNumber":228,"author":{"gitId":"James-Hong-Jey"},"content":"is called, which will create a new ArrayList of questions that contain the (case-insensitive)","lastModifiedDate":"2023-10-24"},{"lineNumber":229,"author":{"gitId":"James-Hong-Jey"},"content":"keyword and subsequently print them.","lastModifiedDate":"2023-10-24"},{"lineNumber":230,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":231,"author":{"gitId":"StevenGX12"},"content":"## Storage Component","lastModifiedDate":"2023-10-24"},{"lineNumber":232,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":233,"author":{"gitId":"StevenGX12"},"content":"The Storage class is a critical component of the QuizHub application, responsible for managing the storage, retrieval, and updating of question data. It represents a hard disk storage system for storing, reading, and updating question data. It interacts with question data in a file specified by the user and integrates with the `QuestionList` class for effective storage and retrieval of questions.","lastModifiedDate":"2023-10-24"},{"lineNumber":234,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":235,"author":{"gitId":"StevenGX12"},"content":"Developers need to be aware of the two main methods for loading and updating data:","lastModifiedDate":"2023-10-24"},{"lineNumber":236,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":237,"author":{"gitId":"StevenGX12"},"content":"- `public void loadData(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":238,"author":{"gitId":"StevenGX12"},"content":"- `public void updateData(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":239,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":240,"author":{"gitId":"StevenGX12"},"content":"The details of the data loading and updating process are explained in details below.","lastModifiedDate":"2023-10-24"},{"lineNumber":241,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":242,"author":{"gitId":"StevenGX12"},"content":"### Constructor","lastModifiedDate":"2023-10-24"},{"lineNumber":243,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":244,"author":{"gitId":"StevenGX12"},"content":"#### `public Storage(String filePath)`","lastModifiedDate":"2023-10-24"},{"lineNumber":245,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":246,"author":{"gitId":"StevenGX12"},"content":"- **Parameters:**","lastModifiedDate":"2023-10-24"},{"lineNumber":247,"author":{"gitId":"StevenGX12"},"content":" - `filePath`: The path to the file where question data is stored and read from.","lastModifiedDate":"2023-10-24"},{"lineNumber":248,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":249,"author":{"gitId":"StevenGX12"},"content":"### Loading data","lastModifiedDate":"2023-10-24"},{"lineNumber":250,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":251,"author":{"gitId":"StevenGX12"},"content":"The process of loading data from the storage file specified in the constructor takes places in a few steps. To illustrate the overall flow on loading data, refer to the sequence diagram below.","lastModifiedDate":"2023-10-24"},{"lineNumber":252,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":253,"author":{"gitId":"StevenGX12"},"content":"![](./UML/Storage.jpg)","lastModifiedDate":"2023-10-24"},{"lineNumber":254,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":255,"author":{"gitId":"StevenGX12"},"content":":exclamation: This sequence diagram emphasizes the process of loading data into storage, and has therefore omitted details of more trivial and/or non-related methods as well as exception handling logic. To find out more about the details, please refer to the complete code and header comments.","lastModifiedDate":"2023-10-24"},{"lineNumber":256,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":257,"author":{"gitId":"StevenGX12"},"content":"In addition to the main `loadData` method, the process involves the following 3 helper methods:","lastModifiedDate":"2023-10-24"},{"lineNumber":258,"author":{"gitId":"StevenGX12"},"content":"- `private void addQuestionFromFile(QuestionList questions, String currentQuestion, int questionIndex, String questionType, String questionDescription, String questionDoneStatus, String questionDifficulty, String questionModule)`","lastModifiedDate":"2023-10-24"},{"lineNumber":259,"author":{"gitId":"StevenGX12"},"content":"- `private void parseQuestionsFromStrings(ArrayList\u003cString\u003e rawQuestions, QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":260,"author":{"gitId":"StevenGX12"},"content":"- `public void buildCurrentListFromFile(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":261,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":262,"author":{"gitId":"StevenGX12"},"content":"The general idea is that when the program is first initiated, the `loadData` method is called from within the `Ui` class, which passes in an empty `QuestionList`. Within the method itself, the helper method `buildCurrentListFromFile()` will take in this empty `QuestionList` object and populate it with `question` objects according to textual information stored within the specified file. This is done by first extracting each question stored line by line into a new `Arraylist\u003cString\u003e rawQuestions`, then calling another helper method `parseQuestionsFromStrings()` to add each question into the `QuestionList` via a third helper method `addQuestionFromFileaddQuestionFromFile`.","lastModifiedDate":"2023-10-24"},{"lineNumber":263,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":"The process is refactored into these methods to avoid deep nesting of code to achieve clearer logical flow and more readability and easier debugging process.","lastModifiedDate":"2023-10-28"},{"lineNumber":265,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":266,"author":{"gitId":"StevenGX12"},"content":"### Updating data","lastModifiedDate":"2023-10-24"},{"lineNumber":267,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":268,"author":{"gitId":"StevenGX12"},"content":"The process of updating data is done in a similar fashion compared to that of loading data, but in the reverse order logically.","lastModifiedDate":"2023-10-24"},{"lineNumber":269,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":270,"author":{"gitId":"StevenGX12"},"content":"Apart from the main `updateData` method, it involves the use of 2 other helper methods:","lastModifiedDate":"2023-10-24"},{"lineNumber":271,"author":{"gitId":"StevenGX12"},"content":"- `private void writeToFile(String filePath, String textToAdd, boolean toAppend)`","lastModifiedDate":"2023-10-24"},{"lineNumber":272,"author":{"gitId":"StevenGX12"},"content":"- `private void storeQuestionToFile(Question question)`","lastModifiedDate":"2023-10-24"},{"lineNumber":273,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":274,"author":{"gitId":"StevenGX12"},"content":"Upon exiting the program, the `Ui` class will call the `updateData` method and passing in the current `QuestionList` of the program. Within the method, the `writeToFile` helper method is first called to determine whether texts are to replace existing content of the file or to be appended at the back. Then, each question is stored in the appropriate format into the destination file using the method `storeQuestionToFile` which parses a `Question` object into the correct string format for storage.","lastModifiedDate":"2023-10-24"},{"lineNumber":275,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":276,"author":{"gitId":"StevenGX12"},"content":"## UI Component","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"StevenGX12"},"content":"The UI class in the Quizhub application is responsible for handling the user interface interactions in a command-line interface (CLI). It provides methods for displaying messages or questions as well as getting user","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"StevenGX12"},"content":"input.","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"StevenGX12"},"content":"### Constructor","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"StevenGX12"},"content":"#### `public Ui(Storage dataStorage, QuestionList tasks)`","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"StevenGX12"},"content":"- **Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"StevenGX12"},"content":" - `dataStorage`: An instance of the `Storage` class, which handles the storage of quiz data on the hard disk.","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"StevenGX12"},"content":" - `tasks`: An instance of the `QuestionList` class, which represents a record of all questions documented in the application.","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"StevenGX12"},"content":"### Implementation Details","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"StevenGX12"},"content":"#### Overall Flow","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"StevenGX12"},"content":"![](./UML/ui_flow.jpg)","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"StevenGX12"},"content":"When the program is first initiated, the `displayOpeningMessage()` method is called to display a welcome message while also calling the `loadData()` method of the `dataStorage` to display all the questions stored in the storage file if any.","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"spinoandraptos"},"content":"Afterward, in the main loop of the program execution, the `getUserInput()` method is called at the start of the loop to capture user input as a `String` object, which is then used by the `Parser` and various `Command` classes to parse and execute the appropriate commands. This process is terminated only upon execution of a `CommandExit`.","lastModifiedDate":"2023-10-28"},{"lineNumber":298,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"StevenGX12"},"content":"Finally, the `displayClosingMessage()` method is called to display a farewell message while also calling the `updateData()` method of the `dataStorage` to update the data stored in the storage file with the latest ones.","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"StevenGX12"},"content":"#### Displaying Quizzes","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"StevenGX12"},"content":"![](./UML/ui_quiz.jpg)","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"StevenGX12"},"content":"The `Ui` class also has a `displayQuestion(Question question, int currentQuestionIndex, int totalQuestions)` method, which is used to render a question from the list of stored questions in the specific format and prompt the user for an answer when a `CommandStart` is executed to signal the start of a quiz. This method will be called in a loop for each question until the end of the list of questions.","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"spinoandraptos"},"content":"# Product scope","lastModifiedDate":"2023-10-24"},{"lineNumber":308,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":309,"author":{"gitId":"spinoandraptos"},"content":"## Our Product","lastModifiedDate":"2023-10-24"},{"lineNumber":310,"author":{"gitId":"lisizhuang-0121"},"content":"QuizHub","lastModifiedDate":"2023-10-21"},{"lineNumber":311,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":312,"author":{"gitId":"spinoandraptos"},"content":"## Target user profile","lastModifiedDate":"2023-10-24"},{"lineNumber":313,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":314,"author":{"gitId":"lisizhuang-0121"},"content":"Our target users are","lastModifiedDate":"2023-10-21"},{"lineNumber":315,"author":{"gitId":"lisizhuang-0121"},"content":"* NUS Students preparing for exams","lastModifiedDate":"2023-10-21"},{"lineNumber":316,"author":{"gitId":"lisizhuang-0121"},"content":"* Like to take notes in class","lastModifiedDate":"2023-10-21"},{"lineNumber":317,"author":{"gitId":"lisizhuang-0121"},"content":"* Fear to miss out of important knowledge","lastModifiedDate":"2023-10-21"},{"lineNumber":318,"author":{"gitId":"lisizhuang-0121"},"content":"* Like to test their understanding of knowledge","lastModifiedDate":"2023-10-21"},{"lineNumber":319,"author":{"gitId":"lisizhuang-0121"},"content":"* Want to be better prepared for exams","lastModifiedDate":"2023-10-21"},{"lineNumber":320,"author":{"gitId":"lisizhuang-0121"},"content":"* Majoring in computing or engineering where there are lots of exams","lastModifiedDate":"2023-10-21"},{"lineNumber":321,"author":{"gitId":"lisizhuang-0121"},"content":"* Coders and tech geeks who enjoy using the CLI interface","lastModifiedDate":"2023-10-21"},{"lineNumber":322,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":323,"author":{"gitId":"spinoandraptos"},"content":"## Value proposition","lastModifiedDate":"2023-10-24"},{"lineNumber":324,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":325,"author":{"gitId":"lisizhuang-0121"},"content":"Allow NUS Students to easily take notes in class and allow them to","lastModifiedDate":"2023-10-21"},{"lineNumber":326,"author":{"gitId":"lisizhuang-0121"},"content":"generate quizzes to test their knowledge of understanding. By using the","lastModifiedDate":"2023-10-21"},{"lineNumber":327,"author":{"gitId":"lisizhuang-0121"},"content":"QuizHub application, students can input notes taken in class in a question form,","lastModifiedDate":"2023-10-21"},{"lineNumber":328,"author":{"gitId":"lisizhuang-0121"},"content":"which they could use to take quizzes to ensure their understanding of the topic.","lastModifiedDate":"2023-10-21"},{"lineNumber":329,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":330,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":331,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":332,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":333,"author":{"gitId":"lisizhuang-0121"},"content":"|:-------:|:-------------------------------------:|:---------------------------------------------------------------------------------:|:-------------------------------------------------------------------------:|","lastModifiedDate":"2023-10-21"},{"lineNumber":334,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | New student user | I can access the tutorial on how to operate the app | Easily use the app effectively for my studies |","lastModifiedDate":"2023-10-21"},{"lineNumber":335,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Efficient student | I can add a question and its answer easily to my question and answer bank | Build my question and answer bank quickly |","lastModifiedDate":"2023-10-21"},{"lineNumber":336,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Organized student | I can view all the questions and answers in my question and answer bank | Review my study materials comprehensively |","lastModifiedDate":"2023-10-21"},{"lineNumber":337,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Detail-oriented student | I can edit the content of a question or its answer | Correct any mistakes or make improvements |","lastModifiedDate":"2023-10-21"},{"lineNumber":338,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on clarity | I can delete a question and its answer from my question and answer bank | Maintain a clean and relevant set of questions for revision |","lastModifiedDate":"2023-10-21"},{"lineNumber":339,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on revising for tests | I can start and end a quiz which tests me on questions in my question bank | Consolidate understanding of my learnt knowledge through rigorous testing |","lastModifiedDate":"2023-10-21"},{"lineNumber":340,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on revising for tests | I can see my final quiz score and whether I have answered each question correctly | Identify areas of weakness to be improved upon for my tests |","lastModifiedDate":"2023-10-21"},{"lineNumber":341,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking efficiency | I can search for a specific question within a flashcard deck | locate information quickly. |","lastModifiedDate":"2023-10-21"},{"lineNumber":342,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User with diverse interests | I can categorize questions by topic or subject | tailor my quizzes |","lastModifiedDate":"2023-10-21"},{"lineNumber":343,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking variety | I can shuffle the order of questions in a flashcard deck | keep my quizzes engaging. |","lastModifiedDate":"2023-10-21"},{"lineNumber":344,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User aiming for improvement | I can mark a question as \"difficult\" or \"easy\" for later review | optimize my learning. |","lastModifiedDate":"2023-10-21"},{"lineNumber":345,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking a challenge | I can practice questions in a random order | test my knowledge comprehensively. |","lastModifiedDate":"2023-10-21"},{"lineNumber":346,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking structure | I can practice questions in a sequential order | follow a specific learning path. |","lastModifiedDate":"2023-10-21"},{"lineNumber":347,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user aiming for accuracy | I can see how many questions I\u0027ve answered correctly | track my proficiency. |","lastModifiedDate":"2023-10-21"},{"lineNumber":348,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user tracking progress | I can reset the progress of a specific flashcard deck | start fresh. |","lastModifiedDate":"2023-10-21"},{"lineNumber":349,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | time-conscious user | I can set a timer for each flashcard question during practice | manage my study sessions effectively. |","lastModifiedDate":"2023-10-21"},{"lineNumber":350,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | goal-oriented user | I can view my overall progress and performance statistics | gauge my improvement. |","lastModifiedDate":"2023-10-21"},{"lineNumber":351,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user aiming for improvement | I can see how many questions I\u0027ve answered incorrectly | focus on weak areas. |","lastModifiedDate":"2023-10-21"},{"lineNumber":352,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user committed to learning | I can review the questions I\u0027ve answered incorrectly | reinforce my knowledge. |","lastModifiedDate":"2023-10-21"},{"lineNumber":353,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":354,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":355,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":356,"author":{"gitId":"spinoandraptos"},"content":"1. Program should work on any typical OS as long as it has Java 11 installed and configured.","lastModifiedDate":"2023-10-28"},{"lineNumber":357,"author":{"gitId":"spinoandraptos"},"content":"2. A user with average or above typing speed for regular English text (not program code) in the CLI should not ","lastModifiedDate":"2023-10-29"},{"lineNumber":358,"author":{"gitId":"spinoandraptos"},"content":"experience any significant delays to their revision as compared to using a GUI program.","lastModifiedDate":"2023-10-29"},{"lineNumber":359,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":360,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":361,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":362,"author":{"gitId":"spinoandraptos"},"content":"1. **Typical OS**: Windows, Linux, Unix, macOS.","lastModifiedDate":"2023-10-28"},{"lineNumber":363,"author":{"gitId":"spinoandraptos"},"content":"2. **CommandType**: The first word input in the CLI, indicates the type of instruction the program should execute.","lastModifiedDate":"2023-10-28"},{"lineNumber":364,"author":{"gitId":"spinoandraptos"},"content":"`e.g. start, delete, short`","lastModifiedDate":"2023-10-28"},{"lineNumber":365,"author":{"gitId":"spinoandraptos"},"content":"3. **Argument**: A parameter word identified by a leading `/`, arguments indicate the start of information","lastModifiedDate":"2023-10-28"},{"lineNumber":366,"author":{"gitId":"spinoandraptos"},"content":"to be extracted from a command in addition to the command type.","lastModifiedDate":"2023-10-28"},{"lineNumber":367,"author":{"gitId":"spinoandraptos"},"content":"4. **Payload**: A sequence of additional information immediately following the command type or arguments, they","lastModifiedDate":"2023-10-28"},{"lineNumber":368,"author":{"gitId":"spinoandraptos"},"content":"provide information for executing complex instructions.","lastModifiedDate":"2023-10-28"},{"lineNumber":369,"author":{"gitId":"spinoandraptos"},"content":"5. **Hierarchical**: Possesses logical sequencing or order, such as in order of decreasing subsets or importance.","lastModifiedDate":"2023-10-28"},{"lineNumber":370,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":371,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":372,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":373,"author":{"gitId":"spinoandraptos"},"content":"### Launch","lastModifiedDate":"2023-10-28"},{"lineNumber":374,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":375,"author":{"gitId":"spinoandraptos"},"content":"1. Ensure you have Java 11 or above installed in your Computer.","lastModifiedDate":"2023-10-28"},{"lineNumber":376,"author":{"gitId":"spinoandraptos"},"content":"2. Download the latest `tp_version_1.0.jar` from [here](https://github.com/AY2324S1-CS2113-W12-1/tp/releases/download/Version_1_0/tp_version_1.0.jar).","lastModifiedDate":"2023-10-28"},{"lineNumber":377,"author":{"gitId":"spinoandraptos"},"content":"3. Copy the file to the folder you want to use as the home folder for your QuizHub.","lastModifiedDate":"2023-10-28"},{"lineNumber":378,"author":{"gitId":"spinoandraptos"},"content":"4. Open a command terminal, cd into the folder you put the `tp_version_1.0.jar` file in, and use the java -jar ","lastModifiedDate":"2023-10-28"},{"lineNumber":379,"author":{"gitId":"spinoandraptos"},"content":"`tp_version_1.0.jar` command to run the application and launch the CLI.","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"spinoandraptos":144,"StevenGX12":78,"James-Hong-Jey":49,"yeo-menghan":25,"lisizhuang-0121":52,"-":31}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"QuizHUB is a local desktop app designed to help NUS students easily record examinable questions and generate quizzes","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"from their very own question bank to test their understanding via a Command Line Interface (CLI). Easily launch-able","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":"on the go, QuizHUB is a versatile tool that aims to streamline and optimize the revision experience for NUS students","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"from all fields of study.","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"2. Down the latest version of `QuizHub` from [here](http://link.to/duke).","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"## Features","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":"1. Helper command","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"yeo-menghan"},"content":"2. Add question/answer and group them in modules/difficulty","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"yeo-menghan"},"content":"3. Stores the question/answer in local storage","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":"4. Delete question/answer","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":"5. Find question/answer via question\u0027s description or via module name","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":"6. Edit question/answer","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":"7. Mark question difficulty","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":"8. Start a quiz session, specifying category of questions and in random/normal mode","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"9. Permanently shuffle questions order for added challenge!","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"### Getting help on using the app: `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":"Assists new users in familiarising with the application. Provides a list of commands for the user to get started","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"with the essentials.","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"yeo-menghan"},"content":"Format: `help`","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"yeo-menghan"},"content":"* **Command**:`help` \u003cbr\u003e","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":"`Here are the list of commands you can use:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":"`1. help - shows the list of commands you can use,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":"`2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and its answer to the list,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"`3. list - shows the list of questions and answers,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":"`4. delete [question number] - deletes the question and answer at the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":"`5. find /[description] - displays all questions that contains the specified description,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":"`6. find /[module] - displays all questions that belong to the specified module,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":"`7. edit [question number] /description [description] - edits the description of the question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":"`8. edit [question number] /answer [answer] - edits the answer to the question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":"`9. start /[quiz mode] [start details] /[qn mode] - starts the quiz with option for /module or /all and /random or /normal,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":"`10. shuffle - shuffle quiz questions to a random order,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":"`11. markdiff [question number] [question difficulty] - sets the difficulty of question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":"`12. bye - exits the program` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":"* Ver 2.0 will only list commands. Future versions will include auto-filling and scrolling","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"yeo-menghan"},"content":" (multiple pages of the help menu)","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":"### Adding short-answer questions and their answers: `short`","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"yeo-menghan"},"content":"Adds a new short question and its answer to the question and answer bank along with the assigned module and","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":"difficulty level.","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"yeo-menghan"},"content":"Format: `short [question]/[answer]/[module]/[difficulty]`","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"yeo-menghan"},"content":"Example of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `add What is the value of Pi to 2 decimal places?/3.14/math/math` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" `I have added the following question OwO:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" `[S] What is the value of Pi to 2 decimal places? / 3.14 | math | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `add What fish is Nemo based off?/a Clownfish/trivia/easy` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" `I have added the following question OwO:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" `[S][] What fish is Nemo based off? / a Clownfish | trivia | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e ","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"yeo-menghan"},"content":"* If either the question or answer is left blank, the app will prompt you to re-enter the question-answer set,","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"yeo-menghan"},"content":" the app does not support blank questions/answers","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"yeo-menghan"},"content":"### List Questions `list`","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":"List all the questions from the question and answer bank in the storage.","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"yeo-menghan"},"content":"Format: `list`","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"yeo-menghan"},"content":"Examples of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `list` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"yeo-menghan"},"content":" **Output**:\u003cbr\u003e","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" 1: `[S][] 2 / 4 | num | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" 2: `[S][] hi / hihi | word | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" 3: `[S][] 6 / 12 | num | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"yeo-menghan"},"content":"### Delete Questions `delete`","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"Deletes the question with the specified question number from the question and answer bank.","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":"`delete [qustion number]`","lastModifiedDate":"2023-10-29"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `delete 2` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" `Roger that! I have deleted the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" `[s][] [question description] / [ansewer] | [module] | [quesiton difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":"Notes:","lastModifiedDate":"2023-10-29"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":"* The program only supports deleting one question at a time, so entering multiple question numbers will result in the program prompting you to enter only 1 question number.","lastModifiedDate":"2023-10-29"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":"* The program accepts only a valid integer question number within the range of the number of available questions, any other form of inputs will result in the program prompting you to re-enter a valid command.","lastModifiedDate":"2023-10-29"},{"lineNumber":104,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"yeo-menghan"},"content":"### Find question/answer `find`","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":"Finds and displays all questions in the question and answer bank that match the criteria (question description / answer) and keywords of the search.","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":"1. `find /description [question description]`","lastModifiedDate":"2023-10-29"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":"2. `find /answer [answer]`","lastModifiedDate":"2023-10-29"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":"Examples of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `find /description example description` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":" `Here are questions that matched your search:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":" `1: [S][] EXAMPLE Description / [answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":117,"author":{"gitId":"StevenGX12"},"content":" `2: [S][] example description1 / [answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" `3: [S][] example description 2/ [answer] | [module] | [question difficulty]` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `find /answer example answer` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":" `Here are questions that matched your search:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" `1: [S][] [question description] / EXAMPLE Answer | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" `2: [S][] [question description] / example answer1 | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" `3: [S][] [question description] / example answer 2 | [module] | [question difficulty]` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":"Notes:","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":"* As long as the search keyword string is a substring of the question description / answer of a question stored in the question and answer bank, it will be included in the search result. Please refer to the above examples as an illustration of this property.","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":"* The search is non case-sensitive. Please refer to the above examples as an illustration of this property.","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"yeo-menghan"},"content":"### Edit question/answer `edit`","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":"Edits the description or answer of an existing question in the question and answer bank","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":"by referencing the number of the question in the existing question list in the question","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":"and answer bank.","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":"Format:","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":"1. `edit [question number] /description [newDescription]`","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":"2. `edit [question number] /answer [newAnswer]`","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":"Examples of usage:","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `edit 1 /description change description!!!` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have edited the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" `[S][] change description!!! / [original answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `edit 2 /answer different answer???` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have edited the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / different answer??? | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":"Notes:","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":"* If either the question number is invalid, or no new description or answer is provided,","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" the app will prompt you to re-enter the edit command","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"* The app only supports changing either description or answer at a time, not both together","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"yeo-menghan"},"content":"### Start quiz `start`","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"yeo-menghan"},"content":"Starts a quiz which fetches the specified category from the question bank in normal / random order to be tested.","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":"The app will display the fetched questions one at a time on CLI and the user is required to enter answer through CLI.","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":"Upon every user answer entry, the app feedbacks if the user answered correctly, loads the next question and updates","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":"the score. When all questions are answered, the quiz terminates automatically and the final user quiz score is displayed.","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":162,"author":{"gitId":"yeo-menghan"},"content":"Format: `start /[quiz mode] [start details] /[qn mode]`","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"yeo-menghan"},"content":"Examples of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /module num /normal` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions that pertains to module “num” in order defined in the list","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /module num /random` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions that pertains to module “num” but in a randomised order","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /all /random` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions directly from the list of questions in random order","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /all /normal` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions directly from the list of questions in the order of the list","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":174,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":175,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":176,"author":{"gitId":"yeo-menghan"},"content":"* If the specified module is not part of the list, an exception will be thrown and the user will be notified","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"yeo-menghan"},"content":" with a prompt to write the command in the specified format.","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"yeo-menghan"},"content":"### Shuffling Questions `shuffle`","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"yeo-menghan"},"content":"Shuffle questions within question list to a random order,","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":182,"author":{"gitId":"yeo-menghan"},"content":"Format: `shuffle`","lastModifiedDate":"2023-10-27"},{"lineNumber":183,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":184,"author":{"gitId":"yeo-menghan"},"content":"Notes","lastModifiedDate":"2023-10-27"},{"lineNumber":185,"author":{"gitId":"spinoandraptos"},"content":"* Shuffle will not work if there are no questions within the question bank","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":187,"author":{"gitId":"yeo-menghan"},"content":"### Mark difficulty of questions `markdiff`","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"spinoandraptos"},"content":"Changes the difficulty level of an existing question in the question and answer bank","lastModifiedDate":"2023-10-28"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":"by referencing the number of the question in the existing question list in the question","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"spinoandraptos"},"content":"and answer bank.","lastModifiedDate":"2023-10-28"},{"lineNumber":191,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":192,"author":{"gitId":"spinoandraptos"},"content":"Format: `markdiff [question number] [question difficulty]`","lastModifiedDate":"2023-10-28"},{"lineNumber":193,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":194,"author":{"gitId":"spinoandraptos"},"content":"Examples of usage:","lastModifiedDate":"2023-10-28"},{"lineNumber":195,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `markdiff 1 easy` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":196,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":197,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have marked the following question as easy \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":198,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / [original answer] | [module] | EASY` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":199,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `markdiff 2 Hard` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":200,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":201,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have marked the following question as hard \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":202,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / [original answer] | [module] | HARD` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":203,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":204,"author":{"gitId":"spinoandraptos"},"content":"Notes:","lastModifiedDate":"2023-10-28"},{"lineNumber":205,"author":{"gitId":"spinoandraptos"},"content":"* If either the question number is invalid, or no difficulty level is provided,","lastModifiedDate":"2023-10-28"},{"lineNumber":206,"author":{"gitId":"spinoandraptos"},"content":" the app will prompt you to re-enter the markdiff command","lastModifiedDate":"2023-10-28"},{"lineNumber":207,"author":{"gitId":"spinoandraptos"},"content":"* The app only supports fixed difficulty levels, assigning any difficulty level that","lastModifiedDate":"2023-10-28"},{"lineNumber":208,"author":{"gitId":"spinoandraptos"},"content":" is not `easy`, `normal`, or `hard` will trigger a warning message","lastModifiedDate":"2023-10-28"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":"* Input difficulty level is CAPS-friendly","lastModifiedDate":"2023-10-28"},{"lineNumber":210,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":211,"author":{"gitId":"yeo-menghan"},"content":"### Exit Program `bye`","lastModifiedDate":"2023-10-27"},{"lineNumber":212,"author":{"gitId":"yeo-menghan"},"content":"Exits the program","lastModifiedDate":"2023-10-27"},{"lineNumber":213,"author":{"gitId":"yeo-menghan"},"content":"Format: `bye`","lastModifiedDate":"2023-10-27"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer?","lastModifiedDate":"2020-05-24"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":219,"author":{"gitId":"yeo-menghan"},"content":"**A**: Transfer the tasklist.txt generated to the same local directory as the jar file of the program in another","lastModifiedDate":"2023-10-27"},{"lineNumber":220,"author":{"gitId":"yeo-menghan"},"content":"computer.","lastModifiedDate":"2023-10-27"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":224,"author":{"gitId":"yeo-menghan"},"content":"1. `help` - shows the list of commands you can use","lastModifiedDate":"2023-10-27"},{"lineNumber":225,"author":{"gitId":"yeo-menghan"},"content":"2. `short [question]/[answer]/[module]/[difficulty]` - adds a short answer question and its answer to the list,","lastModifiedDate":"2023-10-27"},{"lineNumber":226,"author":{"gitId":"yeo-menghan"},"content":"3. `list` - shows the list of questions and answers,","lastModifiedDate":"2023-10-27"},{"lineNumber":227,"author":{"gitId":"yeo-menghan"},"content":"4. `delete [question number]` - deletes the question and answer at the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":228,"author":{"gitId":"spinoandraptos"},"content":"5. `find /[description]` - displays all questions that contains the specified description,","lastModifiedDate":"2023-10-28"},{"lineNumber":229,"author":{"gitId":"yeo-menghan"},"content":"6. `find /[module]` - displays all questions that belong to the specified module,","lastModifiedDate":"2023-10-27"},{"lineNumber":230,"author":{"gitId":"yeo-menghan"},"content":"7. `edit [question number] /description [description]` - edits the description of the question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":231,"author":{"gitId":"yeo-menghan"},"content":"8. `edit [question number] /answer [answer]` - edits the answer to the question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":232,"author":{"gitId":"yeo-menghan"},"content":"9. `start /[quiz mode] [start details] /[qn mode]` - starts the quiz with option for /module or /all and /random or","lastModifiedDate":"2023-10-27"},{"lineNumber":233,"author":{"gitId":"yeo-menghan"},"content":" /normal,","lastModifiedDate":"2023-10-27"},{"lineNumber":234,"author":{"gitId":"yeo-menghan"},"content":"10. `shuffle` - shuffle quiz questions to a random order,","lastModifiedDate":"2023-10-27"},{"lineNumber":235,"author":{"gitId":"yeo-menghan"},"content":"11. `markdiff [question number] [question difficulty]` - sets the difficulty of question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":236,"author":{"gitId":"yeo-menghan"},"content":"12. `bye` - exits the program","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":100,"StevenGX12":38,"yeo-menghan":76,"-":22}},{"path":"src/main/java/Quizhub.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * The main program running for the Duke chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" * The program bridges the user interface (Ui),","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * hard disk data (dataStorage) and supports","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * dynamic data manipulation.","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"public class Quizhub {","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" private Storage dataStorage;","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private QuestionList questions;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" private Parser parser;","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Initiates the program with the necessary components.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath File location where data is","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * written to and read from by the program.","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" public Quizhub(String filePath){","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" dataStorage \u003d new Storage(filePath);","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":" questions \u003d new QuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" ui \u003d new Ui(dataStorage, questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * Starts the chatbot by showing opening message.","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * Chatbot repeatedly handles user commands","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" * until it is requested to terminate.","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Chatbot closes by showing closing message.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" public void run(){","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" ui.displayOpeningMessage();","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" boolean toExit \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" while(!toExit){","lastModifiedDate":"2023-10-04"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" String fullCommand \u003d ui.getUserInput();","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" ui.showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d parser.parseCommand(fullCommand);","lastModifiedDate":"2023-10-04"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" toExit \u003d command.toExit();","lastModifiedDate":"2023-10-04"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":" command.executeCommand(ui, dataStorage, questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" if(!toExit){","lastModifiedDate":"2023-10-04"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" ui.showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" ui.displayClosingMessage();","lastModifiedDate":"2023-10-04"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-04"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" new Quizhub(\"tasklist.txt\").run();","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":46,"James-Hong-Jey":5,"lisizhuang-0121":4}},{"path":"src/main/java/quizhub/command/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a user command to execute an action.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":" public enum CommandType {HELP, ADD, LIST, EDIT, DELETE, START,","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" SHUFFLE, MARKDIFFICULTY, END, RESULT, FIND, EXIT, INVALID};","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" private CommandType commandType;","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new blank command.","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public Command(){}","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new command of given type.","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * @param commandType Type of command.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" public Command(CommandType commandType){","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" this.commandType \u003d commandType;","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Performs an action according to command.","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing question data.","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){}","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Checks if the latest command calls for program termination.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" public boolean toExit(){","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" return commandType \u003d\u003d CommandType.EXIT;","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":31,"James-Hong-Jey":5,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/command/CommandDelete.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to delete a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandDelete extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as delete [question number]\";","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate question index :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" private int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new delete command for a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnIndex 0-based index of question to be deleted.","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandDelete(int qnIndex){","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.DELETE);","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" * Checks if specified task exists.","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" * Deletes the specified task and updates storage data.","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" String taskName \u003d questions.viewQuestionByIndex(qnIndex);","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" if (taskName.equals(\"Question Not Found\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" ui.displayMessage(\" Ono! The question you are deleting is not found!\");","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" questions.deleteQuestionByIndex(qnIndex);","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":21,"James-Hong-Jey":7,"lisizhuang-0121":13}},{"path":"src/main/java/quizhub/command/CommandEdit.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to edit a task.","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandEdit extends Command {","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as edit [question number] \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" \"/description [description] or edit /answer [answer]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate question index :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_CRITERIA_MSG \u003d \" Ono! You did not indicate if \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" \"you are editing question description or answer :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":" public static final String MISSING_KEYWORD_MSG \u003d \" Ono! You did not enter a new description / answer :\u003c\";","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" private String newDescription;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" private String newAnswer;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new edit command","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput User input from CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" public CommandEdit(int qnIndex, String newDescription, String newAnswer) {","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.EDIT);","lastModifiedDate":"2023-10-05"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" this.newDescription \u003d newDescription;","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" this.newAnswer \u003d newAnswer;","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-05"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" if (newDescription \u003d\u003d null \u0026\u0026 newAnswer \u003d\u003d null) {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" questions.editQuestionByIndex(qnIndex, newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":10,"StevenGX12":5,"James-Hong-Jey":5,"lisizhuang-0121":20}},{"path":"src/main/java/quizhub/command/CommandExit.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to exit the program.","lastModifiedDate":"2023-10-04"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"public class CommandExit extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new exit command to terminate program.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" public CommandExit() {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.EXIT);","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":11,"lisizhuang-0121":1}},{"path":"src/main/java/quizhub/command/CommandFind.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to search for a task.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandFind extends Command{","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_CRITERIA_MSG \u003d \" Ono! You did not indicate \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" \"if you are searching by description or module :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_KEYWORD_MSG \u003d \" Ono! You did not indicate \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" \"the keywords you are searching by :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as find \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":" \"/description [description] or find /module [module]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private String searchCriteria;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" private String searchDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new find command to search for a task.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param searchDetails User input containing details of what to search.","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandFind(String searchCriteria, String searchDetails){","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" super((CommandType.FIND));","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" this.searchCriteria \u003d searchCriteria;","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" this.searchDetails \u003d searchDetails;","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * Checks if specified task exists.","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * Marks the specified task as not done and updates storage data.","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"StevenGX12"},"content":" assert questions !\u003d null \u0026\u0026 dataStorage !\u003d null \u0026\u0026 ui !\u003d null : \"Invalid null parameter\";","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" switch (searchCriteria) {","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"lisizhuang-0121"},"content":" case \"description\":","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" questions.searchListByDescription(searchDetails);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" case \"module\":","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":" questions.searchListByModule(searchDetails);","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" ui.displayMessage(INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":24,"StevenGX12":1,"James-Hong-Jey":6,"lisizhuang-0121":21}},{"path":"src/main/java/quizhub/command/CommandHelp.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandHelp extends Command{","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandHelp() {","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.HELP);","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":" * Displays all commands available to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":" * ","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-05"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" assert questions !\u003d null \u0026\u0026 dataStorage !\u003d null \u0026\u0026 ui !\u003d null : \"Invalid null parameter\";","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":8,"James-Hong-Jey":2,"lisizhuang-0121":13}},{"path":"src/main/java/quizhub/command/CommandInvalid.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents an invalid command to be handled.","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandInvalid extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public String feedback;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new invalid command with error feedback for user.","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandInvalid(String feedback) {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.INVALID);","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" this.feedback \u003d feedback;","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Displays the error feedback on CLI for user.","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" ui.showInvalidCommandHelp(feedback);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"spinoandraptos":9,"lisizhuang-0121":17}},{"path":"src/main/java/quizhub/command/CommandList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to list all tasks.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandList extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new list command to list all tasks.","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" public CommandList(){","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.LIST);","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" * Prints all tasks in current task list.","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" questions.printQuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":20,"James-Hong-Jey":4,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/command/CommandMarkDifficulty.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to mark the difficulty of a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"public class CommandMarkDifficulty extends Command{","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate index of question to be marked :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_DIFFICULTY_MSG \u003d \" Ono! You did not indicate difficulty \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" \"to be assigned the question :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as markdiff \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" \"[qn number] [qn difficulty]!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public static final String TOO_MANY_ARGUMENTS_MSG \u003d \" Ono! Markdiff command only takes in 2 arguments\";","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" private final int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" private final Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new command to mark the difficulty of a question of specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param qnIndex Index of the question which difficulty is to be marked.","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty to be assigned to the question.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" public CommandMarkDifficulty(int qnIndex, Question.QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.MARKDIFFICULTY);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" assert qnDifficulty !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" if(qnDifficulty !\u003d Question.QnDifficulty.INVALID) {","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" questions.markQuestionDifficulty(qnIndex, qnDifficulty, true);","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":35,"lisizhuang-0121":4}},{"path":"src/main/java/quizhub/command/CommandShortAnswer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" * Represents a command to add a quiz question.","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"public class CommandShortAnswer extends Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" \"short [question]/[answer]/[module]/[difficulty]!\";","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String MISSING_FIELDS_MSG \u003d \" You have one or more field missing!\";","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":" private final String description;","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":" private final String answer;","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" private final String module;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private final Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" * Creates a new question command to add a SHORTANSWER question","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" * @param description Question description","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" * @param answer answer to question","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" * @param module module of question","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDifficulty difficulty of question","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandShortAnswer(String description, String answer, String module,","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.ADD);","lastModifiedDate":"2023-10-05"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" * Adds the SHORTANSWER question and updates storage data.","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" questions.addShortAnswerQn(description, answer, module, qnDifficulty, true);","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":16,"James-Hong-Jey":13,"lisizhuang-0121":20}},{"path":"src/main/java/quizhub/command/CommandShuffle.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"public class CommandShuffle extends Command {","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" public CommandShuffle() {","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.SHUFFLE);","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" questions.shuffleQuestions();","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"spinoandraptos":3,"James-Hong-Jey":12}},{"path":"src/main/java/quizhub/command/CommandStart.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"import java.util.Collections;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"yeo-menghan"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":" * Command to Start the Quiz","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandStart extends Command{","lastModifiedDate":"2023-10-05"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QUIZ_MODE_MSG \u003d \" Ono! You did not indicate mode of the quiz :\u003c \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() + \" Quiz mode must be either \u0027all\u0027 or \u0027module\u0027\";","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_START_DETAILS \u003d \" Ono! You did not indicate start details for the quiz \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" \"mode that you have chosen :\u003c\";","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QN_MODE_MSG \u003d \" Ono! You did not indicate mode of arranging \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" \"quiz questions :\u003c\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_MODE_MSG \u003d \" Question mode must be either \u0027random\u0027 or \u0027normal\u0027\";","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as start \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" \"/[quiz mode] [start details] /[qn mode]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" public static final String TOO_MANY_ARGUMENTS_MSG \u003d \" Ono! There should not be arguments after /[qn mode]\";","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private final String startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final String startDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" private final String startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new start command","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * @param startMode Mode to start the quiz with, indicates how questions for the quiz are selected.","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * @param startDetails Details to complement quiz mode for choosing questions for the quiz.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" * @param startQnMode Mode for arranging the questions within the quiz.","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" public CommandStart(String startMode, String startDetails, String startQnMode) {","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.START);","lastModifiedDate":"2023-10-05"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" this.startMode \u003d startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" this.startDetails \u003d startDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" this.startQnMode \u003d startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":42,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"yeo-menghan"},"content":" * Loop through the array list of questions \u0026 allow the user to answer them.","lastModifiedDate":"2023-10-09"},{"lineNumber":44,"author":{"gitId":"yeo-menghan"},"content":" * If the input given matches EXACTLY (v1.0), then the answer is correct","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"yeo-menghan"},"content":" * returns \"Correct\" or \"Wrong\"","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing question data.","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" assert questions !\u003d null \u0026\u0026 ui !\u003d null \u0026\u0026 dataStorage !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"yeo-menghan"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions;","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" switch (startMode.toLowerCase()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" case \"module\":","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" assert startDetails !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String[] modules \u003d startDetails.split(\" \");","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" matchedQuestions \u003d questions.categoriseListByModule(modules);","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" case \"all\":","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"yeo-menghan"},"content":" matchedQuestions \u003d questions.getAllQns();","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Please enter a valid quiz mode :\u003c\");","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"yeo-menghan"},"content":" switch(startQnMode.toLowerCase()){","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"yeo-menghan"},"content":" case \"random\":","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"yeo-menghan"},"content":" Collections.shuffle(matchedQuestions); // shuffles matched Questions","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"yeo-menghan"},"content":" questions.startQuiz(ui, matchedQuestions);","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yeo-menghan"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yeo-menghan"},"content":" case \"normal\":","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yeo-menghan"},"content":" questions.startQuiz(ui, matchedQuestions);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"yeo-menghan"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yeo-menghan"},"content":" default:","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Please enter a valid quiz mode :\u003c\");","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":84,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":41,"yeo-menghan":28,"James-Hong-Jey":1,"lisizhuang-0121":14}},{"path":"src/main/java/quizhub/exception/QuizHubExceptions.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.exception;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"/**","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":" * Represents non-standard exceptions thrown by this program specifically.","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class QuizHubExceptions extends Exception{","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":" public QuizHubExceptions(String message) {","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":" super(message);","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"lisizhuang-0121":10}},{"path":"src/main/java/quizhub/logger/CustomLogger.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"package quizhub.logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yeo-menghan"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yeo-menghan"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yeo-menghan"},"content":"public class CustomLogger {","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":" private static final Logger logger \u003d Logger.getLogger(CustomLogger.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":" // Log a message at the INFO level","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yeo-menghan"},"content":" public static void info(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.INFO, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yeo-menghan"},"content":" // Log a message at the WARNING level","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yeo-menghan"},"content":" public static void warning(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.WARNING, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yeo-menghan"},"content":" // Log an error message at the SEVERE level","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":" public static void error(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.SEVERE, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" // Log an error message in greater detail","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" public static void fineError(String message) {","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":" logger.log(Level.FINE, message);","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"yeo-menghan"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yeo-menghan":23,"James-Hong-Jey":5}},{"path":"src/main/java/quizhub/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.parser;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandExit;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandInvalid;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandList;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandShortAnswer;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandStart;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandEdit;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandDelete;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandFind;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandShuffle;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandMarkDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandHelp;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Represents a parser that converts user inputs into command objects.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"public class Parser {","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" * Analyses and extracts relevant information from user input","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" * to create a new Command object of the right type.","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput The full user CLI input.","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" public static Command parseCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" String[] commandTokens \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" if (commandTokens.length \u003d\u003d 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" String commandTitle \u003d commandTokens[0];","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" switch (commandTitle) {","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" case \"bye\":","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" return new CommandExit();","lastModifiedDate":"2023-10-04"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" case \"list\":","lastModifiedDate":"2023-10-04"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" return new CommandList();","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":" case \"short\":","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" return parseShortAnswerCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" case \"start\":","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" return parseStartCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" case \"edit\":","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" return parseEditCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" case \"delete\":","lastModifiedDate":"2023-10-04"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" return parseDeleteCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" case \"find\":","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"lisizhuang-0121"},"content":" return parseFindCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" case \"shuffle\":","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"James-Hong-Jey"},"content":" return new CommandShuffle();","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" case \"markdiff\":","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"lisizhuang-0121"},"content":" return parseMarkDiffCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" case \"help\":","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" return new CommandHelp();","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-04"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":62,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (NumberFormatException | ArrayIndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (Exception error) {","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Extracts relevant information after a specified keyword","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * from CLI user input.","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput The full user CLI input.","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" * @param keyWord The keyword used to partition the user input.","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" public static String getContentAfterKeyword(String userInput, String keyWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":" throws ArrayIndexOutOfBoundsException {","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String content;","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" content \u003d userInput.split(keyWord)[1].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" if (content.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" throw new ArrayIndexOutOfBoundsException();","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" return content;","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * Extracts difficulty from user command to assign to a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * Default invalid difficulty is assigned if invalid difficulty given.","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" * @param difficulty The difficulty level defined by user in CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" public static Question.QnDifficulty extractQuestionDifficulty(String difficulty) {","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" switch (difficulty.toLowerCase()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" case \"easy\":","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.EASY;","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" case \"hard\":","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.HARD;","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" case \"normal\":","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(Ui.INVALID_QUESTION_DIFFICULTY_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.INVALID;","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Short Answer Command","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Short Answer command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseShortAnswerCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"lisizhuang-0121"},"content":" String[] inputTokens \u003d userInput.split(\"short\")[1].strip().split(\"/\");","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"lisizhuang-0121"},"content":" String description \u003d inputTokens[0].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"lisizhuang-0121"},"content":" String answer \u003d inputTokens[1].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"lisizhuang-0121"},"content":" String module \u003d inputTokens[2].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"lisizhuang-0121"},"content":" String difficulty \u003d inputTokens[3].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"lisizhuang-0121"},"content":" if (description.isEmpty() || answer.isEmpty() || module.isEmpty() || difficulty.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandShortAnswer.MISSING_FIELDS_MSG +","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"lisizhuang-0121"},"content":" System.lineSeparator() + CommandShortAnswer.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty \u003d extractQuestionDifficulty(difficulty);","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandShortAnswer(description, answer, module, qnDifficulty);","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandShortAnswer.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Delete Command","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":130,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":131,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Delete command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseDeleteCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"lisizhuang-0121"},"content":" int qnIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"lisizhuang-0121"},"content":" String[] editDetails;","lastModifiedDate":"2023-10-25"},{"lineNumber":136,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"lisizhuang-0121"},"content":" editDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":138,"author":{"gitId":"lisizhuang-0121"},"content":" qnIndex \u003d Integer.parseInt(editDetails[1].strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":139,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandDelete(qnIndex);","lastModifiedDate":"2023-10-25"},{"lineNumber":140,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandDelete.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":147,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":148,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":149,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Find Command","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Find command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseFindCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"lisizhuang-0121"},"content":" String searchCriteria;","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"lisizhuang-0121"},"content":" String searchKeyword;","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"lisizhuang-0121"},"content":" searchCriteria \u003d userInput.split(\"/\")[1].strip().split(\" \")[0].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandFind.MISSING_CRITERIA_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"lisizhuang-0121"},"content":" try{","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"lisizhuang-0121"},"content":" searchKeyword \u003d userInput.split(\"/\" + searchCriteria)[1].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandFind.MISSING_KEYWORD_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandFind(searchCriteria, searchKeyword);","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"James-Hong-Jey"},"content":" * Attempt to parse user input into an Edit Command","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Edit command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseEditCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"StevenGX12"},"content":" String[] editDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"StevenGX12"},"content":" String editCriteria;","lastModifiedDate":"2023-10-26"},{"lineNumber":182,"author":{"gitId":"StevenGX12"},"content":" int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":183,"author":{"gitId":"StevenGX12"},"content":" String newDescription \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":184,"author":{"gitId":"StevenGX12"},"content":" String newAnswer \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":185,"author":{"gitId":"StevenGX12"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":186,"author":{"gitId":"StevenGX12"},"content":" editDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":187,"author":{"gitId":"StevenGX12"},"content":" qnIndex \u003d Integer.parseInt(editDetails[1].strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"StevenGX12"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":190,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":194,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"StevenGX12"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"StevenGX12"},"content":" editCriteria \u003d editDetails[2].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":198,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_CRITERIA_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"StevenGX12"},"content":" try{","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"StevenGX12"},"content":" switch (editCriteria){","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"StevenGX12"},"content":" case \"/description\":","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"StevenGX12"},"content":" newDescription \u003d Parser.getContentAfterKeyword(userInput, \"/description\");","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"StevenGX12"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"StevenGX12"},"content":" case \"/answer\":","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"StevenGX12"},"content":" newAnswer \u003d Parser.getContentAfterKeyword(userInput, \"/answer\");","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"StevenGX12"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"StevenGX12"},"content":" default:","lastModifiedDate":"2023-10-26"},{"lineNumber":210,"author":{"gitId":"StevenGX12"},"content":" throw new ArrayIndexOutOfBoundsException();","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_KEYWORD_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"StevenGX12"},"content":" return new CommandEdit(qnIndex, newDescription, newAnswer);","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":218,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":219,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":220,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Start Quiz Command","lastModifiedDate":"2023-10-25"},{"lineNumber":221,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":222,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Start Quiz command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":224,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":225,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseStartCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":226,"author":{"gitId":"spinoandraptos"},"content":" String startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"spinoandraptos"},"content":" String startDetails \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"spinoandraptos"},"content":" String startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"spinoandraptos"},"content":" String[] commandDetails \u003d userInput.split(\"/\");","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"spinoandraptos"},"content":" String startInfo;","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"spinoandraptos"},"content":" startInfo \u003d commandDetails[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"spinoandraptos"},"content":" startMode \u003d startInfo.split(\" \")[0].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QUIZ_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":236,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":238,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":239,"author":{"gitId":"spinoandraptos"},"content":" if(!startMode.equalsIgnoreCase(\"all\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":240,"author":{"gitId":"spinoandraptos"},"content":" startDetails \u003d startInfo.split(startMode)[1].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":241,"author":{"gitId":"spinoandraptos"},"content":" if(startDetails.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":242,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_START_DETAILS + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":243,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":244,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_START_DETAILS + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":248,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":249,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"spinoandraptos"},"content":" // Reads in /random or /normal","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"spinoandraptos"},"content":" startQnMode \u003d commandDetails[2].split(\" \")[0].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"spinoandraptos"},"content":" if (startQnMode.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QN_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":255,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":256,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"spinoandraptos"},"content":" if (!startQnMode.equals(\"random\") \u0026\u0026 !startQnMode.equals(\"normal\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"spinoandraptos"},"content":" throw new IllegalArgumentException(CommandStart.INVALID_MODE_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"spinoandraptos"},"content":" if(commandDetails[2].split(\" \").length !\u003d 1){","lastModifiedDate":"2023-10-27"},{"lineNumber":261,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.TOO_MANY_ARGUMENTS_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":262,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":263,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(e.getMessage() + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-27"},{"lineNumber":268,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QN_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":269,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":270,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"spinoandraptos"},"content":" return new CommandStart(startMode, startDetails, startQnMode);","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":273,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":274,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":275,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Mark Difficulty Command","lastModifiedDate":"2023-10-25"},{"lineNumber":276,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":277,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":278,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Mark Difficulty command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":279,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":280,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseMarkDiffCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":281,"author":{"gitId":"spinoandraptos"},"content":" String[] commandDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"spinoandraptos"},"content":" int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"spinoandraptos"},"content":" Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"spinoandraptos"},"content":" String qnIndexString;","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"spinoandraptos"},"content":" String qnDifficultyString;","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"spinoandraptos"},"content":" qnIndexString \u003d commandDetails[1].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"spinoandraptos"},"content":" CommandMarkDifficulty.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"spinoandraptos"},"content":" qnIndex \u003d Integer.parseInt(qnIndexString);","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"spinoandraptos"},"content":" if(qnIndex \u003c 0){","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":296,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"spinoandraptos"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":298,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":299,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"spinoandraptos"},"content":" qnDifficultyString \u003d commandDetails[2].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.MISSING_DIFFICULTY_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"spinoandraptos"},"content":" if(commandDetails.length !\u003d 3){","lastModifiedDate":"2023-10-27"},{"lineNumber":306,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.TOO_MANY_ARGUMENTS_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":307,"author":{"gitId":"spinoandraptos"},"content":" CommandMarkDifficulty.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":308,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":309,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d Parser.extractQuestionDifficulty(qnDifficultyString);","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"spinoandraptos"},"content":" return new CommandMarkDifficulty(qnIndex, qnDifficulty);","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":312,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":143,"StevenGX12":36,"James-Hong-Jey":20,"lisizhuang-0121":113}},{"path":"src/main/java/quizhub/question/Question.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.question;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents all questions in the question list in general.","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class Question {","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":" public enum QnType {SHORTANSWER, DEFAULT};","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" public enum QnDifficulty {EASY, HARD, NORMAL, INVALID};","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" private QnType qnType;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" private QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" private String description;","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" private boolean done;","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":" private String module;","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a blank description,","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" * not done status, default question type and normal difficulty..","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" public Question(){","lastModifiedDate":"2023-10-05"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" description \u003d \"\";","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" qnType \u003d QnType.DEFAULT;","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * not done status, default task type and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":" public Question(String questionBody){","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" qnType \u003d QnType.DEFAULT;","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" * not done status, given question type and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType){","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" * not done status, given question type, and given module and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":" * @param module Module given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType, String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"StevenGX12"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"StevenGX12"},"content":" done \u003d false;","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"StevenGX12"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"StevenGX12"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" * not done status. given question type, given module,","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * and given difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" * @param module Module given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty level assigned to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType, String module, QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" * Mark a question as done.","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" public void markAsDone(){","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" done \u003d true;","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" * Mark a question as not done.","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" public void markAsNotDone(){","lastModifiedDate":"2023-10-21"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" * Checks if a question has been done.","lastModifiedDate":"2023-10-08"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" public boolean questionIsDone(){","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" return done;","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" * Returns question description.","lastModifiedDate":"2023-10-08"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionDescription(){","lastModifiedDate":"2023-10-08"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" return description;","lastModifiedDate":"2023-10-04"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" * Returns question timing details.","lastModifiedDate":"2023-10-08"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":115,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionTiming(boolean useDefaultTiming){","lastModifiedDate":"2023-10-08"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-04"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" * Returns task type.","lastModifiedDate":"2023-10-04"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" public QnType getQuestionType(){","lastModifiedDate":"2023-10-21"},{"lineNumber":122,"author":{"gitId":"James-Hong-Jey"},"content":" return qnType;","lastModifiedDate":"2023-10-08"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":" * Returns module.","lastModifiedDate":"2023-10-21"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" public String getModule(){","lastModifiedDate":"2023-10-21"},{"lineNumber":129,"author":{"gitId":"StevenGX12"},"content":" return module;","lastModifiedDate":"2023-10-21"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":132,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":133,"author":{"gitId":"StevenGX12"},"content":" * Returns question details in a string.","lastModifiedDate":"2023-10-21"},{"lineNumber":134,"author":{"gitId":"StevenGX12"},"content":" * @param newDescription New description of the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":135,"author":{"gitId":"StevenGX12"},"content":" * @param newAnswer New answer of the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":136,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestion(String newDescription, String newAnswer){","lastModifiedDate":"2023-10-08"},{"lineNumber":138,"author":{"gitId":"StevenGX12"},"content":" if(!newDescription.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" this.description \u003d newDescription;","lastModifiedDate":"2023-10-08"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" * Returns question details in a string.","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty New difficulty level of the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" public void markDifficulty (QnDifficulty qnDifficulty) {","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" * Returns question difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" public QnDifficulty getDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" return qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":111,"StevenGX12":33,"James-Hong-Jey":8,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/question/ShortAnsQn.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.question;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents Short Answer Questions. This means answers are a simple string.","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class ShortAnsQn extends Question {","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":" private String answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question of type SHORTANSWER with specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * @param description Question description.","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * @param answer Question answer.","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" * @param module Question module.","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":" public ShortAnsQn(String description, String answer, String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" super(description, QnType.SHORTANSWER, module);","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question of type SHORTANSWER with specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param description Question description.","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param answer Question answer.","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param module Question module.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Question difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" public ShortAnsQn(String description, String answer, String module, QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" super(description, QnType.SHORTANSWER, module, qnDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * Returns question answer.","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionAnswer() {","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"James-Hong-Jey"},"content":" return this.answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestion(String newDescription, String newAnswer) {","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" super.editQuestion(newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"StevenGX12"},"content":" if(!newAnswer.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" this.answer \u003d newAnswer;","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" * Returns question-answer pair, separated by a vertical bar.","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" public String getQuestionDescription() {","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" return super.getQuestionDescription().strip() + \" / \" + this.answer.strip() + \" | \" + super.getModule()","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" + \" | \" + super.getDifficulty().toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":43,"StevenGX12":2,"James-Hong-Jey":5,"lisizhuang-0121":2}},{"path":"src/main/java/quizhub/questionlist/QuestionList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.questionlist;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.ShortAnsQn;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.exception.QuizHubExceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import java.util.Collections;","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"StevenGX12"},"content":"import java.util.InputMismatchException;","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" * Represents the list of questions currently registered in Quizhub.","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" * This list is created on program start and disposed on program termination.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":"public class QuestionList {","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private ArrayList\u003cQuestion\u003e allQns; //array of inputs","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new empty question list.","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" public QuestionList(){","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" allQns \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" * Adds a short answer question to the current question list.","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" * @param description The Question Description","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" * @param answer The answer of the Question","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" * @param module The module of the Question","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDifficulty The difficulty level of the questions","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":" * @param showMessage If true, program will print response message on CLI after question is added.","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" public void addShortAnswerQn(String description, String answer, String module,","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty, boolean showMessage){","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" allQns.add(new ShortAnsQn(description, answer, module, qnDifficulty));","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" if (showMessage) {","lastModifiedDate":"2023-10-08"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" I have added the following question OwO:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S] %s\\n\", viewQuestionByIndex(getQuestionListSize()));","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":41,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints the details of a question in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"James-Hong-Jey"},"content":" * @param question The question in which details are to be printed.","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" * @param asList If true, prints out the index of the question in the question list","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"James-Hong-Jey"},"content":" * in addition to the details of the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"James-Hong-Jey"},"content":" public void printQuestion(Question question, boolean asList){","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"James-Hong-Jey"},"content":" int qnIndex \u003d allQns.indexOf(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":51,"author":{"gitId":"James-Hong-Jey"},"content":" switch(question.getQuestionType()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"James-Hong-Jey"},"content":" if (question.questionIsDone()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"James-Hong-Jey"},"content":" if (asList) {","lastModifiedDate":"2023-10-08"},{"lineNumber":55,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" %d: [S][X] %s\\n\", qnIndex + 1, question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":56,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S][X] %s\\n\", question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":59,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":60,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":61,"author":{"gitId":"James-Hong-Jey"},"content":" if (asList) {","lastModifiedDate":"2023-10-08"},{"lineNumber":62,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" %d: [S][] %s\\n\", qnIndex + 1, question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":63,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":64,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S][] %s\\n\", question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":65,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":66,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":67,"author":{"gitId":"James-Hong-Jey"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":71,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":72,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":73,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints all the questions in the current question list as an indexed list.","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" public void printQuestionList(){","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No questions found! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"James-Hong-Jey"},"content":" * Mark a question in the current question list as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be marked as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"James-Hong-Jey"},"content":" * @param showMessage If true, program will print response message on CLI","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"James-Hong-Jey"},"content":" * after question is marked as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":91,"author":{"gitId":"James-Hong-Jey"},"content":" public void markQuestionAsDone (int index, boolean showMessage){","lastModifiedDate":"2023-10-08"},{"lineNumber":92,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":93,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" if(!question.questionIsDone()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" question.markAsDone();","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" if (showMessage) {","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have marked the following question as done \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":98,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":99,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question originally done! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":105,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":106,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":107,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":108,"author":{"gitId":"James-Hong-Jey"},"content":" * Mark a question in the current question list as not done.","lastModifiedDate":"2023-10-08"},{"lineNumber":109,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":110,"author":{"gitId":"James-Hong-Jey"},"content":" public void markQuestionAsNotDone(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":111,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" if(question.questionIsDone()){","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" question.markAsNotDone();","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have unmarked the following question as done \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":116,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question originally not done! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" * Mark the difficulty of a question in the current question list.","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" * @param index The list index of the question to be marked.","lastModifiedDate":"2023-10-22"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty to be assigned to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" * @param showMessage If true, program will print response message on CLI","lastModifiedDate":"2023-10-22"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":" * after question difficulty is marked.","lastModifiedDate":"2023-10-22"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" public void markQuestionDifficulty(int index, Question.QnDifficulty qnDifficulty, boolean showMessage){","lastModifiedDate":"2023-10-22"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" String difficulty \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":" switch (qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" case EASY:","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"easy\";","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" case HARD:","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"hard\";","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" case NORMAL:","lastModifiedDate":"2023-10-22"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"normal\";","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" if(question.getDifficulty() !\u003d qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" allQns.get(index-1).markDifficulty(qnDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" if(showMessage) {","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Roger that! I have marked the following question as \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" difficulty +","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" \" \u003ew\u003c !\");","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question is already set as \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" difficulty +","lastModifiedDate":"2023-10-22"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":" \" ! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":162,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":164,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":165,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":166,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":167,"author":{"gitId":"James-Hong-Jey"},"content":" * Delete a question from the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":168,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":169,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be deleted.","lastModifiedDate":"2023-10-08"},{"lineNumber":170,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":171,"author":{"gitId":"James-Hong-Jey"},"content":" public void deleteQuestionByIndex(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":172,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":173,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":174,"author":{"gitId":"James-Hong-Jey"},"content":" allQns.remove(index - 1);","lastModifiedDate":"2023-10-08"},{"lineNumber":175,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have deleted the following question \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":176,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":177,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":178,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":179,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":180,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":181,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":182,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":183,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns the description and all other details of a question in one String object.","lastModifiedDate":"2023-10-08"},{"lineNumber":184,"author":{"gitId":"James-Hong-Jey"},"content":" * Used to display question details in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":185,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":186,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be viewed.","lastModifiedDate":"2023-10-08"},{"lineNumber":187,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":188,"author":{"gitId":"James-Hong-Jey"},"content":" public String viewQuestionByIndex(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":189,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":190,"author":{"gitId":"James-Hong-Jey"},"content":" switch(allQns.get(index-1).getQuestionType()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":191,"author":{"gitId":"James-Hong-Jey"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-08"},{"lineNumber":192,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns.get(index-1).getQuestionDescription();","lastModifiedDate":"2023-10-08"},{"lineNumber":193,"author":{"gitId":"James-Hong-Jey"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":194,"author":{"gitId":"James-Hong-Jey"},"content":" return \"Question Not Found\";","lastModifiedDate":"2023-10-08"},{"lineNumber":195,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":196,"author":{"gitId":"StevenGX12"},"content":" } catch(InputMismatchException |NullPointerException | IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-21"},{"lineNumber":197,"author":{"gitId":"James-Hong-Jey"},"content":" return \"Question Not Found\";","lastModifiedDate":"2023-10-08"},{"lineNumber":198,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":199,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":200,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":201,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":202,"author":{"gitId":"spinoandraptos"},"content":" * Delete a question from the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":203,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":204,"author":{"gitId":"spinoandraptos"},"content":" * @param index The list index of the question to be deleted.","lastModifiedDate":"2023-10-08"},{"lineNumber":205,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":206,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestionByIndex(int index, String newDescription, String newAnswer){","lastModifiedDate":"2023-10-08"},{"lineNumber":207,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":208,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":" question.editQuestion(newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":210,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Roger that! I have edited the following question \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":211,"author":{"gitId":"spinoandraptos"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":212,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":213,"author":{"gitId":"spinoandraptos"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":214,"author":{"gitId":"spinoandraptos"},"content":" if(index !\u003d 0){","lastModifiedDate":"2023-10-08"},{"lineNumber":215,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":216,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":217,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":218,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":219,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":220,"author":{"gitId":"James-Hong-Jey"},"content":" * Search for questions in the current question list using their description.","lastModifiedDate":"2023-10-08"},{"lineNumber":221,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":222,"author":{"gitId":"James-Hong-Jey"},"content":" * @param keyword Description keyword(s) used to search for matches.","lastModifiedDate":"2023-10-08"},{"lineNumber":223,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":224,"author":{"gitId":"James-Hong-Jey"},"content":" public void searchListByDescription(String keyword){","lastModifiedDate":"2023-10-08"},{"lineNumber":225,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-08"},{"lineNumber":226,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":227,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":228,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":229,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":230,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":231,"author":{"gitId":"StevenGX12"},"content":" if(question.getQuestionDescription().toLowerCase().contains(keyword.toLowerCase())){","lastModifiedDate":"2023-10-21"},{"lineNumber":232,"author":{"gitId":"James-Hong-Jey"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":233,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":234,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":235,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":236,"author":{"gitId":"James-Hong-Jey"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":237,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No results found :\u003c Check your keyword is correct?\");","lastModifiedDate":"2023-10-08"},{"lineNumber":238,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":239,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":240,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":241,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":242,"author":{"gitId":"James-Hong-Jey"},"content":" * Search for questions in the current question list using their date and time.","lastModifiedDate":"2023-10-08"},{"lineNumber":243,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":244,"author":{"gitId":"James-Hong-Jey"},"content":" * @param dateTime Date and time used to search for matches.","lastModifiedDate":"2023-10-08"},{"lineNumber":245,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":246,"author":{"gitId":"James-Hong-Jey"},"content":" public void searchListByTime(String dateTime){","lastModifiedDate":"2023-10-08"},{"lineNumber":247,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-08"},{"lineNumber":248,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":249,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":250,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":251,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":252,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":253,"author":{"gitId":"James-Hong-Jey"},"content":" if(question.getQuestionTiming(true).contains(dateTime)){","lastModifiedDate":"2023-10-08"},{"lineNumber":254,"author":{"gitId":"James-Hong-Jey"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":255,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":256,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":257,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":258,"author":{"gitId":"James-Hong-Jey"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":259,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No results found :\u003c Check your time format is in dd-MM-yyyy HH:mm?\");","lastModifiedDate":"2023-10-08"},{"lineNumber":260,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":261,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":262,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":263,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":264,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":265,"author":{"gitId":"StevenGX12"},"content":" * Search for questions in the current question list using their module.","lastModifiedDate":"2023-10-21"},{"lineNumber":266,"author":{"gitId":"StevenGX12"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":267,"author":{"gitId":"StevenGX12"},"content":" * @param module Module used to search for matches.","lastModifiedDate":"2023-10-21"},{"lineNumber":268,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":269,"author":{"gitId":"StevenGX12"},"content":" public void searchListByModule(String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":270,"author":{"gitId":"StevenGX12"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-21"},{"lineNumber":271,"author":{"gitId":"StevenGX12"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-21"},{"lineNumber":272,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-21"},{"lineNumber":273,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":274,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-21"},{"lineNumber":275,"author":{"gitId":"StevenGX12"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-21"},{"lineNumber":276,"author":{"gitId":"StevenGX12"},"content":" if(question.getModule().toLowerCase().contains(module.toLowerCase())){","lastModifiedDate":"2023-10-21"},{"lineNumber":277,"author":{"gitId":"StevenGX12"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-21"},{"lineNumber":278,"author":{"gitId":"StevenGX12"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-21"},{"lineNumber":279,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":280,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":281,"author":{"gitId":"StevenGX12"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-21"},{"lineNumber":282,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" No results found :\u003c Check your module is correct?\");","lastModifiedDate":"2023-10-21"},{"lineNumber":283,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":284,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":285,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":286,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":287,"author":{"gitId":"spinoandraptos"},"content":" * Build a new list of questions based on specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":288,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":289,"author":{"gitId":"spinoandraptos"},"content":" * @param modules Modules used to search for matches.","lastModifiedDate":"2023-10-27"},{"lineNumber":290,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":291,"author":{"gitId":"spinoandraptos"},"content":" public ArrayList\u003cQuestion\u003e categoriseListByModule(String[] modules){","lastModifiedDate":"2023-10-27"},{"lineNumber":292,"author":{"gitId":"spinoandraptos"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":293,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":294,"author":{"gitId":"spinoandraptos"},"content":" if (allQns.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":295,"author":{"gitId":"spinoandraptos"},"content":" throw new QuizHubExceptions(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-22"},{"lineNumber":296,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":297,"author":{"gitId":"spinoandraptos"},"content":" for (String module : modules) {","lastModifiedDate":"2023-10-27"},{"lineNumber":298,"author":{"gitId":"spinoandraptos"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-22"},{"lineNumber":299,"author":{"gitId":"spinoandraptos"},"content":" if (question.getModule().toLowerCase().matches(module.toLowerCase())) {","lastModifiedDate":"2023-10-22"},{"lineNumber":300,"author":{"gitId":"spinoandraptos"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-22"},{"lineNumber":301,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":302,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":303,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":304,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":305,"author":{"gitId":"spinoandraptos"},"content":" } catch (QuizHubExceptions emptyList){","lastModifiedDate":"2023-10-22"},{"lineNumber":306,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(emptyList.getMessage());","lastModifiedDate":"2023-10-22"},{"lineNumber":307,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":308,"author":{"gitId":"spinoandraptos"},"content":" return matchedQuestions;","lastModifiedDate":"2023-10-22"},{"lineNumber":309,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":310,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":311,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns the size of current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":312,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":313,"author":{"gitId":"James-Hong-Jey"},"content":" public int getQuestionListSize(){","lastModifiedDate":"2023-10-08"},{"lineNumber":314,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns.size();","lastModifiedDate":"2023-10-08"},{"lineNumber":315,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":316,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":317,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns a list of all questions in the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":318,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":319,"author":{"gitId":"James-Hong-Jey"},"content":" public ArrayList\u003cQuestion\u003e getAllQns(){","lastModifiedDate":"2023-10-08"},{"lineNumber":320,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns;","lastModifiedDate":"2023-10-08"},{"lineNumber":321,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":322,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":323,"author":{"gitId":"James-Hong-Jey"},"content":" * Shuffles the order of questions in the deck","lastModifiedDate":"2023-10-21"},{"lineNumber":324,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":325,"author":{"gitId":"James-Hong-Jey"},"content":" public void shuffleQuestions() {","lastModifiedDate":"2023-10-21"},{"lineNumber":326,"author":{"gitId":"James-Hong-Jey"},"content":" Collections.shuffle(allQns);","lastModifiedDate":"2023-10-21"},{"lineNumber":327,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":328,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":329,"author":{"gitId":"yeo-menghan"},"content":" * Retrieves the answer for a question by its index in the question list.","lastModifiedDate":"2023-10-09"},{"lineNumber":330,"author":{"gitId":"yeo-menghan"},"content":" * @param index The index of the question in the list.","lastModifiedDate":"2023-10-09"},{"lineNumber":331,"author":{"gitId":"yeo-menghan"},"content":" * @return The answer to the question, or null if the index is invalid or the question is of a different type.","lastModifiedDate":"2023-10-09"},{"lineNumber":332,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":333,"author":{"gitId":"spinoandraptos"},"content":" public String getAnswerByIndex(int index, ArrayList\u003cQuestion\u003e questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":334,"author":{"gitId":"yeo-menghan"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":335,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d questions.get(index - 1);","lastModifiedDate":"2023-10-22"},{"lineNumber":336,"author":{"gitId":"yeo-menghan"},"content":" if (question instanceof ShortAnsQn) {","lastModifiedDate":"2023-10-09"},{"lineNumber":337,"author":{"gitId":"yeo-menghan"},"content":" return ((ShortAnsQn) question).getQuestionAnswer();","lastModifiedDate":"2023-10-09"},{"lineNumber":338,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":339,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" This question is not a Short Answer question.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":340,"author":{"gitId":"yeo-menghan"},"content":" return null;","lastModifiedDate":"2023-10-09"},{"lineNumber":341,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":342,"author":{"gitId":"yeo-menghan"},"content":" } catch (IndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-09"},{"lineNumber":343,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Ono! Please enter a valid question number *sobs*\");","lastModifiedDate":"2023-10-09"},{"lineNumber":344,"author":{"gitId":"yeo-menghan"},"content":" return null;","lastModifiedDate":"2023-10-09"},{"lineNumber":345,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":346,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":347,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":348,"author":{"gitId":"yeo-menghan"},"content":" * Retrieves the question by its index in the question list.","lastModifiedDate":"2023-10-16"},{"lineNumber":349,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":350,"author":{"gitId":"yeo-menghan"},"content":" * @param index The index of the question in the list.","lastModifiedDate":"2023-10-16"},{"lineNumber":351,"author":{"gitId":"yeo-menghan"},"content":" * @return The question, or null if the index is invalid or the question is of a different type.","lastModifiedDate":"2023-10-16"},{"lineNumber":352,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":353,"author":{"gitId":"yeo-menghan"},"content":" public String getQuestionTextByIndex(int index) {","lastModifiedDate":"2023-10-16"},{"lineNumber":354,"author":{"gitId":"yeo-menghan"},"content":" if (index \u003e\u003d 0 \u0026\u0026 index \u003c allQns.size()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":355,"author":{"gitId":"yeo-menghan"},"content":" Question question \u003d allQns.get(index);","lastModifiedDate":"2023-10-16"},{"lineNumber":356,"author":{"gitId":"yeo-menghan"},"content":" return question.toString(); // Use the toString() method to get the text of the question","lastModifiedDate":"2023-10-16"},{"lineNumber":357,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":358,"author":{"gitId":"yeo-menghan"},"content":" return null; // Handle invalid index","lastModifiedDate":"2023-10-16"},{"lineNumber":359,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":360,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":361,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":362,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":363,"author":{"gitId":"yeo-menghan"},"content":" * Starts a quiz session using the provided user interface (UI).","lastModifiedDate":"2023-10-09"},{"lineNumber":364,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":365,"author":{"gitId":"yeo-menghan"},"content":" * @param ui The user interface to interact with the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":366,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":367,"author":{"gitId":"spinoandraptos"},"content":" public void startQuiz(Ui ui, ArrayList\u003cQuestion\u003e questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":368,"author":{"gitId":"spinoandraptos"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":369,"author":{"gitId":"yeo-menghan"},"content":" ui.displayMessage(\" No questions found! Add questions before starting the quiz.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":370,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-09"},{"lineNumber":371,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":372,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":373,"author":{"gitId":"yeo-menghan"},"content":" ui.displayMessage(\" Starting the quiz...\");","lastModifiedDate":"2023-10-17"},{"lineNumber":374,"author":{"gitId":"spinoandraptos"},"content":" int totalQuestions \u003d questions.size();","lastModifiedDate":"2023-10-22"},{"lineNumber":375,"author":{"gitId":"yeo-menghan"},"content":" int correctAnswers \u003d 0;","lastModifiedDate":"2023-10-09"},{"lineNumber":376,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":377,"author":{"gitId":"yeo-menghan"},"content":" for (int i \u003d 0; i \u003c totalQuestions; i++) {","lastModifiedDate":"2023-10-09"},{"lineNumber":378,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d questions.get(i);","lastModifiedDate":"2023-10-22"},{"lineNumber":379,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":380,"author":{"gitId":"yeo-menghan"},"content":" ui.displayQuestion(question, i + 1, totalQuestions);","lastModifiedDate":"2023-10-09"},{"lineNumber":381,"author":{"gitId":"spinoandraptos"},"content":" String correctAnswer \u003d getAnswerByIndex(i + 1, questions).strip(); // Get correct answer by index","lastModifiedDate":"2023-10-22"},{"lineNumber":382,"author":{"gitId":"lisizhuang-0121"},"content":" String userAnswer \u003d ui.getUserInput().strip();","lastModifiedDate":"2023-10-17"},{"lineNumber":383,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":384,"author":{"gitId":"yeo-menghan"},"content":" if (userAnswer.equalsIgnoreCase(correctAnswer)) {","lastModifiedDate":"2023-10-09"},{"lineNumber":385,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Correct!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":386,"author":{"gitId":"yeo-menghan"},"content":" correctAnswers++;","lastModifiedDate":"2023-10-09"},{"lineNumber":387,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":388,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Wrong!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":389,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":390,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":391,"author":{"gitId":"yeo-menghan"},"content":" int questionsLeft \u003d totalQuestions - (i + 1);","lastModifiedDate":"2023-10-09"},{"lineNumber":392,"author":{"gitId":"yeo-menghan"},"content":" if (questionsLeft \u003e 0) {","lastModifiedDate":"2023-10-09"},{"lineNumber":393,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Questions left: \" + questionsLeft);","lastModifiedDate":"2023-10-27"},{"lineNumber":394,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":395,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Quiz completed!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":396,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":397,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":398,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Your score: \" + correctAnswers + \"/\" + totalQuestions);","lastModifiedDate":"2023-10-27"},{"lineNumber":399,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":400,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"spinoandraptos":121,"StevenGX12":25,"James-Hong-Jey":184,"yeo-menghan":59,"lisizhuang-0121":11}},{"path":"src/main/java/quizhub/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import java.io.File;","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" * Represents the hard disk storage where","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" * question data is stored, read and updated.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"public class Storage {","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" private File dataFile;","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" * Creates a new storage for storing question data.","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath The file location in hard disk where data is stored and read from.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" public Storage(String filePath) {","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" dataFile \u003d new File(filePath);","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Write in new data to storage.","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath The file location in hard disk where data is written to.","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param textToAdd Data to be written.","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * @param toAppend If true, new data is added to the back of existing data instead of overwriting them.","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" private void writeToFile(String filePath, String textToAdd, boolean toAppend) throws IOException {","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" FileWriter fileWriter \u003d new FileWriter(filePath, toAppend);","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" fileWriter.write(textToAdd);","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" fileWriter.close();","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" * Adds a question from storage into question list being built.","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" * @param questions The question list to be built.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnType Type of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDescription Description of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDoneStatus Done status of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" * @param difficulty Difficulty of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnModule Module of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" private int addQuestionFromFile(QuestionList questions, String qnType, String qnDescription,","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" String qnDoneStatus, Question.QnDifficulty difficulty,","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" String qnModule) {","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":" switch (qnType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" case \"S\":","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"lisizhuang-0121"},"content":" // Split the description by \"/\" and check for empty fields","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"lisizhuang-0121"},"content":" String[] qnTokens \u003d qnDescription.split(\"/\");","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"lisizhuang-0121"},"content":" if (qnTokens[0].isEmpty() || qnTokens[1].isEmpty() || qnModule.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"lisizhuang-0121"},"content":" questions.addShortAnswerQn(qnTokens[0], qnTokens[1], qnModule, difficulty, false);","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"lisizhuang-0121"},"content":" if (qnDoneStatus.equals(\"done\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"lisizhuang-0121"},"content":" questions.markQuestionAsDone(questions.getQuestionListSize(), false);","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" return 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"lisizhuang-0121"},"content":" * Parse raw questions read from the question file and store them in the questionList","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"lisizhuang-0121"},"content":" * Used at start of program to load all questions from the file","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" * @param rawQuestions the arrayList of question strings to be parsed","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" * @param questions the questionList object for string parsed questions","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"lisizhuang-0121"},"content":" private void parseQuestionsFromStrings(ArrayList\u003cString\u003e rawQuestions, QuestionList questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"lisizhuang-0121"},"content":" int failedQuestions \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" for (int i \u003d 1; i \u003c rawQuestions.size(); i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"lisizhuang-0121"},"content":" String currentQuestion \u003d rawQuestions.get(i);","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"lisizhuang-0121"},"content":" String[] questionSubStrings \u003d currentQuestion.split(\"\\\\|\");","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"lisizhuang-0121"},"content":" String questionType \u003d questionSubStrings[0].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDoneStatus \u003d questionSubStrings[1].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDescription \u003d questionSubStrings[2].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"lisizhuang-0121"},"content":" String questionModule \u003d questionSubStrings[3].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDifficulty \u003d questionSubStrings[4].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty difficulty \u003d Parser.extractQuestionDifficulty(questionDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"lisizhuang-0121"},"content":" failedQuestions +\u003d addQuestionFromFile(questions, questionType, questionDescription,","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" questionDoneStatus, difficulty, questionModule);","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" failedQuestions++;","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(\" \" + failedQuestions + \" questions parsed unsuccessfully from storage file\\n\");","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":98,"author":{"gitId":"James-Hong-Jey"},"content":" * Build a new question list from data stored in hard disk.","lastModifiedDate":"2023-10-08"},{"lineNumber":99,"author":{"gitId":"James-Hong-Jey"},"content":" * Used at program start to build the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":101,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list to be built.","lastModifiedDate":"2023-10-08"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" public void buildCurrentListFromFile(QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" if (dataFile.createNewFile()) {","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question-list created: \" + dataFile.getName());","lastModifiedDate":"2023-10-08"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":111,"author":{"gitId":"James-Hong-Jey"},"content":" int questionIndex \u003d 0;","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" Scanner fileScanner \u003d new Scanner(dataFile);","lastModifiedDate":"2023-10-04"},{"lineNumber":114,"author":{"gitId":"lisizhuang-0121"},"content":" // Pipe all lines into string arrayList for processing","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"lisizhuang-0121"},"content":" ArrayList\u003cString\u003e rawQuestions \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" while (fileScanner.hasNext()) {","lastModifiedDate":"2023-10-04"},{"lineNumber":117,"author":{"gitId":"lisizhuang-0121"},"content":" String rawQuestion \u003d fileScanner.nextLine();","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"lisizhuang-0121"},"content":" rawQuestions.add(rawQuestion);","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"lisizhuang-0121"},"content":" if (rawQuestions.size() \u003c\u003d 1) {","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":123,"author":{"gitId":"lisizhuang-0121"},"content":" parseQuestionsFromStrings(rawQuestions, questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"James-Hong-Jey"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":129,"author":{"gitId":"James-Hong-Jey"},"content":" * Build a new question list from data stored in hard disk.","lastModifiedDate":"2023-10-08"},{"lineNumber":130,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints out the questions in the list in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":132,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list that has been built.","lastModifiedDate":"2023-10-08"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":134,"author":{"gitId":"James-Hong-Jey"},"content":" public void loadData(QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":135,"author":{"gitId":"James-Hong-Jey"},"content":" buildCurrentListFromFile(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":136,"author":{"gitId":"lisizhuang-0121"},"content":" if (questions.getQuestionListSize() \u003d\u003d 0) {","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(\" You currently have no saved questions uWu\");","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" You currently have the following questions uWu\");","lastModifiedDate":"2023-10-08"},{"lineNumber":141,"author":{"gitId":"James-Hong-Jey"},"content":" questions.printQuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" private void storeQuestionToFile(Question question) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" String isDoneString \u003d \"undone\";","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"lisizhuang-0121"},"content":" if (question.questionIsDone()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"lisizhuang-0121"},"content":" isDoneString \u003d \"done\";","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"lisizhuang-0121"},"content":" switch (question.getQuestionType()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"lisizhuang-0121"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"lisizhuang-0121"},"content":" writeToFile(dataFile.getPath(), \"S | \" + isDoneString + \" | \" + question.getQuestionDescription()","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"lisizhuang-0121"},"content":" + System.lineSeparator(), true);","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"lisizhuang-0121"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" * Overwrites all existing data in storage with","lastModifiedDate":"2023-10-04"},{"lineNumber":159,"author":{"gitId":"James-Hong-Jey"},"content":" * the current questions in the question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":160,"author":{"gitId":"James-Hong-Jey"},"content":" * Used after every question change and on program termination.","lastModifiedDate":"2023-10-08"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":162,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list to overwrite current data with.","lastModifiedDate":"2023-10-08"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":164,"author":{"gitId":"James-Hong-Jey"},"content":" public void updateData(QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-04"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" //flush all current records","lastModifiedDate":"2023-10-04"},{"lineNumber":167,"author":{"gitId":"James-Hong-Jey"},"content":" writeToFile(dataFile.getPath(), \"Latest Questions\" + System.lineSeparator(), false);","lastModifiedDate":"2023-10-08"},{"lineNumber":168,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e allQuestions \u003d questions.getAllQns();","lastModifiedDate":"2023-10-08"},{"lineNumber":169,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQuestions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":170,"author":{"gitId":"lisizhuang-0121"},"content":" storeQuestionToFile(question);","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":172,"author":{"gitId":"James-Hong-Jey"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":174,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" ____________________________________________________________\");","lastModifiedDate":"2023-10-04"},{"lineNumber":175,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":176,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":177,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":73,"James-Hong-Jey":26,"lisizhuang-0121":78}},{"path":"src/main/java/quizhub/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" * Represents the user interface for CLI displays.","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * Supports CLI interactions with users.","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"public class Ui {","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String INVALID_COMMAND_MSG \u003d \" Please enter a valid command :0\";","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_COMMAND_FEEDBACK \u003d \" Here are the list of commands you can use:\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" \" 1. help - shows the list of commands you can use,\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" \" 2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" \"its answer to the list,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" \" 3. list - shows the list of questions and answers,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" \" 4. delete [question number] - deletes the question and answer at the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" \" 5. find /[description] - displays all questions that contains the the specified description,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" \" 6. find /[module] - displays all questions that belong to the specified module,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" \" 7. edit [question number] /description [description] - edits the description of the question \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" \" 8. edit [question number] /answer [answer] - edits the answer to the question with \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" \"the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" \" 9. start /[quiz mode] [start details] /[qn mode] - \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" \"starts the quiz with option for /module or /all and /random or /normal,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" \" 10. shuffle - shuffle quiz questions to a random order,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" \" 11. markdiff [question number] [question difficulty] - sets the difficulty of question \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" \" 12. bye - exits the program\";","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_INTEGER_INDEX_MSG \u003d \" Please enter valid integer index!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QUESTION_NUMBER_MSG \u003d \" Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_QUESTION_DIFFICULTY_MSG \u003d \" Ono! We only support easy, normal and hard \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" \"difficulty levels\" + System.lineSeparator() + \" No changes will be made to your difficulty level\";","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" private final Scanner input \u003d new Scanner(System.in); // Create a Scanner object","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" private Storage dataStorage;","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" private QuestionList tasks;","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" * Sets up the bridging between the UI and tasks data.","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" * @param tasks A record of all tasks documented that is built on program start and disposed on program exit.","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage The hard disk record of all tasks documented that persists even on program exit.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" public Ui(Storage dataStorage, QuestionList tasks){","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" this.dataStorage \u003d dataStorage;","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" this.tasks \u003d tasks;","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" * Print out separating line in CLI to mark","lastModifiedDate":"2023-10-04"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" * start and end of chatbot replies.","lastModifiedDate":"2023-10-04"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" public void showLine(){","lastModifiedDate":"2023-10-04"},{"lineNumber":68,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" ____________________________________________________________\\n\");","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" * Displays app logo and opening message to welcome users","lastModifiedDate":"2023-10-09"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * on the launch of chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" public void displayOpeningMessage(){","lastModifiedDate":"2023-10-04"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" String logo \u003d \" _______ _________ _______ ______ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" \" ( ___ )|\\\\ /|\\\\__ __// ___ )|\\\\ /||\\\\ /|( ___ \\\\ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" \" | ( ) || ) ( | ) ( \\\\/ ) || ) ( || ) ( || ( ) )\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":" \" | | | || | | | | | / )| (___) || | | || (__/ / \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" \" | | | || | | | | | / / | ___ || | | || __ ( \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" \" | | /\\\\| || | | | | | / / | ( ) || | | || ( \\\\ \\\\ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":" \" | (_\\\\ \\\\ || (___) |___) (___ / (_/\\\\| ) ( || (___) || )___) )\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" \" (____\\\\/_)(_______)\\\\_______/(_______/|/ \\\\|(_______)|/ \\\\___/\";","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" System.out.println(logo);","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Welcome to Quizhub!!!\\n\");","lastModifiedDate":"2023-10-09"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Let the quizzing begin XDD\");","lastModifiedDate":"2023-10-09"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" System.out.println();","lastModifiedDate":"2023-10-04"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.loadData(tasks);","lastModifiedDate":"2023-10-04"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":" assert tasks !\u003d null : \"Invalid null tasks\";","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" * Retrieves the CLI input from the user","lastModifiedDate":"2023-10-04"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" * and documents it as a String object.","lastModifiedDate":"2023-10-04"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" public String getUserInput() {","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" if(input.hasNextLine()){","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" return input.nextLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-21"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" * Displays closing message on exiting the chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" public void displayClosingMessage(){","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(tasks);","lastModifiedDate":"2023-10-04"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Are you sure you want to stop quizzing?\");","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Well... hope you had fun quizzing :D\");","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" See you again soon!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":115,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":116,"author":{"gitId":"yeo-menghan"},"content":" * Displays a question along with its index in a set of questions and the total count of questions.","lastModifiedDate":"2023-10-09"},{"lineNumber":117,"author":{"gitId":"yeo-menghan"},"content":" * Extracts and displays the question part from the question description, which is in the \"question/answer\" format.","lastModifiedDate":"2023-10-09"},{"lineNumber":118,"author":{"gitId":"yeo-menghan"},"content":" * If the format is invalid or missing, it prompts the user to edit the question via the edit function.","lastModifiedDate":"2023-10-09"},{"lineNumber":119,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":120,"author":{"gitId":"yeo-menghan"},"content":" * @param question The Question object containing the question description.","lastModifiedDate":"2023-10-09"},{"lineNumber":121,"author":{"gitId":"yeo-menghan"},"content":" * @param currentQuestionIndex The index of the current question in the set of questions.","lastModifiedDate":"2023-10-09"},{"lineNumber":122,"author":{"gitId":"yeo-menghan"},"content":" * @param totalQuestions The total count of questions in the set.","lastModifiedDate":"2023-10-09"},{"lineNumber":123,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":124,"author":{"gitId":"yeo-menghan"},"content":" public void displayQuestion(Question question, int currentQuestionIndex, int totalQuestions) {","lastModifiedDate":"2023-10-09"},{"lineNumber":125,"author":{"gitId":"yeo-menghan"},"content":" showLine();","lastModifiedDate":"2023-10-09"},{"lineNumber":126,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Question \" + currentQuestionIndex + \" / \" + totalQuestions + \":\");","lastModifiedDate":"2023-10-09"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" // getQuestionDescription returns question/answer","lastModifiedDate":"2023-10-21"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" String questionDescription \u003d question.getQuestionDescription();","lastModifiedDate":"2023-10-21"},{"lineNumber":129,"author":{"gitId":"yeo-menghan"},"content":" String[] parts \u003d questionDescription.split(\"/\");","lastModifiedDate":"2023-10-09"},{"lineNumber":130,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":131,"author":{"gitId":"yeo-menghan"},"content":" if (parts.length \u003e\u003d 1) {","lastModifiedDate":"2023-10-09"},{"lineNumber":132,"author":{"gitId":"yeo-menghan"},"content":" // Extract and display the question part","lastModifiedDate":"2023-10-09"},{"lineNumber":133,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" \" + parts[0]); // part[0] returns the question part","lastModifiedDate":"2023-10-09"},{"lineNumber":134,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":135,"author":{"gitId":"yeo-menghan"},"content":" // Handle the case where the format is invalid","lastModifiedDate":"2023-10-09"},{"lineNumber":136,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Invalid question format, please edit this question via the edit function\");","lastModifiedDate":"2023-10-09"},{"lineNumber":137,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":138,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":139,"author":{"gitId":"yeo-menghan"},"content":" System.out.print(\" Your Answer: \");","lastModifiedDate":"2023-10-09"},{"lineNumber":140,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":141,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" public void showInvalidCommandHelp(String feedback) {","lastModifiedDate":"2023-10-12"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(feedback);","lastModifiedDate":"2023-10-12"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":145,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"yeo-menghan"},"content":" public void displayMessage(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-17"},{"lineNumber":148,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":95,"StevenGX12":17,"James-Hong-Jey":3,"yeo-menghan":30,"lisizhuang-0121":5}},{"path":"src/test/java/quizhub/command/CommandDeleteTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"public class CommandDeleteTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" private Parser parser;","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":" private Ui ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"StevenGX12"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"StevenGX12"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"StevenGX12"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"StevenGX12"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"StevenGX12"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" assert expectedOutput !\u003d null : \"Expected output should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(expectedOutput + \"\\n\" +actualOutput);","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with out-of-bound index","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"StevenGX12"},"content":" void testDeleteOutOfBoundIndex() {","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" questionList.deleteQuestionByIndex(-1);","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with invalid type index","lastModifiedDate":"2023-10-21"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" void testDeleteInvalidTypeIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(\"delete test\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with missing index","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" void testDeleteMissingIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandDelete.MISSING_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(\"delete\").executeCommand(ui, mockStorage, questionList);;","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":" // /**","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":" // * Test deleting with valid index","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":" // * */","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":105,"author":{"gitId":"StevenGX12"},"content":" void testDeleteValidIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":106,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have deleted the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"lisizhuang-0121"},"content":" \" [S][X] Question1 / Answer1 | Mod1 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":" \" Now you have 3 questions in the list! UWU\";","lastModifiedDate":"2023-10-21"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" questionList.deleteQuestionByIndex(1);","lastModifiedDate":"2023-10-21"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-21"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":9,"StevenGX12":88,"James-Hong-Jey":4,"lisizhuang-0121":11}},{"path":"src/test/java/quizhub/command/CommandEditTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeAll;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"public class CommandEditTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" @BeforeAll","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" public static void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4 / NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" for (String question:questionsToAdd) {","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with out-of-bound index","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" void testEditOutOfBoundIndex(){","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit -1 /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with non-integer index","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" void testEditNonIntIndex(){","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit abc /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with blank description and answer","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" void testEditBlankDes(){","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_KEYWORD_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 1 /description \";","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled answer and blank description","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" void testEditBlankAns(){","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_KEYWORD_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 1 /answer \";","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled description and blank answer","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":" void testEditNoIndex(){","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_INDEX_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit \";","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" * Test editing with filled description and answer","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" * */","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":" void testEditValidDescription(){","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have edited the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" \" [S][X] NewDescription / Answer3 | Mod3 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" \" Now you have 4 questions in the list! UWU\";","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 3 /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled description and answer","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"StevenGX12"},"content":" void testEditValidAnswer(){","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have edited the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"StevenGX12"},"content":" \" [S][] Question4 / NewAnswer | Mod4 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" \" Now you have 4 questions in the list! UWU\";","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 4 /answer NewAnswer\";","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spinoandraptos":98,"StevenGX12":29,"James-Hong-Jey":5,"lisizhuang-0121":15}},{"path":"src/test/java/quizhub/command/CommandFindTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeAll;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":"public class CommandFindTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" @BeforeAll","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" public static void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" \"short Question4 / Answer4 / Mod4 / NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" };","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"StevenGX12"},"content":" for (String question:questionsToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"StevenGX12"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"StevenGX12"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"StevenGX12"},"content":" assert expectedOutput !\u003d null : \"Expected output should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" * Test finding with no criteria","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" void testFindNoCriteria() {","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_CRITERIA_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with no keyword","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionNoKeyword() {","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_KEYWORD_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with matches","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionWithMatches() {","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 1: [S][X] Question1 / Answer1 | Mod1 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 2: [S][] Question2 / Answer2 | Mod2 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" + \" 4: [S][] Question4 / Answer4 | Mod4 | NORMAL\";","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description Question\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-21"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with no matches","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionNoMatches() {","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":" + \" No results found :\u003c Check your keyword is correct?\";","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description no matches\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with no keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleNoKeyword() {","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_KEYWORD_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with matches","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"StevenGX12"},"content":" */ ","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleWithMatches() {","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"StevenGX12"},"content":" + \" 1: [S][X] Question1 / Answer1 | Mod1 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"StevenGX12"},"content":" + \" 2: [S][] Question2 / Answer2 | Mod2 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"StevenGX12"},"content":" + \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"StevenGX12"},"content":" + \" 4: [S][] Question4 / Answer4 | Mod4 | NORMAL\";","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module Mod\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with no matches","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleNoMatches() {","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"StevenGX12"},"content":" + \" No results found :\u003c Check your module is correct?\";","lastModifiedDate":"2023-10-26"},{"lineNumber":153,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module no matches\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":10,"StevenGX12":112,"James-Hong-Jey":2,"lisizhuang-0121":32}},{"path":"src/test/java/quizhub/command/CommandHelpTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"StevenGX12"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"StevenGX12"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":"public class CommandHelpTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"StevenGX12"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private Ui mockUi;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" public void setUp(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"StevenGX12"},"content":" // Create a temporary file in the tempDir","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"StevenGX12"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" mockStorage \u003d new MockStorage(tempFile.toString()); // Pass the temporary file path","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" mockUi \u003d new Ui(mockStorage,questionList);","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" ","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" * Test if help command displays the correct output","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" * */","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" public void testHelpCommand() {","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"James-Hong-Jey"},"content":" String expectedOutput\u003d \"Here are the list of commands you can use:\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"James-Hong-Jey"},"content":" \" 1. help - shows the list of commands you can use\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"James-Hong-Jey"},"content":" \" 2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"James-Hong-Jey"},"content":" \"its answer to the list,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"James-Hong-Jey"},"content":" \" 3. list - shows the list of questions and answers,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"James-Hong-Jey"},"content":" \" 4. delete [question number] - deletes the question and answer at the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"James-Hong-Jey"},"content":" \" 5. find /[description] - displays all questions that contains the the specified description,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"James-Hong-Jey"},"content":" \" 6. find /[module] - displays all questions that belong to the specified module,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"James-Hong-Jey"},"content":" \" 7. edit [question number] /description [description] - edits the description of the question \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"James-Hong-Jey"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"James-Hong-Jey"},"content":" \" 8. edit [question number] /answer [answer] - edits the answer to the question with \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"James-Hong-Jey"},"content":" \"the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"James-Hong-Jey"},"content":" \" 9. start /[quiz mode] [start details] /[qn mode] - \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"James-Hong-Jey"},"content":" \"starts the quiz with option for /module or /all and /random or /normal,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"James-Hong-Jey"},"content":" \" 10. shuffle - shuffle quiz questions to a random order,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"James-Hong-Jey"},"content":" \" 11. markdiff [question number] [question difficulty] - sets the difficulty of question \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"James-Hong-Jey"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" \" 12. bye - exits the program\";","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" CommandHelp help \u003d new CommandHelp();","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":" help.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" // MockStorage class for testing, using in-data memory","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" public class MockStorage extends Storage {","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"StevenGX12"},"content":" private List\u003cString\u003e questions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" public MockStorage(String filepath) {","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"StevenGX12"},"content":" super(filepath);","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":" public void saveData(String dataToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":" questions.add(dataToAdd);","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" public String loadData() {","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":" // In-memory storage, retrieve data from the list","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" return \"\";","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" // Concatenate the data with line breaks","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":" for (String line : questions) {","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":" result.append(line).append(System.lineSeparator());","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" return result.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" public boolean dataExists() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":" return !questions.isEmpty();","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" public void clearData() {","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":" questions.clear();","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":93,"James-Hong-Jey":19,"lisizhuang-0121":3}},{"path":"src/test/java/quizhub/command/CommandListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"public class CommandListTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" public void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output.","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same.","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" * Test display of empty question list.","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" void testListEmptyList(){","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"No questions found! Time to add some OWO\";","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" * with one unmarked SHORTANSWER question.","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" void testListOneUnmarkedShort(){","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"1: [S][] Question / Answer | Mod1 | EASY\";","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question\", \"Answer\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.EASY, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" String actualOutput \u003d outputStreamCaptor.toString().strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * with one marked SHORTANSWER question.","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" void testListOneMarkedShort(){","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question\", \"Answer\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(1, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"1: [S][X] Question / Answer | Mod1 | HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * with a mix of marked and unmarked SHORTANSWER questions.","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" void testListMixedShorts(){","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question1\", \"Answer1\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question2\", \"Answer2\", \"Mod2\",","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question3\", \"Answer3\", \"Mod3\",","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.NORMAL, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question4\", \"Answer4\", \"Mod4\",","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.EASY, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(1, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(3, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" \"1: [S][X] Question1 / Answer1 | Mod1 | HARD\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" \" 2: [S][] Question2 / Answer2 | Mod2 | HARD\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" \" 4: [S][] Question4 / Answer4 | Mod4 | EASY\" ;","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spinoandraptos":85,"lisizhuang-0121":24}},{"path":"src/test/java/quizhub/command/CommandMarkTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"public class CommandMarkTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * Test marking without question index and difficulty level","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNoIndexNoDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff\";","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.MISSING_INDEX_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" + CommandMarkDifficulty.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * Test marking without question difficulty to assign","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNoDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1\";","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.MISSING_DIFFICULTY_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with out-of-bound index","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffOutOfBoundIndex(){","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff -1 NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with non-integer index","lastModifiedDate":"2023-10-22"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNonIntIndex(){","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff ?@!# NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question non-existent difficulty level","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffWrongDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 ???\";","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_QUESTION_DIFFICULTY_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" .replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question multiple difficulty levels","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffMultipleDifficulty(){","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 NORMAL hard EASY\";","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.TOO_MANY_ARGUMENTS_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" + CommandMarkDifficulty.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question same difficulty as its current one","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffRepeatedDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"Question is already set as normal ! No changes made!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question different, correct difficulty level","lastModifiedDate":"2023-10-22"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffCorrectDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 2 HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":161,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have marked the following question as hard \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":" \" [S][] Question2 / Answer2 | Mod2 | HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-22"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"spinoandraptos":158,"James-Hong-Jey":4,"lisizhuang-0121":5}},{"path":"src/test/java/quizhub/command/CommandStartTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Nested;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.MockUi;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"yeo-menghan"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":"public class CommandStartTest {","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yeo-menghan"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yeo-menghan"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" public class UninitialisedQnListBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"yeo-menghan"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yeo-menghan"},"content":" public void setUp(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yeo-menghan"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yeo-menghan"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yeo-menghan"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"yeo-menghan"},"content":" public void testStartQuizWithNoQuestions() {","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all /random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"No questions found! Add questions before starting the quiz.\";","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz when question list is empty","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" public class InitialisedQnListWithErrorBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" * Create a new blank question list","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d {\"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\"};","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz without specifying quiz mode","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizNoQuizMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start\";","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QUIZ_MODE_MSG.strip().replace(System.lineSeparator(), \"\")","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode without start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeNoDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all\";","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all details\";","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode without start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeNoDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module\";","lastModifiedDate":"2023-10-27"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_START_DETAILS.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":148,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module cs2113\";","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":160,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":161,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode without start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeNoDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module /random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":168,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_START_DETAILS.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":169,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":170,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":172,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":173,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":174,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with excessive arguments at the back","lastModifiedDate":"2023-10-27"},{"lineNumber":175,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":176,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsWithQnModeTooManyArguments() {","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all Mod2 /normal random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.TOO_MANY_ARGUMENTS_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":182,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":183,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":184,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":185,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with excessive arguments at the back","lastModifiedDate":"2023-10-27"},{"lineNumber":186,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":187,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsWithQnModeTooManyArguments() {","lastModifiedDate":"2023-10-27"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod2 /random normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":190,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.TOO_MANY_ARGUMENTS_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":191,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":192,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":193,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":194,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":195,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":196,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":197,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":198,"author":{"gitId":"spinoandraptos"},"content":" public class InitialisedQnListWithoutErrorBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":199,"author":{"gitId":"spinoandraptos"},"content":" MockUi mockUi;","lastModifiedDate":"2023-10-27"},{"lineNumber":200,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":201,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-27"},{"lineNumber":202,"author":{"gitId":"spinoandraptos"},"content":" // Create a temporary file in the tempDir","lastModifiedDate":"2023-10-27"},{"lineNumber":203,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-27"},{"lineNumber":204,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString()); // Pass the temporary file path","lastModifiedDate":"2023-10-27"},{"lineNumber":205,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-27"},{"lineNumber":206,"author":{"gitId":"spinoandraptos"},"content":" mockUi \u003d new MockUi(questionList, mockStorage);","lastModifiedDate":"2023-10-27"},{"lineNumber":207,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d {\"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"spinoandraptos"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"spinoandraptos"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\"};","lastModifiedDate":"2023-10-27"},{"lineNumber":211,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-27"},{"lineNumber":212,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":213,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":214,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":215,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":216,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode without start details with question mode random","lastModifiedDate":"2023-10-27"},{"lineNumber":217,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":218,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":219,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeNoDetailsWithRandomQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":220,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":221,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":222,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":223,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer4\");","lastModifiedDate":"2023-10-27"},{"lineNumber":224,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":225,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":226,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":227,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 4/4\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":228,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":229,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":230,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":231,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":232,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":233,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":234,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":235,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":236,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer8\");","lastModifiedDate":"2023-10-27"},{"lineNumber":237,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":238,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":239,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all details /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":240,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":241,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":242,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 2/4\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":243,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":244,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":245,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":246,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":247,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":248,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":249,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":250,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod3 /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":251,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":252,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":253,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 0/1\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":254,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":255,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":256,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":257,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with multiple start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":258,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":259,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":260,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithMultipleDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":261,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":262,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer4\");","lastModifiedDate":"2023-10-27"},{"lineNumber":263,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod3 Mod1 Mod2 /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":265,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":266,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":267,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 2/3\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":268,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":269,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":270,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":271,"author":{"gitId":"yeo-menghan"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spinoandraptos":223,"yeo-menghan":48}},{"path":"src/test/java/quizhub/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.command.CommandDelete;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.command.CommandInvalid;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":"class ParserTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private Parser parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"James-Hong-Jey"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" public void setUp() {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" * Test command parser with empty commands (invalid commands)","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" void test_parseCommand_emptyCommand() {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" final String[] emptyInputs \u003d { \"\", \" \", \"\\n \\n\" };","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" final String resultMessage \u003d Ui.INVALID_COMMAND_MSG + System.lineSeparator() + Ui.INVALID_COMMAND_FEEDBACK;","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" parseAndAssertIncorrectWithMessage(resultMessage, emptyInputs);","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"lisizhuang-0121"},"content":" void test_parseCommand_invalidIntegerCommand() {","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"lisizhuang-0121"},"content":" final String[] invalidIntegers \u003d {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" \"delete system32\",","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" \"delete 1111111111111111111111111111111111111111111111111\"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" final String resultMessage \u003d Ui.INVALID_INTEGER_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" System.lineSeparator() + CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" parseAndAssertIncorrectWithMessage(resultMessage, invalidIntegers);","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" /*","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" void test_parseCommand_commandShortAnswer() {","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"James-Hong-Jey"},"content":" final String validInput \u003d \"short What\u0027s 9 + 10 / 21\";","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"James-Hong-Jey"},"content":" CommandShortAnswer result \u003d parseAndAssertCommandType(validInput, CommandShortAnswer.class);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" assertEquals(\"short What\u0027s 9 + 10 / 21\", result.getUserInput());","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"lisizhuang-0121"},"content":" * Test list of INVALID inputs and validate their feedback","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"lisizhuang-0121"},"content":" * This function is adapted from ADDRESS_BOOK_LEVEL_2","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"lisizhuang-0121"},"content":" * @param feedback The target feedback message for invalid command","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"lisizhuang-0121"},"content":" * @param inputs The invalid inputs that would generate the same feedback","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" private void parseAndAssertIncorrectWithMessage(String feedback, String[] inputs) {","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" for (String input : inputs) {","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" final CommandInvalid result \u003d parseAndAssertCommandType(input, CommandInvalid.class);","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(feedback, result.feedback);","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"lisizhuang-0121"},"content":" * Parses and tests the command type returned","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"lisizhuang-0121"},"content":" * This function is adapted from ADDRESS_BOOK_LEVEL_2","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"lisizhuang-0121"},"content":" * @param input The command input to be tested","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"lisizhuang-0121"},"content":" * @param expectedClass The expected command class","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" private \u003cT extends Command\u003e T parseAndAssertCommandType(String input, Class\u003cT\u003e expectedClass) {","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" final Command result \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"lisizhuang-0121"},"content":" assertTrue(result.getClass().isAssignableFrom(expectedClass));","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"lisizhuang-0121"},"content":" return (T) result;","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"spinoandraptos":8,"James-Hong-Jey":10,"lisizhuang-0121":62}},{"path":"src/test/java/quizhub/questionlist/QuestionListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.questionlist;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":"class QuestionListTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" public void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"James-Hong-Jey"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"James-Hong-Jey"},"content":" @AfterEach","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"James-Hong-Jey"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"James-Hong-Jey"},"content":" void test_addToQuestionList_valid() {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"James-Hong-Jey"},"content":" boolean showMessage \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":" QuestionList qns \u003d new QuestionList();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" qns.addShortAnswerQn(\"Question\", \"Answer\",","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" \"Mod1\", Question.QnDifficulty.NORMAL, true);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\"I have added the following question OwO:\" +","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" \" [S] Question / Answer | Mod1 | NORMAL Now you have 1 questions in the list! UWU\",","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" outputStreamCaptor.toString().strip().replaceAll(\"\\\\R\", \"\"));","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spinoandraptos":6,"James-Hong-Jey":31,"lisizhuang-0121":2}},{"path":"src/test/java/quizhub/storage/MockStorage.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import java.util.List;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"public class MockStorage extends Storage {","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" private List\u003cString\u003e questions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" public MockStorage(String filepath) {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" super(filepath);","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" public void saveData(String dataToAdd) {","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" questions.add(dataToAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" public String loadData() {","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" // In-memory storage, retrieve data from the list","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" // Concatenate the data with line breaks","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" for (String line : questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" result.append(line).append(System.lineSeparator());","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" return result.toString().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" public boolean dataExists() {","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" return !questions.isEmpty();","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" public void clearData() {","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" questions.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"spinoandraptos":37}},{"path":"src/test/java/quizhub/ui/MockUi.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import java.util.LinkedList;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Queue;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class MockUi extends Ui {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" private final Queue\u003cString\u003e userInputQueue \u003d new LinkedList\u003c\u003e();","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" private String lastDisplayedMessage;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" public MockUi(QuestionList tasks, MockStorage mockStorage) {","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" super(mockStorage, tasks);","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public void setUserInput(String input) {","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" userInputQueue.add(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" public String getUserInput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" if (userInputQueue.isEmpty()) {","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" throw new RuntimeException(\"No more user inputs provided.\");","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" return userInputQueue.poll();","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" public void displayMessage(String message) {","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" lastDisplayedMessage \u003d message;","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" public String getLastDisplayedMessage() {","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" return lastDisplayedMessage;","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":35}}] +[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"# QuizHub project template","lastModifiedDate":"2023-10-04"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/duke/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Hello from","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ____ _ ","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" | _ \\ _ _| | _____ ","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" | | | | | | | |/ / _ \\","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" | |_| | |_| | \u003c __/","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" |____/ \\__,_|_|\\_\\___|","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"yeo-menghan":1,"-":63}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" testImplementation \u0027junit:junit:4.13.1\u0027","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" mainClass.set(\"Quizhub\")","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" archiveBaseName.set(\"quizhub\")","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"spinoandraptos":3,"lisizhuang-0121":1,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"Display | Name | Github Profile | Portfolio ","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"--------|:--------------:|:--------------------------------------------:|:---------:","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"![](https://www.comp.nus.edu.sg/~stevenha/images/sh7.jpg) | James Hong Jey | [Github](https://github.com/James-Hong-Jey) | [Portfolio](docs/team/jameshong.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"StevenGX12"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Guan Xiao | [Github](https://github.com/StevenGX12) | [Portfolio](docs/team/guanxiao.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"![](https://avatars.githubusercontent.com/u/111041948?s\u003d400\u0026u\u003d6619a8328eba45edbc88fe01cf54efeb1f986d11\u0026v\u003d4) | Man Juncheng | [Github](https://github.com/spinoandraptos) | [Portfolio](docs/team/juncheng.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":"![](https://i.redd.it/6do158vk2ue61.png) | Li Sizhuang | [Github](https://github.com/lisizhuang-0121) | [Portfolio](docs/team/johndoe.md)","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"![](https://via.placeholder.com/100.png?text\u003dPhoto) | Yeo Meng Han | [Github](https://github.com/yeo-menghan) | [Portfolio](https://linkedin.com/in/yeo-meng-han/)","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":1,"James-Hong-Jey":1,"yeo-menghan":1,"lisizhuang-0121":2,"-":3}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"## Table of Contents","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"* [Acknowledgements](#acknowledgements)","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"* [Design and Implementation](#design--implementation)","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":" * [Application Lifecycle](#application-lifecycle)","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":" * [Parser Component](#parser-component)","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":" * [Command Component](#command-components)","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":" * [Storage Component](#storage-component)","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"StevenGX12"},"content":" * [UI Component](#ui-component)","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":"* [Product Scope](#product-scope)","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"* [Non Functional Requirements](#non-functional-requirements)","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"* [Glossary](#glossary)","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"* [Instructions for Manual Testing](#instructions-for-manual-testing)","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":"1. For the main structure of the program, we have adapted the project structure","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"from the Individual Project of Man Juncheng at [Link](https://github.com/spinoandraptos/ip/tree/master) \u003c/li\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":"2. For JUnit testing, we have adapted the testing codes from the AddressBook level-2","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":"codes at [Link](https://github.com/se-edu/addressbook-level2)\u003c/li\u003e","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":"3. For the developer\u0027s guide, we have referenced the developer\u0027s guide from AddressBook","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":"level-3 [Link](https://se-education.org/addressbook-level3/DeveloperGuide.html)","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"# Design \u0026 implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"## Overall Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":"The main execution of the QuizHub application will concern 4 components which","lastModifiedDate":"2023-10-21"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":"are the QuizHub, Ui, Parser and Command packages.","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":"![](./UML/architecture.jpg)","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":"`Quizhub` is the \"main\" class, which is responsible for starting the program,","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"James-Hong-Jey"},"content":"initialising all other objects, executing commands, and shutting down.","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":"`UI` is the component that interacts with the user, taking inputs and displaying","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":"the results of the executed commands.","lastModifiedDate":"2023-10-21"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":"`Parser` acts as a multiplexer to determine which command to run, and what parameters","lastModifiedDate":"2023-10-21"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":"it has, based on the user input.","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":"`Commands` refer to a package of individual commands with complex and specific","lastModifiedDate":"2023-10-21"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":"logic, which is later executed in Quizhub and displayed by `UI`.","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"James-Hong-Jey"},"content":"`Storage` is the class through which questions can be stored on the hard drive and `Utility Classes`","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":"refer to any miscellaneous utility classes used by all the components.","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":"## Application Lifecycle","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":"![](./UML/lifecycle.jpg)","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":"The program begins with the `run()` call to `QuizHub` class.","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":"This starts a loop in which","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"user input is continuously read in from CLI for the user command to be extracted and executed.","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":"In each iteration of the loop, `QuizHub` makes a call to `Ui.getUserInput()` and returns the","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":"entire user input as a String object. Following which, `QuizHub` makes a call to","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":"`Parser.parseCommand()` to extract the user command from the String object and returns a","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":"`Command` object. Finally, `QuizHub` makes a call to `Command.executeCommand()` and performs","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":"the requested task.","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":"If `Command` is of Exit type, the loop will exit, and the program terminates.","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":"## Parser Component","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":"The `Parser` component is the backbone behind the program, functioning as the API","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"between the CLI user interface and the core functionalities of the program. It supports","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":"the direct communication between the program and user by converting user input into `Command`","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":"objects which can be interpreted by the program.","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":"### Design Considerations","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":"As the `Parser` functions as the API between user and program, it must be designed with a clear","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":"consideration of both human and machine requirements.","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":"Our target users are NUS students preparing for exams who wish to use our program to facilitate","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":"their practice. Considering that time is of the essence for revising students, the `Parser` must","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":"prioritise efficiency of use to not cause time delays to users\u0027 revision. With this in mind,","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":"we based our design off the following points for inputs taken in by the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":"1. **Ease of use**: Simple and short command structure \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"2. **Ease of familiarisation**: No excessive or complicated commands","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":"Consideration must also be given to the developers and machine executing the code. The exact","lastModifiedDate":"2023-10-24"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":"mechanism behind the `Parser` must be able to effectively extract the relevant information from","lastModifiedDate":"2023-10-24"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":"user inputs in a non-arbitrary way to be used by other classes. Hence, we also need to strike a balance with the","lastModifiedDate":"2023-10-24"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":"following point for inputs taken in by the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":"1. **Ease of processing and validation**: Hierarchical command structure","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":"### Alternative Design Considerations","lastModifiedDate":"2023-10-24"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":"In designing the `Parser`, an alternative design we considered is to follow that of `Unix`","lastModifiedDate":"2023-10-24"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":"command interface. The `Unix` parser is designed such that input commands are required to","lastModifiedDate":"2023-10-24"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":"have the syntax of ```command -(options) argument1 argument2 ...``` where the order of arguments","lastModifiedDate":"2023-10-24"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":"does not matter. While this is a clean and neat parser design, we have decided not to adopt this","lastModifiedDate":"2023-10-24"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":"design as we see a strong need of having a hierarchical command structure for our program.","lastModifiedDate":"2023-10-24"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":"1. A hierarchical structure introduces logical sequence and flow to the command used,","lastModifiedDate":"2023-10-24"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" facilitating a quick familiarisation process for users to quickly learn the command syntax.","lastModifiedDate":"2023-10-24"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" This is in line with our design consideration to minimise learning and familiarisation time","lastModifiedDate":"2023-10-24"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" for users. This is in addition to the ease of processing and validation of commands.","lastModifiedDate":"2023-10-24"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" ```short [question]/[answer]/[module]/[difficulty]```, for one, is a command that has a","lastModifiedDate":"2023-10-24"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" logical sequence to which the details of a question is entered. It is more intuitive to","lastModifiedDate":"2023-10-24"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" follow a structure instead of entering such details without a fixed order, which can easily","lastModifiedDate":"2023-10-24"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" lead to confusion. \u003cbr\u003e\u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":"2. The use of the delimiter `/` also better helps to introduce the concept of hierarchy than the","lastModifiedDate":"2023-10-24"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" delimiter `--` used in `Unix` commands as `/` can be more easily associated with layering and","lastModifiedDate":"2023-10-24"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" stacking, which create structures possessing hierarchy.","lastModifiedDate":"2023-10-24"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":"### Parser Command Syntax","lastModifiedDate":"2023-10-24"},{"lineNumber":112,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":"Our final design seeks to optimise both user experience and program effectiveness.","lastModifiedDate":"2023-10-24"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":"We have hence chosen the following general syntax for commands to be input into the `Parser`.","lastModifiedDate":"2023-10-24"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":"All commands require a starting payload, but some commands do not require the subsequent arguments.","lastModifiedDate":"2023-10-24"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":"commandType [payload] [/argument1 [payload1] /argument2 [payload2] ... ]","lastModifiedDate":"2023-10-24"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":"```","lastModifiedDate":"2023-10-24"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":"The command structure is simple, short, and intuitive. With commands rarely requiring more","lastModifiedDate":"2023-10-24"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":"than 2 arguments, typing and inputting the command in CLI is fast and efficient, allowing","lastModifiedDate":"2023-10-24"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":"revising students to quickly utilise the program. The hierarchical and logical structure to","lastModifiedDate":"2023-10-24"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":"the arrangement of arguments and payloads allows students to quickly familiarise with the","lastModifiedDate":"2023-10-24"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":"syntax and minimise delays to their learning schedule.","lastModifiedDate":"2023-10-24"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":"The hierarchical structure also allows for the respective payload to be easily extracted","lastModifiedDate":"2023-10-24"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":"with little ambiguity. Command validation can then be performed sequentially, facilitating","lastModifiedDate":"2023-10-24"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":"efficient checks.","lastModifiedDate":"2023-10-24"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":"### Implementation","lastModifiedDate":"2023-10-24"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":"The main function of `Parser` is to decode user input and extract relevant information to be","lastModifiedDate":"2023-10-24"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":"used by other classes. Hence, it supports 3 main methods as listed below.","lastModifiedDate":"2023-10-24"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"1. `parseCommand`","lastModifiedDate":"2023-10-24"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":"2. `getContentAfterKeyword`","lastModifiedDate":"2023-10-24"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":"3. `extractQuestionDifficulty`","lastModifiedDate":"2023-10-24"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":"`parseCommand`","lastModifiedDate":"2023-10-24"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":"This method processes raw user input from CLI to extract information to be assembled into a","lastModifiedDate":"2023-10-24"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":"`Command` object. It determines the type of command by reading the commandType from the","lastModifiedDate":"2023-10-24"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":"very start of the user input.","lastModifiedDate":"2023-10-24"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":"The following sequence diagram shows the implementation of `parseCommand`.","lastModifiedDate":"2023-10-24"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":"![](./UML/Parser.jpg)","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":"`getContentAfterKeyword`","lastModifiedDate":"2023-10-24"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"This method acts as a helper method to assist in extracting the payload following an argument","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":"in the user input. It is used in the constructing of `Command` objects when command-specific","lastModifiedDate":"2023-10-24"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":"information need to be extracted from arguments in the user input.","lastModifiedDate":"2023-10-24"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"It simply breaks up an entire ```/argument [payload]``` String into ```/argument``` and","lastModifiedDate":"2023-10-24"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":"```[payload]``` and returns the `[payload]`. Hence, any String passed into this method must","lastModifiedDate":"2023-10-24"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":"take on the form of ```/argument [payload]``` or an exception will be thrown and handled by","lastModifiedDate":"2023-10-24"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":"printing an error message to the CLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":"`extractQuestionDifficulty`","lastModifiedDate":"2023-10-24"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":"This method acts as a helper method for extracting an `QnDifficulty` enum type from a user","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":"text input. This is used for setting question difficulty during the construction of a","lastModifiedDate":"2023-10-24"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":"`Question` , or the execution of a `CommandMarkDifficulty`.","lastModifiedDate":"2023-10-24"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":"If the string passed to this method does not describe an existing question difficulty level, an","lastModifiedDate":"2023-10-24"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":"exception will be thrown and handled by printing an error message to the CLI.","lastModifiedDate":"2023-10-24"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":168,"author":{"gitId":"yeo-menghan"},"content":"## Command Components","lastModifiedDate":"2023-10-24"},{"lineNumber":169,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":170,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":171,"author":{"gitId":"yeo-menghan"},"content":"### Start Command - Start Quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":172,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":173,"author":{"gitId":"yeo-menghan"},"content":"The start quiz feature allows users to start quizzing themselves with customizable characters to define which modules to quiz themselves on alongside whether to randomize the questions or use their pre-defined question order.","lastModifiedDate":"2023-10-24"},{"lineNumber":174,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":175,"author":{"gitId":"yeo-menghan"},"content":"![](./UML/CommandStart_Sequence.jpg)","lastModifiedDate":"2023-10-24"},{"lineNumber":176,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":177,"author":{"gitId":"yeo-menghan"},"content":"The start quiz mechanism is facilitated by CommandStart under package quizhub.command. The class utilises methods from `quizhub.questionlist.QuestionList`. It extends Command with 2 new prompts (`/[quiz mode]` and `/[qn mode]`) and 1 user input field (`/[start details]`). It implements the following operations:","lastModifiedDate":"2023-10-24"},{"lineNumber":178,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":179,"author":{"gitId":"yeo-menghan"},"content":"`/[quiz mode]`","lastModifiedDate":"2023-10-24"},{"lineNumber":180,"author":{"gitId":"yeo-menghan"},"content":"1. 2 configurations - `/module` and `/all`","lastModifiedDate":"2023-10-24"},{"lineNumber":181,"author":{"gitId":"yeo-menghan"},"content":"2.\t`/module` must be followed by a category name to retrieve questions from that specific category","lastModifiedDate":"2023-10-24"},{"lineNumber":182,"author":{"gitId":"yeo-menghan"},"content":"- The method categoriseListByModules from the package `quizhub.questionlist.QuestionList` will be called to retrieve the questions by that are listed within the specified category from the storage list","lastModifiedDate":"2023-10-24"},{"lineNumber":183,"author":{"gitId":"yeo-menghan"},"content":"- `/all` will not require any input from `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":184,"author":{"gitId":"yeo-menghan"},"content":"3.\tThe method `getAllQns()` from package `quizhub.questionlist.QuestionList` will be called to retrieve all questions from the storage list.","lastModifiedDate":"2023-10-24"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":186,"author":{"gitId":"yeo-menghan"},"content":"`/[qn mode]`","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"yeo-menghan"},"content":"1.\t2 configurations - `/random` and `/normal`","lastModifiedDate":"2023-10-24"},{"lineNumber":188,"author":{"gitId":"yeo-menghan"},"content":"2.\tThis prompt is activated after defining `/[quiz mode]` and `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":189,"author":{"gitId":"yeo-menghan"},"content":"3.\t/random will randomize the list of questions using `java.util.Collections.shuffle` and store it within a temporary array to prevent tempering with the original array in Storage","lastModifiedDate":"2023-10-24"},{"lineNumber":190,"author":{"gitId":"yeo-menghan"},"content":"4.\t`/normal` will not require any further actions, using the previously generated list as specified by `/[quiz mode]` and `/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":191,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":192,"author":{"gitId":"yeo-menghan"},"content":"`/[start details]`","lastModifiedDate":"2023-10-24"},{"lineNumber":193,"author":{"gitId":"yeo-menghan"},"content":"1.\tDefine the category of `/module` i.e. `/module` number to call upon the “number” tagged modules when starting the quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"yeo-menghan"},"content":"2.\tThis field can be left blank when `/all` is called for `/[quiz mode]` to tell the program to quiz the user on all questions stored within the local storage","lastModifiedDate":"2023-10-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":196,"author":{"gitId":"yeo-menghan"},"content":"Thereafter the quiz is started by calling the method `startQuiz()` in package `quizhub.questionlist.QuestionList`. Within `startQuiz()`, the program iterates through the list of totalQuestions while blocking out the answers. The user can input their answer in the input field which is utilized to match with the actual answer to provide “correct” or “wrong”. Each correct answer will increment correctAnswers variable by 1. The quiz ends when all the questions are displayed and the total number of correctAnswers will be displayed.","lastModifiedDate":"2023-10-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":198,"author":{"gitId":"James-Hong-Jey"},"content":"### Short Command - Add Short Answer Question to the Quiz","lastModifiedDate":"2023-10-24"},{"lineNumber":199,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"James-Hong-Jey"},"content":"One of the supported question formats is the Short Answer Question, in which a question","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"James-Hong-Jey"},"content":"can be answered with a phrase of a few words, which will be matched to a corresponding answer","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"James-Hong-Jey"},"content":"of sufficient similarity.","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":204,"author":{"gitId":"James-Hong-Jey"},"content":"It is parsed as: `short [question]/[answer]/[module]/[difficulty]`","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"James-Hong-Jey"},"content":"1. `[question]` is the question, phrased as asking the user (i.e. What is 2 + 2? )","lastModifiedDate":"2023-10-24"},{"lineNumber":206,"author":{"gitId":"James-Hong-Jey"},"content":"2. `[answer]` is the answer or possible answer(s) that the user must","lastModifiedDate":"2023-10-24"},{"lineNumber":207,"author":{"gitId":"James-Hong-Jey"},"content":" input to count as correct. It is case-insensitive. (i.e. 4, four)","lastModifiedDate":"2023-10-24"},{"lineNumber":208,"author":{"gitId":"James-Hong-Jey"},"content":"3. `[module]` is the module that the question belongs in (i.e. CS2113)","lastModifiedDate":"2023-10-24"},{"lineNumber":209,"author":{"gitId":"James-Hong-Jey"},"content":"4. `[difficulty]` is the difficulty of the question for sorting later (i.e. Hard)","lastModifiedDate":"2023-10-24"},{"lineNumber":210,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":211,"author":{"gitId":"James-Hong-Jey"},"content":"*Condensed Class Diagram - Does not contain all attributes \u0026 methods","lastModifiedDate":"2023-10-25"},{"lineNumber":212,"author":{"gitId":"James-Hong-Jey"},"content":"![](./UML/AddShortCommand.jpg)","lastModifiedDate":"2023-10-25"},{"lineNumber":213,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":214,"author":{"gitId":"James-Hong-Jey"},"content":"Thereafter, the command is returned to the Quizhub component and executed,","lastModifiedDate":"2023-10-24"},{"lineNumber":215,"author":{"gitId":"James-Hong-Jey"},"content":"to add a Question object to the corresponding QuestionList object","lastModifiedDate":"2023-10-24"},{"lineNumber":216,"author":{"gitId":"James-Hong-Jey"},"content":"using the `addToQuestionList` method. This method will analyse the arguments above","lastModifiedDate":"2023-10-24"},{"lineNumber":217,"author":{"gitId":"James-Hong-Jey"},"content":"and add the Question to the appropriate list.","lastModifiedDate":"2023-10-24"},{"lineNumber":218,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":219,"author":{"gitId":"James-Hong-Jey"},"content":"### Find Command - Look for a matching question","lastModifiedDate":"2023-10-24"},{"lineNumber":220,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":221,"author":{"gitId":"James-Hong-Jey"},"content":"Quizhub supports searching for specific questions, by searching matching keywords","lastModifiedDate":"2023-10-24"},{"lineNumber":222,"author":{"gitId":"James-Hong-Jey"},"content":"in the format","lastModifiedDate":"2023-10-24"},{"lineNumber":223,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":224,"author":{"gitId":"James-Hong-Jey"},"content":"`find /[description]` OR `find /[module]`","lastModifiedDate":"2023-10-24"},{"lineNumber":225,"author":{"gitId":"James-Hong-Jey"},"content":"i.e. `find /CS2113`, `find /water buffalo`","lastModifiedDate":"2023-10-24"},{"lineNumber":226,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":227,"author":{"gitId":"James-Hong-Jey"},"content":"This command is passed to the corresponding QuestionList where the `searchList` method","lastModifiedDate":"2023-10-24"},{"lineNumber":228,"author":{"gitId":"James-Hong-Jey"},"content":"is called, which will create a new ArrayList of questions that contain the (case-insensitive)","lastModifiedDate":"2023-10-24"},{"lineNumber":229,"author":{"gitId":"James-Hong-Jey"},"content":"keyword and subsequently print them.","lastModifiedDate":"2023-10-24"},{"lineNumber":230,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":231,"author":{"gitId":"StevenGX12"},"content":"## Storage Component","lastModifiedDate":"2023-10-24"},{"lineNumber":232,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":233,"author":{"gitId":"StevenGX12"},"content":"The Storage class is a critical component of the QuizHub application, responsible for managing the storage, retrieval, and updating of question data. It represents a hard disk storage system for storing, reading, and updating question data. It interacts with question data in a file specified by the user and integrates with the `QuestionList` class for effective storage and retrieval of questions.","lastModifiedDate":"2023-10-24"},{"lineNumber":234,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":235,"author":{"gitId":"StevenGX12"},"content":"Developers need to be aware of the two main methods for loading and updating data:","lastModifiedDate":"2023-10-24"},{"lineNumber":236,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":237,"author":{"gitId":"StevenGX12"},"content":"- `public void loadData(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":238,"author":{"gitId":"StevenGX12"},"content":"- `public void updateData(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":239,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":240,"author":{"gitId":"StevenGX12"},"content":"The details of the data loading and updating process are explained in details below.","lastModifiedDate":"2023-10-24"},{"lineNumber":241,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":242,"author":{"gitId":"StevenGX12"},"content":"### Constructor","lastModifiedDate":"2023-10-24"},{"lineNumber":243,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":244,"author":{"gitId":"StevenGX12"},"content":"#### `public Storage(String filePath)`","lastModifiedDate":"2023-10-24"},{"lineNumber":245,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":246,"author":{"gitId":"StevenGX12"},"content":"- **Parameters:**","lastModifiedDate":"2023-10-24"},{"lineNumber":247,"author":{"gitId":"StevenGX12"},"content":" - `filePath`: The path to the file where question data is stored and read from.","lastModifiedDate":"2023-10-24"},{"lineNumber":248,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":249,"author":{"gitId":"StevenGX12"},"content":"### Loading data","lastModifiedDate":"2023-10-24"},{"lineNumber":250,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":251,"author":{"gitId":"StevenGX12"},"content":"The process of loading data from the storage file specified in the constructor takes places in a few steps. To illustrate the overall flow on loading data, refer to the sequence diagram below.","lastModifiedDate":"2023-10-24"},{"lineNumber":252,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":253,"author":{"gitId":"StevenGX12"},"content":"![](./UML/Storage.jpg)","lastModifiedDate":"2023-10-24"},{"lineNumber":254,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":255,"author":{"gitId":"StevenGX12"},"content":":exclamation: This sequence diagram emphasizes the process of loading data into storage, and has therefore omitted details of more trivial and/or non-related methods as well as exception handling logic. To find out more about the details, please refer to the complete code and header comments.","lastModifiedDate":"2023-10-24"},{"lineNumber":256,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":257,"author":{"gitId":"StevenGX12"},"content":"In addition to the main `loadData` method, the process involves the following 3 helper methods:","lastModifiedDate":"2023-10-24"},{"lineNumber":258,"author":{"gitId":"StevenGX12"},"content":"- `private void addQuestionFromFile(QuestionList questions, String currentQuestion, int questionIndex, String questionType, String questionDescription, String questionDoneStatus, String questionDifficulty, String questionModule)`","lastModifiedDate":"2023-10-24"},{"lineNumber":259,"author":{"gitId":"StevenGX12"},"content":"- `private void parseQuestionsFromStrings(ArrayList\u003cString\u003e rawQuestions, QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":260,"author":{"gitId":"StevenGX12"},"content":"- `public void buildCurrentListFromFile(QuestionList questions)`","lastModifiedDate":"2023-10-24"},{"lineNumber":261,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":262,"author":{"gitId":"StevenGX12"},"content":"The general idea is that when the program is first initiated, the `loadData` method is called from within the `Ui` class, which passes in an empty `QuestionList`. Within the method itself, the helper method `buildCurrentListFromFile()` will take in this empty `QuestionList` object and populate it with `question` objects according to textual information stored within the specified file. This is done by first extracting each question stored line by line into a new `Arraylist\u003cString\u003e rawQuestions`, then calling another helper method `parseQuestionsFromStrings()` to add each question into the `QuestionList` via a third helper method `addQuestionFromFileaddQuestionFromFile`.","lastModifiedDate":"2023-10-24"},{"lineNumber":263,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":"The process is refactored into these methods to avoid deep nesting of code to achieve clearer logical flow and more readability and easier debugging process.","lastModifiedDate":"2023-10-28"},{"lineNumber":265,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":266,"author":{"gitId":"StevenGX12"},"content":"### Updating data","lastModifiedDate":"2023-10-24"},{"lineNumber":267,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":268,"author":{"gitId":"StevenGX12"},"content":"The process of updating data is done in a similar fashion compared to that of loading data, but in the reverse order logically.","lastModifiedDate":"2023-10-24"},{"lineNumber":269,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":270,"author":{"gitId":"StevenGX12"},"content":"Apart from the main `updateData` method, it involves the use of 2 other helper methods:","lastModifiedDate":"2023-10-24"},{"lineNumber":271,"author":{"gitId":"StevenGX12"},"content":"- `private void writeToFile(String filePath, String textToAdd, boolean toAppend)`","lastModifiedDate":"2023-10-24"},{"lineNumber":272,"author":{"gitId":"StevenGX12"},"content":"- `private void storeQuestionToFile(Question question)`","lastModifiedDate":"2023-10-24"},{"lineNumber":273,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":274,"author":{"gitId":"StevenGX12"},"content":"Upon exiting the program, the `Ui` class will call the `updateData` method and passing in the current `QuestionList` of the program. Within the method, the `writeToFile` helper method is first called to determine whether texts are to replace existing content of the file or to be appended at the back. Then, each question is stored in the appropriate format into the destination file using the method `storeQuestionToFile` which parses a `Question` object into the correct string format for storage.","lastModifiedDate":"2023-10-24"},{"lineNumber":275,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":276,"author":{"gitId":"StevenGX12"},"content":"## UI Component","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"StevenGX12"},"content":"The UI class in the Quizhub application is responsible for handling the user interface interactions in a command-line interface (CLI). It provides methods for displaying messages or questions as well as getting user","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"StevenGX12"},"content":"input.","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"StevenGX12"},"content":"### Constructor","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"StevenGX12"},"content":"#### `public Ui(Storage dataStorage, QuestionList tasks)`","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"StevenGX12"},"content":"- **Parameters:**","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"StevenGX12"},"content":" - `dataStorage`: An instance of the `Storage` class, which handles the storage of quiz data on the hard disk.","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"StevenGX12"},"content":" - `tasks`: An instance of the `QuestionList` class, which represents a record of all questions documented in the application.","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"StevenGX12"},"content":"### Implementation Details","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"StevenGX12"},"content":"#### Overall Flow","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"StevenGX12"},"content":"![](./UML/ui_flow.jpg)","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"StevenGX12"},"content":"When the program is first initiated, the `displayOpeningMessage()` method is called to display a welcome message while also calling the `loadData()` method of the `dataStorage` to display all the questions stored in the storage file if any.","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"spinoandraptos"},"content":"Afterward, in the main loop of the program execution, the `getUserInput()` method is called at the start of the loop to capture user input as a `String` object, which is then used by the `Parser` and various `Command` classes to parse and execute the appropriate commands. This process is terminated only upon execution of a `CommandExit`.","lastModifiedDate":"2023-10-28"},{"lineNumber":298,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"StevenGX12"},"content":"Finally, the `displayClosingMessage()` method is called to display a farewell message while also calling the `updateData()` method of the `dataStorage` to update the data stored in the storage file with the latest ones.","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"StevenGX12"},"content":"#### Displaying Quizzes","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"StevenGX12"},"content":"![](./UML/ui_quiz.jpg)","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"StevenGX12"},"content":"The `Ui` class also has a `displayQuestion(Question question, int currentQuestionIndex, int totalQuestions)` method, which is used to render a question from the list of stored questions in the specific format and prompt the user for an answer when a `CommandStart` is executed to signal the start of a quiz. This method will be called in a loop for each question until the end of the list of questions.","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"spinoandraptos"},"content":"# Product scope","lastModifiedDate":"2023-10-24"},{"lineNumber":308,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":309,"author":{"gitId":"spinoandraptos"},"content":"## Our Product","lastModifiedDate":"2023-10-24"},{"lineNumber":310,"author":{"gitId":"lisizhuang-0121"},"content":"QuizHub","lastModifiedDate":"2023-10-21"},{"lineNumber":311,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":312,"author":{"gitId":"spinoandraptos"},"content":"## Target user profile","lastModifiedDate":"2023-10-24"},{"lineNumber":313,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":314,"author":{"gitId":"lisizhuang-0121"},"content":"Our target users are","lastModifiedDate":"2023-10-21"},{"lineNumber":315,"author":{"gitId":"lisizhuang-0121"},"content":"* NUS Students preparing for exams","lastModifiedDate":"2023-10-21"},{"lineNumber":316,"author":{"gitId":"lisizhuang-0121"},"content":"* Like to take notes in class","lastModifiedDate":"2023-10-21"},{"lineNumber":317,"author":{"gitId":"lisizhuang-0121"},"content":"* Fear to miss out of important knowledge","lastModifiedDate":"2023-10-21"},{"lineNumber":318,"author":{"gitId":"lisizhuang-0121"},"content":"* Like to test their understanding of knowledge","lastModifiedDate":"2023-10-21"},{"lineNumber":319,"author":{"gitId":"lisizhuang-0121"},"content":"* Want to be better prepared for exams","lastModifiedDate":"2023-10-21"},{"lineNumber":320,"author":{"gitId":"lisizhuang-0121"},"content":"* Majoring in computing or engineering where there are lots of exams","lastModifiedDate":"2023-10-21"},{"lineNumber":321,"author":{"gitId":"lisizhuang-0121"},"content":"* Coders and tech geeks who enjoy using the CLI interface","lastModifiedDate":"2023-10-21"},{"lineNumber":322,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":323,"author":{"gitId":"spinoandraptos"},"content":"## Value proposition","lastModifiedDate":"2023-10-24"},{"lineNumber":324,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":325,"author":{"gitId":"lisizhuang-0121"},"content":"Allow NUS Students to easily take notes in class and allow them to","lastModifiedDate":"2023-10-21"},{"lineNumber":326,"author":{"gitId":"lisizhuang-0121"},"content":"generate quizzes to test their knowledge of understanding. By using the","lastModifiedDate":"2023-10-21"},{"lineNumber":327,"author":{"gitId":"lisizhuang-0121"},"content":"QuizHub application, students can input notes taken in class in a question form,","lastModifiedDate":"2023-10-21"},{"lineNumber":328,"author":{"gitId":"lisizhuang-0121"},"content":"which they could use to take quizzes to ensure their understanding of the topic.","lastModifiedDate":"2023-10-21"},{"lineNumber":329,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":330,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":331,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":332,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":333,"author":{"gitId":"lisizhuang-0121"},"content":"|:-------:|:-------------------------------------:|:---------------------------------------------------------------------------------:|:-------------------------------------------------------------------------:|","lastModifiedDate":"2023-10-21"},{"lineNumber":334,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | New student user | I can access the tutorial on how to operate the app | Easily use the app effectively for my studies |","lastModifiedDate":"2023-10-21"},{"lineNumber":335,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Efficient student | I can add a question and its answer easily to my question and answer bank | Build my question and answer bank quickly |","lastModifiedDate":"2023-10-21"},{"lineNumber":336,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Organized student | I can view all the questions and answers in my question and answer bank | Review my study materials comprehensively |","lastModifiedDate":"2023-10-21"},{"lineNumber":337,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Detail-oriented student | I can edit the content of a question or its answer | Correct any mistakes or make improvements |","lastModifiedDate":"2023-10-21"},{"lineNumber":338,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on clarity | I can delete a question and its answer from my question and answer bank | Maintain a clean and relevant set of questions for revision |","lastModifiedDate":"2023-10-21"},{"lineNumber":339,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on revising for tests | I can start and end a quiz which tests me on questions in my question bank | Consolidate understanding of my learnt knowledge through rigorous testing |","lastModifiedDate":"2023-10-21"},{"lineNumber":340,"author":{"gitId":"lisizhuang-0121"},"content":"| v1.0 | Student focused on revising for tests | I can see my final quiz score and whether I have answered each question correctly | Identify areas of weakness to be improved upon for my tests |","lastModifiedDate":"2023-10-21"},{"lineNumber":341,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking efficiency | I can search for a specific question within a flashcard deck | locate information quickly. |","lastModifiedDate":"2023-10-21"},{"lineNumber":342,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User with diverse interests | I can categorize questions by topic or subject | tailor my quizzes |","lastModifiedDate":"2023-10-21"},{"lineNumber":343,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking variety | I can shuffle the order of questions in a flashcard deck | keep my quizzes engaging. |","lastModifiedDate":"2023-10-21"},{"lineNumber":344,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User aiming for improvement | I can mark a question as \"difficult\" or \"easy\" for later review | optimize my learning. |","lastModifiedDate":"2023-10-21"},{"lineNumber":345,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking a challenge | I can practice questions in a random order | test my knowledge comprehensively. |","lastModifiedDate":"2023-10-21"},{"lineNumber":346,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.0 | User seeking structure | I can practice questions in a sequential order | follow a specific learning path. |","lastModifiedDate":"2023-10-21"},{"lineNumber":347,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user aiming for accuracy | I can see how many questions I\u0027ve answered correctly | track my proficiency. |","lastModifiedDate":"2023-10-21"},{"lineNumber":348,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user tracking progress | I can reset the progress of a specific flashcard deck | start fresh. |","lastModifiedDate":"2023-10-21"},{"lineNumber":349,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | time-conscious user | I can set a timer for each flashcard question during practice | manage my study sessions effectively. |","lastModifiedDate":"2023-10-21"},{"lineNumber":350,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | goal-oriented user | I can view my overall progress and performance statistics | gauge my improvement. |","lastModifiedDate":"2023-10-21"},{"lineNumber":351,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user aiming for improvement | I can see how many questions I\u0027ve answered incorrectly | focus on weak areas. |","lastModifiedDate":"2023-10-21"},{"lineNumber":352,"author":{"gitId":"lisizhuang-0121"},"content":"| v2.1 | user committed to learning | I can review the questions I\u0027ve answered incorrectly | reinforce my knowledge. |","lastModifiedDate":"2023-10-21"},{"lineNumber":353,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":354,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":355,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":356,"author":{"gitId":"spinoandraptos"},"content":"1. Program should work on any typical OS as long as it has Java 11 installed and configured.","lastModifiedDate":"2023-10-28"},{"lineNumber":357,"author":{"gitId":"spinoandraptos"},"content":"2. A user with average or above typing speed for regular English text (not program code) in the CLI should not ","lastModifiedDate":"2023-10-29"},{"lineNumber":358,"author":{"gitId":"spinoandraptos"},"content":"experience any significant delays to their revision as compared to using a GUI program.","lastModifiedDate":"2023-10-29"},{"lineNumber":359,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":360,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":361,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":362,"author":{"gitId":"spinoandraptos"},"content":"1. **Typical OS**: Windows, Linux, Unix, macOS.","lastModifiedDate":"2023-10-28"},{"lineNumber":363,"author":{"gitId":"spinoandraptos"},"content":"2. **CommandType**: The first word input in the CLI, indicates the type of instruction the program should execute.","lastModifiedDate":"2023-10-28"},{"lineNumber":364,"author":{"gitId":"spinoandraptos"},"content":"`e.g. start, delete, short`","lastModifiedDate":"2023-10-28"},{"lineNumber":365,"author":{"gitId":"spinoandraptos"},"content":"3. **Argument**: A parameter word identified by a leading `/`, arguments indicate the start of information","lastModifiedDate":"2023-10-28"},{"lineNumber":366,"author":{"gitId":"spinoandraptos"},"content":"to be extracted from a command in addition to the command type.","lastModifiedDate":"2023-10-28"},{"lineNumber":367,"author":{"gitId":"spinoandraptos"},"content":"4. **Payload**: A sequence of additional information immediately following the command type or arguments, they","lastModifiedDate":"2023-10-28"},{"lineNumber":368,"author":{"gitId":"spinoandraptos"},"content":"provide information for executing complex instructions.","lastModifiedDate":"2023-10-28"},{"lineNumber":369,"author":{"gitId":"spinoandraptos"},"content":"5. **Hierarchical**: Possesses logical sequencing or order, such as in order of decreasing subsets or importance.","lastModifiedDate":"2023-10-28"},{"lineNumber":370,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":371,"author":{"gitId":"-"},"content":"## Instructions for manual testing","lastModifiedDate":"2020-05-24"},{"lineNumber":372,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":373,"author":{"gitId":"spinoandraptos"},"content":"### Launch","lastModifiedDate":"2023-10-28"},{"lineNumber":374,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":375,"author":{"gitId":"spinoandraptos"},"content":"1. Ensure you have Java 11 or above installed in your Computer.","lastModifiedDate":"2023-10-28"},{"lineNumber":376,"author":{"gitId":"spinoandraptos"},"content":"2. Download the latest `tp_version_1.0.jar` from [here](https://github.com/AY2324S1-CS2113-W12-1/tp/releases/download/Version_1_0/tp_version_1.0.jar).","lastModifiedDate":"2023-10-28"},{"lineNumber":377,"author":{"gitId":"spinoandraptos"},"content":"3. Copy the file to the folder you want to use as the home folder for your QuizHub.","lastModifiedDate":"2023-10-28"},{"lineNumber":378,"author":{"gitId":"spinoandraptos"},"content":"4. Open a command terminal, cd into the folder you put the `tp_version_1.0.jar` file in, and use the java -jar ","lastModifiedDate":"2023-10-28"},{"lineNumber":379,"author":{"gitId":"spinoandraptos"},"content":"`tp_version_1.0.jar` command to run the application and launch the CLI.","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"spinoandraptos":144,"StevenGX12":78,"James-Hong-Jey":49,"yeo-menghan":25,"lisizhuang-0121":52,"-":31}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# User Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Introduction","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"QuizHUB is a local desktop app designed to help NUS students easily record examinable questions and generate quizzes","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"from their very own question bank to test their understanding via a Command Line Interface (CLI). Easily launch-able","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":"on the go, QuizHUB is a versatile tool that aims to streamline and optimize the revision experience for NUS students","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"from all fields of study.","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"## Quick Start","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"1. Ensure that you have Java 11 or above installed.","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"2. Down the latest version of `QuizHub` from [here](http://link.to/duke).","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"## Features","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":"1. Helper command","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"yeo-menghan"},"content":"2. Add question/answer and group them in modules/difficulty","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"yeo-menghan"},"content":"3. Stores the question/answer in local storage","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":"4. Delete question/answer","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":"5. Find question/answer via question\u0027s description or via module name","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":"6. Edit question/answer","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":"7. Mark question difficulty","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":"8. Start a quiz session, specifying category of questions and in random/normal mode","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"9. Permanently shuffle questions order for added challenge!","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"### Getting help on using the app: `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":"Assists new users in familiarising with the application. Provides a list of commands for the user to get started","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"with the essentials.","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"yeo-menghan"},"content":"Format: `help`","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"Example of usage:","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"yeo-menghan"},"content":"* **Command**:`help` \u003cbr\u003e","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":"`Here are the list of commands you can use:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":"`1. help - shows the list of commands you can use,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":"`2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and its answer to the list,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"`3. list - shows the list of questions and answers,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":"`4. delete [question number] - deletes the question and answer at the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":"`5. find /[description] - displays all questions that contains the specified description,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":"`6. find /[module] - displays all questions that belong to the specified module,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":"`7. edit [question number] /description [description] - edits the description of the question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":"`8. edit [question number] /answer [answer] - edits the answer to the question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":"`9. start /[quiz mode] [start details] /[qn mode] - starts the quiz with option for /module or /all and /random or /normal,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":"`10. shuffle - shuffle quiz questions to a random order,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":"`11. markdiff [question number] [question difficulty] - sets the difficulty of question with the specified number,` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":"`12. bye - exits the program` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":"* Ver 2.0 will only list commands. Future versions will include auto-filling and scrolling","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"yeo-menghan"},"content":" (multiple pages of the help menu)","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":"### Adding short-answer questions and their answers: `short`","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"yeo-menghan"},"content":"Adds a new short question and its answer to the question and answer bank along with the assigned module and","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":"difficulty level.","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"yeo-menghan"},"content":"Format: `short [question]/[answer]/[module]/[difficulty]`","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"yeo-menghan"},"content":"Example of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `add What is the value of Pi to 2 decimal places?/3.14/math/math` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" `I have added the following question OwO:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" `[S] What is the value of Pi to 2 decimal places? / 3.14 | math | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `add What fish is Nemo based off?/a Clownfish/trivia/easy` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" `I have added the following question OwO:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" `[S][] What fish is Nemo based off? / a Clownfish | trivia | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e ","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"yeo-menghan"},"content":"* If either the question or answer is left blank, the app will prompt you to re-enter the question-answer set,","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"yeo-menghan"},"content":" the app does not support blank questions/answers","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"yeo-menghan"},"content":"### List Questions `list`","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":"List all the questions from the question and answer bank in the storage.","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"yeo-menghan"},"content":"Format: `list`","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"yeo-menghan"},"content":"Examples of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `list` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":83,"author":{"gitId":"yeo-menghan"},"content":" **Output**:\u003cbr\u003e","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" 1: `[S][] 2 / 4 | num | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" 2: `[S][] hi / hihi | word | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" 3: `[S][] 6 / 12 | num | EASY` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":87,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"yeo-menghan"},"content":"### Delete Questions `delete`","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"Deletes the question with the specified question number from the question and answer bank.","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":"`delete [qustion number]`","lastModifiedDate":"2023-10-29"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":"Example of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `delete 2` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" `Roger that! I have deleted the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" `[s][] [question description] / [ansewer] | [module] | [quesiton difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":"Notes:","lastModifiedDate":"2023-10-29"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":"* The program only supports deleting one question at a time, so entering multiple question numbers will result in the program prompting you to enter only 1 question number.","lastModifiedDate":"2023-10-29"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":"* The program accepts only a valid integer question number within the range of the number of available questions, any other form of inputs will result in the program prompting you to re-enter a valid command.","lastModifiedDate":"2023-10-29"},{"lineNumber":104,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"yeo-menghan"},"content":"### Find question/answer `find`","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":"Finds and displays all questions in the question and answer bank that match the criteria (question description / answer) and keywords of the search.","lastModifiedDate":"2023-10-29"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":"Format:","lastModifiedDate":"2023-10-29"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":"1. `find /description [question description]`","lastModifiedDate":"2023-10-29"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":"2. `find /answer [answer]`","lastModifiedDate":"2023-10-29"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":"Examples of usage:","lastModifiedDate":"2023-10-29"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `find /description example description` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":" `Here are questions that matched your search:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":" `1: [S][] EXAMPLE Description / [answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":117,"author":{"gitId":"StevenGX12"},"content":" `2: [S][] example description1 / [answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" `3: [S][] example description 2/ [answer] | [module] | [question difficulty]` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":"* **Command**: `find /answer example answer` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":" `Here are questions that matched your search:` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" `1: [S][] [question description] / EXAMPLE Answer | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" `2: [S][] [question description] / example answer1 | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" `3: [S][] [question description] / example answer 2 | [module] | [question difficulty]` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":"Notes:","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":"* As long as the search keyword string is a substring of the question description / answer of a question stored in the question and answer bank, it will be included in the search result. Please refer to the above examples as an illustration of this property.","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":"* The search is non case-sensitive. Please refer to the above examples as an illustration of this property.","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"yeo-menghan"},"content":"### Edit question/answer `edit`","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":"Edits the description or answer of an existing question in the question and answer bank","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":"by referencing the number of the question in the existing question list in the question","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":"and answer bank.","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":"Format:","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":"1. `edit [question number] /description [newDescription]`","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":"2. `edit [question number] /answer [newAnswer]`","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":"Examples of usage:","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `edit 1 /description change description!!!` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have edited the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" `[S][] change description!!! / [original answer] | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `edit 2 /answer different answer???` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have edited the following question \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / different answer??? | [module] | [question difficulty]` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" `Now you have [no. of questions] questions in the list! UWU` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-29"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":"Notes:","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":"* If either the question number is invalid, or no new description or answer is provided,","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" the app will prompt you to re-enter the edit command","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"* The app only supports changing either description or answer at a time, not both together","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"yeo-menghan"},"content":"### Start quiz `start`","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"yeo-menghan"},"content":"Starts a quiz which fetches the specified category from the question bank in normal / random order to be tested.","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":"The app will display the fetched questions one at a time on CLI and the user is required to enter answer through CLI.","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":"Upon every user answer entry, the app feedbacks if the user answered correctly, loads the next question and updates","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":"the score. When all questions are answered, the quiz terminates automatically and the final user quiz score is displayed.","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":162,"author":{"gitId":"yeo-menghan"},"content":"Format: `start /[quiz mode] [start details] /[qn mode]`","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"yeo-menghan"},"content":"Examples of usage:","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /module num /normal` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions that pertains to module “num” in order defined in the list","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /module num /random` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions that pertains to module “num” but in a randomised order","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /all /random` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions directly from the list of questions in random order","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `start /all /normal` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"spinoandraptos"},"content":" **Output**: starts the quiz - displays questions directly from the list of questions in the order of the list","lastModifiedDate":"2023-10-28"},{"lineNumber":173,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":174,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":175,"author":{"gitId":"yeo-menghan"},"content":"Notes:","lastModifiedDate":"2023-10-27"},{"lineNumber":176,"author":{"gitId":"yeo-menghan"},"content":"* If the specified module is not part of the list, an exception will be thrown and the user will be notified","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"yeo-menghan"},"content":" with a prompt to write the command in the specified format.","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"yeo-menghan"},"content":"### Shuffling Questions `shuffle`","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"yeo-menghan"},"content":"Shuffle questions within question list to a random order,","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":182,"author":{"gitId":"yeo-menghan"},"content":"Format: `shuffle`","lastModifiedDate":"2023-10-27"},{"lineNumber":183,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":184,"author":{"gitId":"yeo-menghan"},"content":"Notes","lastModifiedDate":"2023-10-27"},{"lineNumber":185,"author":{"gitId":"spinoandraptos"},"content":"* Shuffle will not work if there are no questions within the question bank","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":187,"author":{"gitId":"yeo-menghan"},"content":"### Mark difficulty of questions `markdiff`","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"spinoandraptos"},"content":"Changes the difficulty level of an existing question in the question and answer bank","lastModifiedDate":"2023-10-28"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":"by referencing the number of the question in the existing question list in the question","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"spinoandraptos"},"content":"and answer bank.","lastModifiedDate":"2023-10-28"},{"lineNumber":191,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":192,"author":{"gitId":"spinoandraptos"},"content":"Format: `markdiff [question number] [question difficulty]`","lastModifiedDate":"2023-10-28"},{"lineNumber":193,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":194,"author":{"gitId":"spinoandraptos"},"content":"Examples of usage:","lastModifiedDate":"2023-10-28"},{"lineNumber":195,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `markdiff 1 easy` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":196,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":197,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have marked the following question as easy \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":198,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / [original answer] | [module] | EASY` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":199,"author":{"gitId":"spinoandraptos"},"content":"* **Command**: `markdiff 2 Hard` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":200,"author":{"gitId":"spinoandraptos"},"content":" **Output**: \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":201,"author":{"gitId":"spinoandraptos"},"content":" `Roger that! I have marked the following question as hard \u003ew\u003c !` \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":202,"author":{"gitId":"spinoandraptos"},"content":" `[S][] [original description] / [original answer] | [module] | HARD` \u003cbr\u003e \u003cbr\u003e","lastModifiedDate":"2023-10-28"},{"lineNumber":203,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":204,"author":{"gitId":"spinoandraptos"},"content":"Notes:","lastModifiedDate":"2023-10-28"},{"lineNumber":205,"author":{"gitId":"spinoandraptos"},"content":"* If either the question number is invalid, or no difficulty level is provided,","lastModifiedDate":"2023-10-28"},{"lineNumber":206,"author":{"gitId":"spinoandraptos"},"content":" the app will prompt you to re-enter the markdiff command","lastModifiedDate":"2023-10-28"},{"lineNumber":207,"author":{"gitId":"spinoandraptos"},"content":"* The app only supports fixed difficulty levels, assigning any difficulty level that","lastModifiedDate":"2023-10-28"},{"lineNumber":208,"author":{"gitId":"spinoandraptos"},"content":" is not `easy`, `normal`, or `hard` will trigger a warning message","lastModifiedDate":"2023-10-28"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":"* Input difficulty level is CAPS-friendly","lastModifiedDate":"2023-10-28"},{"lineNumber":210,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":211,"author":{"gitId":"yeo-menghan"},"content":"### Exit Program `bye`","lastModifiedDate":"2023-10-27"},{"lineNumber":212,"author":{"gitId":"yeo-menghan"},"content":"Exits the program","lastModifiedDate":"2023-10-27"},{"lineNumber":213,"author":{"gitId":"yeo-menghan"},"content":"Format: `bye`","lastModifiedDate":"2023-10-27"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2020-05-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"**Q**: How do I transfer my data to another computer?","lastModifiedDate":"2020-05-24"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":219,"author":{"gitId":"yeo-menghan"},"content":"**A**: Transfer the tasklist.txt generated to the same local directory as the jar file of the program in another","lastModifiedDate":"2023-10-27"},{"lineNumber":220,"author":{"gitId":"yeo-menghan"},"content":"computer.","lastModifiedDate":"2023-10-27"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"-"},"content":"## Command Summary","lastModifiedDate":"2020-05-24"},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":224,"author":{"gitId":"yeo-menghan"},"content":"1. `help` - shows the list of commands you can use","lastModifiedDate":"2023-10-27"},{"lineNumber":225,"author":{"gitId":"yeo-menghan"},"content":"2. `short [question]/[answer]/[module]/[difficulty]` - adds a short answer question and its answer to the list,","lastModifiedDate":"2023-10-27"},{"lineNumber":226,"author":{"gitId":"yeo-menghan"},"content":"3. `list` - shows the list of questions and answers,","lastModifiedDate":"2023-10-27"},{"lineNumber":227,"author":{"gitId":"yeo-menghan"},"content":"4. `delete [question number]` - deletes the question and answer at the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":228,"author":{"gitId":"spinoandraptos"},"content":"5. `find /[description]` - displays all questions that contains the specified description,","lastModifiedDate":"2023-10-28"},{"lineNumber":229,"author":{"gitId":"yeo-menghan"},"content":"6. `find /[module]` - displays all questions that belong to the specified module,","lastModifiedDate":"2023-10-27"},{"lineNumber":230,"author":{"gitId":"yeo-menghan"},"content":"7. `edit [question number] /description [description]` - edits the description of the question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":231,"author":{"gitId":"yeo-menghan"},"content":"8. `edit [question number] /answer [answer]` - edits the answer to the question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":232,"author":{"gitId":"yeo-menghan"},"content":"9. `start /[quiz mode] [start details] /[qn mode]` - starts the quiz with option for /module or /all and /random or","lastModifiedDate":"2023-10-27"},{"lineNumber":233,"author":{"gitId":"yeo-menghan"},"content":" /normal,","lastModifiedDate":"2023-10-27"},{"lineNumber":234,"author":{"gitId":"yeo-menghan"},"content":"10. `shuffle` - shuffle quiz questions to a random order,","lastModifiedDate":"2023-10-27"},{"lineNumber":235,"author":{"gitId":"yeo-menghan"},"content":"11. `markdiff [question number] [question difficulty]` - sets the difficulty of question with the specified number,","lastModifiedDate":"2023-10-27"},{"lineNumber":236,"author":{"gitId":"yeo-menghan"},"content":"12. `bye` - exits the program","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":100,"StevenGX12":38,"yeo-menghan":76,"-":22}},{"path":"src/main/java/Quizhub.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * The main program running for the Duke chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" * The program bridges the user interface (Ui),","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * hard disk data (dataStorage) and supports","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * dynamic data manipulation.","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"public class Quizhub {","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" private Storage dataStorage;","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private QuestionList questions;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" private Parser parser;","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Initiates the program with the necessary components.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath File location where data is","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * written to and read from by the program.","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" public Quizhub(String filePath){","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" dataStorage \u003d new Storage(filePath);","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":" questions \u003d new QuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" ui \u003d new Ui(dataStorage, questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * Starts the chatbot by showing opening message.","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * Chatbot repeatedly handles user commands","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" * until it is requested to terminate.","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Chatbot closes by showing closing message.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" public void run(){","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" ui.displayOpeningMessage();","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" boolean toExit \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" while(!toExit){","lastModifiedDate":"2023-10-04"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" String fullCommand \u003d ui.getUserInput();","lastModifiedDate":"2023-10-21"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" ui.showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d parser.parseCommand(fullCommand);","lastModifiedDate":"2023-10-04"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" toExit \u003d command.toExit();","lastModifiedDate":"2023-10-04"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":" command.executeCommand(ui, dataStorage, questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" if(!toExit){","lastModifiedDate":"2023-10-04"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" ui.showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" ui.displayClosingMessage();","lastModifiedDate":"2023-10-04"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public static void main(String[] args) {","lastModifiedDate":"2023-10-04"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" new Quizhub(\"tasklist.txt\").run();","lastModifiedDate":"2023-10-08"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":46,"James-Hong-Jey":5,"lisizhuang-0121":4}},{"path":"src/main/java/quizhub/command/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a user command to execute an action.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":" public enum CommandType {HELP, ADD, LIST, EDIT, DELETE, START,","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" SHUFFLE, MARKDIFFICULTY, END, RESULT, FIND, EXIT, INVALID};","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" private CommandType commandType;","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new blank command.","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public Command(){}","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new command of given type.","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * @param commandType Type of command.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" public Command(CommandType commandType){","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" this.commandType \u003d commandType;","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Performs an action according to command.","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing question data.","lastModifiedDate":"2023-10-08"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){}","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Checks if the latest command calls for program termination.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" public boolean toExit(){","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" return commandType \u003d\u003d CommandType.EXIT;","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":31,"James-Hong-Jey":5,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/command/CommandDelete.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to delete a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandDelete extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as delete [question number]\";","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate question index :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" private int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new delete command for a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnIndex 0-based index of question to be deleted.","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandDelete(int qnIndex){","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.DELETE);","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" * Checks if specified task exists.","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" * Deletes the specified task and updates storage data.","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" String taskName \u003d questions.viewQuestionByIndex(qnIndex);","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" if (taskName.equals(\"Question Not Found\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" ui.displayMessage(\" Ono! The question you are deleting is not found!\");","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" questions.deleteQuestionByIndex(qnIndex);","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":21,"James-Hong-Jey":7,"lisizhuang-0121":13}},{"path":"src/main/java/quizhub/command/CommandEdit.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to edit a task.","lastModifiedDate":"2023-10-08"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandEdit extends Command {","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as edit [question number] \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" \"/description [description] or edit /answer [answer]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate question index :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_CRITERIA_MSG \u003d \" Ono! You did not indicate if \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" \"you are editing question description or answer :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":" public static final String MISSING_KEYWORD_MSG \u003d \" Ono! You did not enter a new description / answer :\u003c\";","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" private String newDescription;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" private String newAnswer;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new edit command","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput User input from CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" public CommandEdit(int qnIndex, String newDescription, String newAnswer) {","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.EDIT);","lastModifiedDate":"2023-10-05"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" this.newDescription \u003d newDescription;","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" this.newAnswer \u003d newAnswer;","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-05"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" if (newDescription \u003d\u003d null \u0026\u0026 newAnswer \u003d\u003d null) {","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" questions.editQuestionByIndex(qnIndex, newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":10,"StevenGX12":5,"James-Hong-Jey":5,"lisizhuang-0121":20}},{"path":"src/main/java/quizhub/command/CommandExit.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to exit the program.","lastModifiedDate":"2023-10-04"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"public class CommandExit extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new exit command to terminate program.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" public CommandExit() {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.EXIT);","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":11,"lisizhuang-0121":1}},{"path":"src/main/java/quizhub/command/CommandFind.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to search for a task.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandFind extends Command{","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_CRITERIA_MSG \u003d \" Ono! You did not indicate \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" \"if you are searching by description or module :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_KEYWORD_MSG \u003d \" Ono! You did not indicate \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" \"the keywords you are searching by :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as find \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":" \"/description [description] or find /module [module]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" private String searchCriteria;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" private String searchDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new find command to search for a task.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param searchDetails User input containing details of what to search.","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandFind(String searchCriteria, String searchDetails){","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" super((CommandType.FIND));","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" this.searchCriteria \u003d searchCriteria;","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" this.searchDetails \u003d searchDetails;","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * Checks if specified task exists.","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * Marks the specified task as not done and updates storage data.","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"StevenGX12"},"content":" assert questions !\u003d null \u0026\u0026 dataStorage !\u003d null \u0026\u0026 ui !\u003d null : \"Invalid null parameter\";","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" switch (searchCriteria) {","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"lisizhuang-0121"},"content":" case \"description\":","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" questions.searchListByDescription(searchDetails);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" case \"module\":","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":" questions.searchListByModule(searchDetails);","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" default:","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" ui.displayMessage(INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":24,"StevenGX12":1,"James-Hong-Jey":6,"lisizhuang-0121":21}},{"path":"src/main/java/quizhub/command/CommandHelp.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandHelp extends Command{","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandHelp() {","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.HELP);","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":" * Displays all commands available to the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":" * ","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-05"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" assert questions !\u003d null \u0026\u0026 dataStorage !\u003d null \u0026\u0026 ui !\u003d null : \"Invalid null parameter\";","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":8,"James-Hong-Jey":2,"lisizhuang-0121":13}},{"path":"src/main/java/quizhub/command/CommandInvalid.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents an invalid command to be handled.","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandInvalid extends Command {","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public String feedback;","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new invalid command with error feedback for user.","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandInvalid(String feedback) {","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.INVALID);","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" this.feedback \u003d feedback;","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Displays the error feedback on CLI for user.","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" @Override","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" ui.showInvalidCommandHelp(feedback);","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"spinoandraptos":9,"lisizhuang-0121":17}},{"path":"src/main/java/quizhub/command/CommandList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to list all tasks.","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class CommandList extends Command {","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new list command to list all tasks.","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" public CommandList(){","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.LIST);","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" * Prints all tasks in current task list.","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" questions.printQuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":20,"James-Hong-Jey":4,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/command/CommandMarkDifficulty.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * Represents a command to mark the difficulty of a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"public class CommandMarkDifficulty extends Command{","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_INDEX_MSG \u003d \" Ono! You did not indicate index of question to be marked :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String MISSING_DIFFICULTY_MSG \u003d \" Ono! You did not indicate difficulty \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":" \"to be assigned the question :\u003c\";","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as markdiff \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" \"[qn number] [qn difficulty]!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public static final String TOO_MANY_ARGUMENTS_MSG \u003d \" Ono! Markdiff command only takes in 2 arguments\";","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" private final int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" private final Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new command to mark the difficulty of a question of specified index.","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param qnIndex Index of the question which difficulty is to be marked.","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty to be assigned to the question.","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" public CommandMarkDifficulty(int qnIndex, Question.QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.MARKDIFFICULTY);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" this.qnIndex \u003d qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" assert qnDifficulty !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" if(qnDifficulty !\u003d Question.QnDifficulty.INVALID) {","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" questions.markQuestionDifficulty(qnIndex, qnDifficulty, true);","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":35,"lisizhuang-0121":4}},{"path":"src/main/java/quizhub/command/CommandShortAnswer.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" * Represents a command to add a quiz question.","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"public class CommandShortAnswer extends Command {","lastModifiedDate":"2023-10-08"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" \"short [question]/[answer]/[module]/[difficulty]!\";","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String MISSING_FIELDS_MSG \u003d \" You have one or more field missing!\";","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yeo-menghan"},"content":" public static final String TOO_MANY_ARGUMENTS_MSG \u003d \" Ono! There should not be arguments after /difficulty\";","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"yeo-menghan"},"content":" public static final String DUPLICATED_INPUT \u003d \" You have a duplicated input, please fill add a different input!\";","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"yeo-menghan"},"content":" public static final String INVALID_DIFFICULTY_MSG \u003d \" Entry will not be added to list\";","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" private final String description;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private final String answer;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"lisizhuang-0121"},"content":" private final String module;","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"lisizhuang-0121"},"content":" private final Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"James-Hong-Jey"},"content":" * Creates a new question command to add a SHORTANSWER question","lastModifiedDate":"2023-10-08"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" * @param description Question description","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" * @param answer answer to question","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" * @param module module of question","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDifficulty difficulty of question","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" public CommandShortAnswer(String description, String answer, String module,","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.ADD);","lastModifiedDate":"2023-10-05"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" this.description \u003d description;","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" * Adds the SHORTANSWER question and updates storage data.","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing task data.","lastModifiedDate":"2023-10-04"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-04"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" questions.addShortAnswerQn(description, answer, module, qnDifficulty, true);","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" dataStorage.updateData(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":15,"James-Hong-Jey":13,"yeo-menghan":3,"lisizhuang-0121":20}},{"path":"src/main/java/quizhub/command/CommandShuffle.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-21"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"public class CommandShuffle extends Command {","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" public CommandShuffle() {","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" super(CommandType.SHUFFLE);","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" questions.shuffleQuestions();","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"spinoandraptos":3,"James-Hong-Jey":12}},{"path":"src/main/java/quizhub/command/CommandStart.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"import java.util.Collections;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"yeo-menghan"},"content":"/**","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":" * Command to Start the Quiz","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"public class CommandStart extends Command{","lastModifiedDate":"2023-10-05"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QUIZ_MODE_MSG \u003d \" Ono! You did not indicate mode of the quiz :\u003c \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() + \" Quiz mode must be either \u0027all\u0027 or \u0027module\u0027\";","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_START_DETAILS \u003d \" Ono! You did not indicate start details for the quiz \" +","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" \"mode that you have chosen :\u003c\";","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QN_MODE_MSG \u003d \" Ono! You did not indicate mode of arranging \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" \"quiz questions :\u003c\";","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_MODE_MSG \u003d \" Question mode must be either \u0027random\u0027 or \u0027normal\u0027\";","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" public static final String INVALID_FORMAT_MSG \u003d \" Please format your input as start \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" \"/[quiz mode] [start details] /[qn mode]!\";","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" public static final String TOO_MANY_ARGUMENTS_MSG \u003d \" Ono! There should not be arguments after /[qn mode]\";","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private final String startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final String startDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" private final String startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new start command","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" * @param startMode Mode to start the quiz with, indicates how questions for the quiz are selected.","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * @param startDetails Details to complement quiz mode for choosing questions for the quiz.","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" * @param startQnMode Mode for arranging the questions within the quiz.","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" public CommandStart(String startMode, String startDetails, String startQnMode) {","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" super(CommandType.START);","lastModifiedDate":"2023-10-05"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" this.startMode \u003d startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" this.startDetails \u003d startDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" this.startQnMode \u003d startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":42,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":43,"author":{"gitId":"yeo-menghan"},"content":" * Loop through the array list of questions \u0026 allow the user to answer them.","lastModifiedDate":"2023-10-09"},{"lineNumber":44,"author":{"gitId":"yeo-menghan"},"content":" * If the input given matches EXACTLY (v1.0), then the answer is correct","lastModifiedDate":"2023-10-09"},{"lineNumber":45,"author":{"gitId":"yeo-menghan"},"content":" * returns \"Correct\" or \"Wrong\"","lastModifiedDate":"2023-10-09"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" * @param ui User interface for interactions with user through CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" * @param questions Current question list in the program.","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage Hard disk storage for storing question data.","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-21"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public void executeCommand(Ui ui, Storage dataStorage, QuestionList questions) {","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" assert questions !\u003d null \u0026\u0026 ui !\u003d null \u0026\u0026 dataStorage !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"yeo-menghan"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions;","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" switch (startMode.toLowerCase()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" case \"module\":","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" assert startDetails !\u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String[] modules \u003d startDetails.split(\" \");","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" matchedQuestions \u003d questions.categoriseListByModule(modules);","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" case \"all\":","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"yeo-menghan"},"content":" matchedQuestions \u003d questions.getAllQns();","lastModifiedDate":"2023-10-23"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Please enter a valid quiz mode :\u003c\");","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-23"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":71,"author":{"gitId":"yeo-menghan"},"content":" switch(startQnMode.toLowerCase()){","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"yeo-menghan"},"content":" case \"random\":","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"yeo-menghan"},"content":" Collections.shuffle(matchedQuestions); // shuffles matched Questions","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"yeo-menghan"},"content":" questions.startQuiz(ui, matchedQuestions);","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yeo-menghan"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yeo-menghan"},"content":" case \"normal\":","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yeo-menghan"},"content":" questions.startQuiz(ui, matchedQuestions);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"yeo-menghan"},"content":" break;","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yeo-menghan"},"content":" default:","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Please enter a valid quiz mode :\u003c\");","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":84,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"spinoandraptos":41,"yeo-menghan":28,"James-Hong-Jey":1,"lisizhuang-0121":14}},{"path":"src/main/java/quizhub/exception/QuizHubExceptions.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.exception;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"/**","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":" * Represents non-standard exceptions thrown by this program specifically.","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class QuizHubExceptions extends Exception{","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"lisizhuang-0121"},"content":" public QuizHubExceptions(String message) {","lastModifiedDate":"2023-10-05"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":" super(message);","lastModifiedDate":"2023-10-05"},{"lineNumber":8,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-05"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-05"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"lisizhuang-0121":10}},{"path":"src/main/java/quizhub/logger/CustomLogger.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"package quizhub.logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"yeo-menghan"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"yeo-menghan"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"yeo-menghan"},"content":"public class CustomLogger {","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":" private static final Logger logger \u003d Logger.getLogger(CustomLogger.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":" // Log a message at the INFO level","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"yeo-menghan"},"content":" public static void info(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.INFO, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"yeo-menghan"},"content":" // Log a message at the WARNING level","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"yeo-menghan"},"content":" public static void warning(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.WARNING, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"yeo-menghan"},"content":" // Log an error message at the SEVERE level","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":" public static void error(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":" logger.log(Level.SEVERE, message);","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" // Log an error message in greater detail","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" public static void fineError(String message) {","lastModifiedDate":"2023-10-21"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":" logger.log(Level.FINE, message);","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"yeo-menghan"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"yeo-menghan":23,"James-Hong-Jey":5}},{"path":"src/main/java/quizhub/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.parser;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandExit;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandInvalid;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandList;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandShortAnswer;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandStart;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandEdit;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandDelete;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandFind;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandShuffle;","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandMarkDifficulty;","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.command.CommandHelp;","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Represents a parser that converts user inputs into command objects.","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"public class Parser {","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" * Analyses and extracts relevant information from user input","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" * to create a new Command object of the right type.","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput The full user CLI input.","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" public static Command parseCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" String[] commandTokens \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" if (commandTokens.length \u003d\u003d 0) {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" String commandTitle \u003d commandTokens[0];","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" switch (commandTitle) {","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" case \"bye\":","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" return new CommandExit();","lastModifiedDate":"2023-10-04"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" case \"list\":","lastModifiedDate":"2023-10-04"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" return new CommandList();","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":" case \"short\":","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" return parseShortAnswerCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" case \"start\":","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" return parseStartCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" case \"edit\":","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" return parseEditCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" case \"delete\":","lastModifiedDate":"2023-10-04"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" return parseDeleteCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" case \"find\":","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"lisizhuang-0121"},"content":" return parseFindCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" case \"shuffle\":","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"James-Hong-Jey"},"content":" return new CommandShuffle();","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" case \"markdiff\":","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"lisizhuang-0121"},"content":" return parseMarkDiffCommand(userInput);","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" case \"help\":","lastModifiedDate":"2023-10-08"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" return new CommandHelp();","lastModifiedDate":"2023-10-08"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-04"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":62,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (NumberFormatException | ArrayIndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (Exception error) {","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_COMMAND_FEEDBACK);","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Extracts relevant information after a specified keyword","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * from CLI user input.","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput The full user CLI input.","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" * @param keyWord The keyword used to partition the user input.","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" public static String getContentAfterKeyword(String userInput, String keyWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":" throws ArrayIndexOutOfBoundsException {","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String content;","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" content \u003d userInput.split(keyWord)[1].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" if (content.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" throw new ArrayIndexOutOfBoundsException();","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" return content;","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * Extracts difficulty from user command to assign to a question.","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * Default invalid difficulty is assigned if invalid difficulty given.","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" * @param difficulty The difficulty level defined by user in CLI.","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" public static Question.QnDifficulty extractQuestionDifficulty(String difficulty) {","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" switch (difficulty.toLowerCase()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" case \"easy\":","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.EASY;","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" case \"hard\":","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.HARD;","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" case \"normal\":","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(Ui.INVALID_QUESTION_DIFFICULTY_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" return Question.QnDifficulty.INVALID;","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Short Answer Command","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Short Answer command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseShortAnswerCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"yeo-menghan"},"content":" String description;","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"yeo-menghan"},"content":" String answer;","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"yeo-menghan"},"content":" String module;","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"yeo-menghan"},"content":" String difficulty;","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":117,"author":{"gitId":"yeo-menghan"},"content":" // Split the input by \u0027short\u0027 and then by \u0027/\u0027 to separate the parts","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"lisizhuang-0121"},"content":" String[] inputTokens \u003d userInput.split(\"short\")[1].strip().split(\"/\");","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"yeo-menghan"},"content":" // Check if there are exactly 4 parts (description, answer, module, difficulty)","lastModifiedDate":"2023-10-29"},{"lineNumber":121,"author":{"gitId":"yeo-menghan"},"content":" if (inputTokens.length \u003e 4) {","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"yeo-menghan"},"content":" return new CommandInvalid(CommandShortAnswer.TOO_MANY_ARGUMENTS_MSG);","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"yeo-menghan"},"content":" // Extract the values for description, answer, module, and difficulty","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"yeo-menghan"},"content":" description \u003d inputTokens[0].strip();","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"yeo-menghan"},"content":" answer \u003d inputTokens[1].strip();","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"yeo-menghan"},"content":" module \u003d inputTokens[2].strip();","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"yeo-menghan"},"content":" difficulty \u003d inputTokens[3].strip();","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"lisizhuang-0121"},"content":" if (description.isEmpty() || answer.isEmpty() || module.isEmpty() || difficulty.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":132,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandShortAnswer.MISSING_FIELDS_MSG +","lastModifiedDate":"2023-10-25"},{"lineNumber":133,"author":{"gitId":"lisizhuang-0121"},"content":" System.lineSeparator() + CommandShortAnswer.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":134,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":135,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty \u003d extractQuestionDifficulty(difficulty);","lastModifiedDate":"2023-10-25"},{"lineNumber":137,"author":{"gitId":"yeo-menghan"},"content":" if(qnDifficulty.equals(Question.QnDifficulty.INVALID)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"yeo-menghan"},"content":" return new CommandInvalid(CommandShortAnswer.INVALID_DIFFICULTY_MSG);","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandShortAnswer(description, answer, module, qnDifficulty);","lastModifiedDate":"2023-10-25"},{"lineNumber":141,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandShortAnswer.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":145,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":146,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":148,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Delete Command","lastModifiedDate":"2023-10-25"},{"lineNumber":149,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":150,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":151,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Delete command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":152,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseDeleteCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"lisizhuang-0121"},"content":" int qnIndex;","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"lisizhuang-0121"},"content":" String[] editDetails;","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"lisizhuang-0121"},"content":" editDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"lisizhuang-0121"},"content":" qnIndex \u003d Integer.parseInt(editDetails[1].strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandDelete(qnIndex);","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":162,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandDelete.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":168,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Find Command","lastModifiedDate":"2023-10-25"},{"lineNumber":171,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":172,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Find command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":174,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":175,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseFindCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":176,"author":{"gitId":"lisizhuang-0121"},"content":" String searchCriteria;","lastModifiedDate":"2023-10-25"},{"lineNumber":177,"author":{"gitId":"lisizhuang-0121"},"content":" String searchKeyword;","lastModifiedDate":"2023-10-25"},{"lineNumber":178,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":179,"author":{"gitId":"lisizhuang-0121"},"content":" searchCriteria \u003d userInput.split(\"/\")[1].strip().split(\" \")[0].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":180,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":181,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandFind.MISSING_CRITERIA_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"lisizhuang-0121"},"content":" try{","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"lisizhuang-0121"},"content":" searchKeyword \u003d userInput.split(\"/\" + searchCriteria)[1].strip();","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandInvalid(CommandFind.MISSING_KEYWORD_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-25"},{"lineNumber":188,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-25"},{"lineNumber":189,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"lisizhuang-0121"},"content":" return new CommandFind(searchCriteria, searchKeyword);","lastModifiedDate":"2023-10-25"},{"lineNumber":191,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":192,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":193,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":194,"author":{"gitId":"James-Hong-Jey"},"content":" * Attempt to parse user input into an Edit Command","lastModifiedDate":"2023-10-26"},{"lineNumber":195,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":196,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":197,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Edit command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":198,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":199,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseEditCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":200,"author":{"gitId":"StevenGX12"},"content":" String[] editDetails;","lastModifiedDate":"2023-10-26"},{"lineNumber":201,"author":{"gitId":"StevenGX12"},"content":" String editCriteria;","lastModifiedDate":"2023-10-26"},{"lineNumber":202,"author":{"gitId":"StevenGX12"},"content":" int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"StevenGX12"},"content":" String newDescription \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":204,"author":{"gitId":"StevenGX12"},"content":" String newAnswer \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":205,"author":{"gitId":"StevenGX12"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"StevenGX12"},"content":" editDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":207,"author":{"gitId":"StevenGX12"},"content":" qnIndex \u003d Integer.parseInt(editDetails[1].strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":208,"author":{"gitId":"StevenGX12"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":211,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"StevenGX12"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"StevenGX12"},"content":" editCriteria \u003d editDetails[2].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_CRITERIA_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"StevenGX12"},"content":" try{","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"StevenGX12"},"content":" switch (editCriteria){","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"StevenGX12"},"content":" case \"/description\":","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"StevenGX12"},"content":" newDescription \u003d Parser.getContentAfterKeyword(userInput, \"/description\");","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"StevenGX12"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"StevenGX12"},"content":" case \"/answer\":","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"StevenGX12"},"content":" newAnswer \u003d Parser.getContentAfterKeyword(userInput, \"/answer\");","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"StevenGX12"},"content":" break;","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"StevenGX12"},"content":" default:","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"StevenGX12"},"content":" throw new ArrayIndexOutOfBoundsException();","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"StevenGX12"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"StevenGX12"},"content":" return new CommandInvalid(CommandEdit.MISSING_KEYWORD_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"StevenGX12"},"content":" CommandEdit.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":235,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":236,"author":{"gitId":"StevenGX12"},"content":" return new CommandEdit(qnIndex, newDescription, newAnswer);","lastModifiedDate":"2023-10-26"},{"lineNumber":237,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":238,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":239,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":240,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Start Quiz Command","lastModifiedDate":"2023-10-25"},{"lineNumber":241,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":242,"author":{"gitId":"spinoandraptos"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Start Quiz command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":244,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":245,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseStartCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":246,"author":{"gitId":"spinoandraptos"},"content":" String startMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"spinoandraptos"},"content":" String startDetails \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"spinoandraptos"},"content":" String startQnMode;","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"spinoandraptos"},"content":" String[] commandDetails \u003d userInput.split(\"/\");","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"spinoandraptos"},"content":" String startInfo;","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"spinoandraptos"},"content":" startInfo \u003d commandDetails[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"spinoandraptos"},"content":" startMode \u003d startInfo.split(\" \")[0].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QUIZ_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":256,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"spinoandraptos"},"content":" if(!startMode.equalsIgnoreCase(\"all\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"spinoandraptos"},"content":" startDetails \u003d startInfo.split(startMode)[1].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"spinoandraptos"},"content":" if(startDetails.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_START_DETAILS + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":263,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_START_DETAILS + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":268,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":269,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"spinoandraptos"},"content":" // Reads in /random or /normal","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"spinoandraptos"},"content":" startQnMode \u003d commandDetails[2].split(\" \")[0].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"spinoandraptos"},"content":" if (startQnMode.isEmpty()) {","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QN_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":275,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":276,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"spinoandraptos"},"content":" if (!startQnMode.equals(\"random\") \u0026\u0026 !startQnMode.equals(\"normal\")) {","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"spinoandraptos"},"content":" throw new IllegalArgumentException(CommandStart.INVALID_MODE_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"spinoandraptos"},"content":" if(commandDetails[2].split(\" \").length !\u003d 1){","lastModifiedDate":"2023-10-27"},{"lineNumber":281,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.TOO_MANY_ARGUMENTS_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":282,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":283,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":284,"author":{"gitId":"spinoandraptos"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(e.getMessage() + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-27"},{"lineNumber":288,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandStart.MISSING_QN_MODE_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":289,"author":{"gitId":"spinoandraptos"},"content":" CommandStart.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":290,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"spinoandraptos"},"content":" return new CommandStart(startMode, startDetails, startQnMode);","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":293,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":294,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":295,"author":{"gitId":"lisizhuang-0121"},"content":" * Attempt to parse user input into a Mark Difficulty Command","lastModifiedDate":"2023-10-25"},{"lineNumber":296,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-25"},{"lineNumber":297,"author":{"gitId":"lisizhuang-0121"},"content":" * @param userInput Raw command entered by the user","lastModifiedDate":"2023-10-25"},{"lineNumber":298,"author":{"gitId":"lisizhuang-0121"},"content":" * @return Mark Difficulty command or an Invalid Command","lastModifiedDate":"2023-10-25"},{"lineNumber":299,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":300,"author":{"gitId":"lisizhuang-0121"},"content":" private static Command parseMarkDiffCommand(String userInput) {","lastModifiedDate":"2023-10-25"},{"lineNumber":301,"author":{"gitId":"spinoandraptos"},"content":" String[] commandDetails \u003d userInput.split(\" \");","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"spinoandraptos"},"content":" int qnIndex;","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"spinoandraptos"},"content":" Question.QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"spinoandraptos"},"content":" String qnIndexString;","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"spinoandraptos"},"content":" String qnDifficultyString;","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"spinoandraptos"},"content":" qnIndexString \u003d commandDetails[1].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":308,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":309,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.MISSING_INDEX_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"spinoandraptos"},"content":" CommandMarkDifficulty.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":312,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":313,"author":{"gitId":"spinoandraptos"},"content":" qnIndex \u003d Integer.parseInt(qnIndexString);","lastModifiedDate":"2023-10-26"},{"lineNumber":314,"author":{"gitId":"spinoandraptos"},"content":" if(qnIndex \u003c 0){","lastModifiedDate":"2023-10-26"},{"lineNumber":315,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":316,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":317,"author":{"gitId":"spinoandraptos"},"content":" } catch (NumberFormatException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":318,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(Ui.INVALID_INTEGER_INDEX_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":319,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":320,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-26"},{"lineNumber":321,"author":{"gitId":"spinoandraptos"},"content":" qnDifficultyString \u003d commandDetails[2].strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":322,"author":{"gitId":"spinoandraptos"},"content":" } catch (ArrayIndexOutOfBoundsException incompleteCommand) {","lastModifiedDate":"2023-10-26"},{"lineNumber":323,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.MISSING_DIFFICULTY_MSG);","lastModifiedDate":"2023-10-26"},{"lineNumber":324,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":325,"author":{"gitId":"spinoandraptos"},"content":" if(commandDetails.length !\u003d 3){","lastModifiedDate":"2023-10-27"},{"lineNumber":326,"author":{"gitId":"spinoandraptos"},"content":" return new CommandInvalid(CommandMarkDifficulty.TOO_MANY_ARGUMENTS_MSG + System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":327,"author":{"gitId":"spinoandraptos"},"content":" CommandMarkDifficulty.INVALID_FORMAT_MSG);","lastModifiedDate":"2023-10-27"},{"lineNumber":328,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":329,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d Parser.extractQuestionDifficulty(qnDifficultyString);","lastModifiedDate":"2023-10-26"},{"lineNumber":330,"author":{"gitId":"spinoandraptos"},"content":" return new CommandMarkDifficulty(qnIndex, qnDifficulty);","lastModifiedDate":"2023-10-26"},{"lineNumber":331,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":332,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":143,"StevenGX12":36,"James-Hong-Jey":20,"yeo-menghan":24,"lisizhuang-0121":109}},{"path":"src/main/java/quizhub/question/Question.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.question;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents all questions in the question list in general.","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class Question {","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":" public enum QnType {SHORTANSWER, DEFAULT};","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" public enum QnDifficulty {EASY, HARD, NORMAL, INVALID};","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" private QnType qnType;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" private QnDifficulty qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" private String description;","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" private boolean done;","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":" private String module;","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a blank description,","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" * not done status, default question type and normal difficulty..","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" public Question(){","lastModifiedDate":"2023-10-05"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" description \u003d \"\";","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" qnType \u003d QnType.DEFAULT;","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-08"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * not done status, default task type and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":" public Question(String questionBody){","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" qnType \u003d QnType.DEFAULT;","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" * not done status, given question type and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType){","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-04"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":" module \u003d \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" * not done status, given question type, and given module and normal difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":" * @param module Module given to the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType, String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"StevenGX12"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"StevenGX12"},"content":" done \u003d false;","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"StevenGX12"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-21"},{"lineNumber":65,"author":{"gitId":"StevenGX12"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-21"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" qnDifficulty \u003d QnDifficulty.NORMAL;","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question with a given description,","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" * not done status. given question type, given module,","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * and given difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" * @param questionBody Description given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" * @param qnType Type given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" * @param module Module given to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty level assigned to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" public Question(String questionBody, QnType qnType, String module, QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" this.description \u003d questionBody;","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" this.qnType \u003d qnType;","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" this.module \u003d module;","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" * Mark a question as done.","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" public void markAsDone(){","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" done \u003d true;","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" * Mark a question as not done.","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" public void markAsNotDone(){","lastModifiedDate":"2023-10-21"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" done \u003d false;","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" * Checks if a question has been done.","lastModifiedDate":"2023-10-08"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" public boolean questionIsDone(){","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" return done;","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" * Returns question description.","lastModifiedDate":"2023-10-08"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionDescription(){","lastModifiedDate":"2023-10-08"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" return description;","lastModifiedDate":"2023-10-04"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" * Returns question timing details.","lastModifiedDate":"2023-10-08"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":115,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionTiming(boolean useDefaultTiming){","lastModifiedDate":"2023-10-08"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-04"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" * Returns task type.","lastModifiedDate":"2023-10-04"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" public QnType getQuestionType(){","lastModifiedDate":"2023-10-21"},{"lineNumber":122,"author":{"gitId":"James-Hong-Jey"},"content":" return qnType;","lastModifiedDate":"2023-10-08"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":" * Returns module.","lastModifiedDate":"2023-10-21"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" public String getModule(){","lastModifiedDate":"2023-10-21"},{"lineNumber":129,"author":{"gitId":"StevenGX12"},"content":" return module;","lastModifiedDate":"2023-10-21"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":132,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":133,"author":{"gitId":"StevenGX12"},"content":" * Returns question details in a string.","lastModifiedDate":"2023-10-21"},{"lineNumber":134,"author":{"gitId":"StevenGX12"},"content":" * @param newDescription New description of the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":135,"author":{"gitId":"StevenGX12"},"content":" * @param newAnswer New answer of the question.","lastModifiedDate":"2023-10-21"},{"lineNumber":136,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestion(String newDescription, String newAnswer){","lastModifiedDate":"2023-10-08"},{"lineNumber":138,"author":{"gitId":"StevenGX12"},"content":" if(!newDescription.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" this.description \u003d newDescription;","lastModifiedDate":"2023-10-08"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" * Returns question details in a string.","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty New difficulty level of the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" public void markDifficulty (QnDifficulty qnDifficulty) {","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" this.qnDifficulty \u003d qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" * Returns question difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" public QnDifficulty getDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" return qnDifficulty;","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":111,"StevenGX12":33,"James-Hong-Jey":8,"lisizhuang-0121":3}},{"path":"src/main/java/quizhub/question/ShortAnsQn.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.question;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":" * Represents Short Answer Questions. This means answers are a simple string.","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"public class ShortAnsQn extends Question {","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":" private String answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question of type SHORTANSWER with specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * @param description Question description.","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" * @param answer Question answer.","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" * @param module Question module.","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":" public ShortAnsQn(String description, String answer, String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" super(description, QnType.SHORTANSWER, module);","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new question of type SHORTANSWER with specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" * @param description Question description.","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" * @param answer Question answer.","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" * @param module Question module.","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Question difficulty.","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" public ShortAnsQn(String description, String answer, String module, QnDifficulty qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" super(description, QnType.SHORTANSWER, module, qnDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" this.answer \u003d answer;","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" * Returns question answer.","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"James-Hong-Jey"},"content":" public String getQuestionAnswer() {","lastModifiedDate":"2023-10-08"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":" return this.answer;","lastModifiedDate":"2023-10-08"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestion(String newDescription, String newAnswer) {","lastModifiedDate":"2023-10-08"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" super.editQuestion(newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":41,"author":{"gitId":"StevenGX12"},"content":" if(!newAnswer.equals(\"\")){","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" this.answer \u003d newAnswer;","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" * Returns question-answer pair, separated by a vertical bar.","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-08"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" public String getQuestionDescription() {","lastModifiedDate":"2023-10-08"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" return super.getQuestionDescription().strip() + \" / \" + this.answer.strip() + \" | \" + super.getModule()","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" + \" | \" + super.getDifficulty().toString();","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":43,"StevenGX12":2,"James-Hong-Jey":5,"yeo-menghan":1,"lisizhuang-0121":2}},{"path":"src/main/java/quizhub/questionlist/QuestionList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.questionlist;","lastModifiedDate":"2023-10-08"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.command.CommandShortAnswer;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.ShortAnsQn;","lastModifiedDate":"2023-10-08"},{"lineNumber":6,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.exception.QuizHubExceptions;","lastModifiedDate":"2023-10-08"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-08"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"import java.util.Collections;","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import java.util.InputMismatchException;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"/**","lastModifiedDate":"2023-10-08"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" * Represents the list of questions currently registered in Quizhub.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" * This list is created on program start and disposed on program termination.","lastModifiedDate":"2023-10-08"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":"public class QuestionList {","lastModifiedDate":"2023-10-08"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" private ArrayList\u003cQuestion\u003e allQns; //array of inputs","lastModifiedDate":"2023-10-08"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" * Creates a new empty question list.","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" public QuestionList(){","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" allQns \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" * Adds a short answer question to the current question list.","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" * @param description The Question Description","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" * @param answer The answer of the Question","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" * @param module The module of the Question","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDifficulty The difficulty level of the questions","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"James-Hong-Jey"},"content":" * @param showMessage If true, program will print response message on CLI after question is added.","lastModifiedDate":"2023-10-08"},{"lineNumber":33,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" public void addShortAnswerQn(String description, String answer, String module,","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty qnDifficulty, boolean showMessage){","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"yeo-menghan"},"content":" if(containsDuplicateShortAnswer(description, answer, module, qnDifficulty)){","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(CommandShortAnswer.DUPLICATED_INPUT + System.lineSeparator());","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"yeo-menghan"},"content":" } else{","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" allQns.add(new ShortAnsQn(description, answer, module, qnDifficulty));","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"James-Hong-Jey"},"content":" if (showMessage) {","lastModifiedDate":"2023-10-08"},{"lineNumber":42,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" I have added the following question OwO:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":43,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S] %s\\n\", viewQuestionByIndex(getQuestionListSize()));","lastModifiedDate":"2023-10-08"},{"lineNumber":44,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":45,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":46,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":47,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"yeo-menghan"},"content":" * Checks if a duplicate short answer question with the same description, answer, module, and difficulty","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"yeo-menghan"},"content":" * already exists in the list.","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"yeo-menghan"},"content":" * @param description The description of the short answer question.","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"yeo-menghan"},"content":" * @param answer The answer of the short answer question.","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"yeo-menghan"},"content":" * @param module The module of the short answer question.","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":" * @param difficulty The difficulty level of the short answer question.","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"yeo-menghan"},"content":" * @return true if a duplicate exists, false otherwise.","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"yeo-menghan"},"content":" public boolean containsDuplicateShortAnswer(String description, String answer, String module,","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"yeo-menghan"},"content":" Question.QnDifficulty difficulty) {","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"yeo-menghan"},"content":" // Create a formatted string to match the format produced by getQuestionDescription","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"yeo-menghan"},"content":" String formattedParameters \u003d description.strip() + \" / \" + answer.strip() + \" | \" + module + \" | \"","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"yeo-menghan"},"content":" + difficulty.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"yeo-menghan"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"yeo-menghan"},"content":" if (formattedParameters.equalsIgnoreCase(question.getQuestionDescription())) {","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"yeo-menghan"},"content":" return true; // Found a duplicate","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"yeo-menghan"},"content":" return false; // No duplicate found","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":74,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints the details of a question in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":" * @param question The question in which details are to be printed.","lastModifiedDate":"2023-10-08"},{"lineNumber":77,"author":{"gitId":"James-Hong-Jey"},"content":" * @param asList If true, prints out the index of the question in the question list","lastModifiedDate":"2023-10-08"},{"lineNumber":78,"author":{"gitId":"James-Hong-Jey"},"content":" * in addition to the details of the question.","lastModifiedDate":"2023-10-08"},{"lineNumber":79,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":80,"author":{"gitId":"James-Hong-Jey"},"content":" public void printQuestion(Question question, boolean asList){","lastModifiedDate":"2023-10-08"},{"lineNumber":81,"author":{"gitId":"James-Hong-Jey"},"content":" int qnIndex \u003d allQns.indexOf(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":82,"author":{"gitId":"James-Hong-Jey"},"content":" switch(question.getQuestionType()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":83,"author":{"gitId":"James-Hong-Jey"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-08"},{"lineNumber":84,"author":{"gitId":"James-Hong-Jey"},"content":" if (question.questionIsDone()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":85,"author":{"gitId":"James-Hong-Jey"},"content":" if (asList) {","lastModifiedDate":"2023-10-08"},{"lineNumber":86,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" %d: [S][X] %s\\n\", qnIndex + 1, question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":87,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":88,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S][X] %s\\n\", question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":89,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":90,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":91,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":92,"author":{"gitId":"James-Hong-Jey"},"content":" if (asList) {","lastModifiedDate":"2023-10-08"},{"lineNumber":93,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" %d: [S][] %s\\n\", qnIndex + 1, question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":94,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-08"},{"lineNumber":95,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.printf(\" [S][] %s\\n\", question.getQuestionDescription());","lastModifiedDate":"2023-10-08"},{"lineNumber":96,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":97,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":98,"author":{"gitId":"James-Hong-Jey"},"content":" break;","lastModifiedDate":"2023-10-08"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-21"},{"lineNumber":101,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":102,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints all the questions in the current question list as an indexed list.","lastModifiedDate":"2023-10-08"},{"lineNumber":105,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":106,"author":{"gitId":"James-Hong-Jey"},"content":" public void printQuestionList(){","lastModifiedDate":"2023-10-08"},{"lineNumber":107,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":108,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No questions found! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":109,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":111,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":113,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":114,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":115,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":116,"author":{"gitId":"James-Hong-Jey"},"content":" * Mark a question in the current question list as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":117,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":118,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be marked as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":119,"author":{"gitId":"James-Hong-Jey"},"content":" * @param showMessage If true, program will print response message on CLI","lastModifiedDate":"2023-10-08"},{"lineNumber":120,"author":{"gitId":"James-Hong-Jey"},"content":" * after question is marked as done.","lastModifiedDate":"2023-10-08"},{"lineNumber":121,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":122,"author":{"gitId":"James-Hong-Jey"},"content":" public void markQuestionAsDone (int index, boolean showMessage){","lastModifiedDate":"2023-10-08"},{"lineNumber":123,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":124,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" if(!question.questionIsDone()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" question.markAsDone();","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" if (showMessage) {","lastModifiedDate":"2023-10-22"},{"lineNumber":128,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have marked the following question as done \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":129,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":130,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question originally done! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":136,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":137,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":138,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":139,"author":{"gitId":"James-Hong-Jey"},"content":" * Mark a question in the current question list as not done.","lastModifiedDate":"2023-10-08"},{"lineNumber":140,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":141,"author":{"gitId":"James-Hong-Jey"},"content":" public void markQuestionAsNotDone(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":143,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" if(question.questionIsDone()){","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" question.markAsNotDone();","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have unmarked the following question as done \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":147,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question originally not done! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" * Mark the difficulty of a question in the current question list.","lastModifiedDate":"2023-10-22"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" * @param index The list index of the question to be marked.","lastModifiedDate":"2023-10-22"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" * @param qnDifficulty Difficulty to be assigned to the question.","lastModifiedDate":"2023-10-22"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":" * @param showMessage If true, program will print response message on CLI","lastModifiedDate":"2023-10-22"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":" * after question difficulty is marked.","lastModifiedDate":"2023-10-22"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" public void markQuestionDifficulty(int index, Question.QnDifficulty qnDifficulty, boolean showMessage){","lastModifiedDate":"2023-10-22"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":" String difficulty \u003d null;","lastModifiedDate":"2023-10-22"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" switch (qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" case EASY:","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"easy\";","lastModifiedDate":"2023-10-22"},{"lineNumber":168,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":169,"author":{"gitId":"spinoandraptos"},"content":" case HARD:","lastModifiedDate":"2023-10-22"},{"lineNumber":170,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"hard\";","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":172,"author":{"gitId":"spinoandraptos"},"content":" case NORMAL:","lastModifiedDate":"2023-10-22"},{"lineNumber":173,"author":{"gitId":"spinoandraptos"},"content":" difficulty \u003d \"normal\";","lastModifiedDate":"2023-10-22"},{"lineNumber":174,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":175,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":176,"author":{"gitId":"spinoandraptos"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":177,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":178,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-22"},{"lineNumber":179,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-22"},{"lineNumber":180,"author":{"gitId":"spinoandraptos"},"content":" if(question.getDifficulty() !\u003d qnDifficulty){","lastModifiedDate":"2023-10-22"},{"lineNumber":181,"author":{"gitId":"spinoandraptos"},"content":" allQns.get(index-1).markDifficulty(qnDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":182,"author":{"gitId":"spinoandraptos"},"content":" if(showMessage) {","lastModifiedDate":"2023-10-22"},{"lineNumber":183,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Roger that! I have marked the following question as \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":184,"author":{"gitId":"spinoandraptos"},"content":" difficulty +","lastModifiedDate":"2023-10-22"},{"lineNumber":185,"author":{"gitId":"spinoandraptos"},"content":" \" \u003ew\u003c !\");","lastModifiedDate":"2023-10-22"},{"lineNumber":186,"author":{"gitId":"spinoandraptos"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-22"},{"lineNumber":187,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":188,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Question is already set as \" +","lastModifiedDate":"2023-10-22"},{"lineNumber":190,"author":{"gitId":"spinoandraptos"},"content":" difficulty +","lastModifiedDate":"2023-10-22"},{"lineNumber":191,"author":{"gitId":"spinoandraptos"},"content":" \" ! No changes made!\");","lastModifiedDate":"2023-10-22"},{"lineNumber":192,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":193,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":194,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":195,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":196,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":197,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":198,"author":{"gitId":"James-Hong-Jey"},"content":" * Delete a question from the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":199,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":200,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be deleted.","lastModifiedDate":"2023-10-08"},{"lineNumber":201,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":202,"author":{"gitId":"James-Hong-Jey"},"content":" public void deleteQuestionByIndex(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":203,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":204,"author":{"gitId":"James-Hong-Jey"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":205,"author":{"gitId":"James-Hong-Jey"},"content":" allQns.remove(index - 1);","lastModifiedDate":"2023-10-08"},{"lineNumber":206,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Roger that! I have deleted the following question \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":207,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":208,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":209,"author":{"gitId":"James-Hong-Jey"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":210,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":211,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":212,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":213,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":214,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns the description and all other details of a question in one String object.","lastModifiedDate":"2023-10-08"},{"lineNumber":215,"author":{"gitId":"James-Hong-Jey"},"content":" * Used to display question details in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":216,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":217,"author":{"gitId":"James-Hong-Jey"},"content":" * @param index The list index of the question to be viewed.","lastModifiedDate":"2023-10-08"},{"lineNumber":218,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":219,"author":{"gitId":"James-Hong-Jey"},"content":" public String viewQuestionByIndex(int index){","lastModifiedDate":"2023-10-08"},{"lineNumber":220,"author":{"gitId":"James-Hong-Jey"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":221,"author":{"gitId":"James-Hong-Jey"},"content":" switch(allQns.get(index-1).getQuestionType()) {","lastModifiedDate":"2023-10-08"},{"lineNumber":222,"author":{"gitId":"James-Hong-Jey"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-08"},{"lineNumber":223,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns.get(index-1).getQuestionDescription();","lastModifiedDate":"2023-10-08"},{"lineNumber":224,"author":{"gitId":"James-Hong-Jey"},"content":" default:","lastModifiedDate":"2023-10-08"},{"lineNumber":225,"author":{"gitId":"James-Hong-Jey"},"content":" return \"Question Not Found\";","lastModifiedDate":"2023-10-08"},{"lineNumber":226,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":227,"author":{"gitId":"StevenGX12"},"content":" } catch(InputMismatchException |NullPointerException | IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-21"},{"lineNumber":228,"author":{"gitId":"James-Hong-Jey"},"content":" return \"Question Not Found\";","lastModifiedDate":"2023-10-08"},{"lineNumber":229,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":230,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":231,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-08"},{"lineNumber":232,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":233,"author":{"gitId":"spinoandraptos"},"content":" * Delete a question from the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":234,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":235,"author":{"gitId":"spinoandraptos"},"content":" * @param index The list index of the question to be deleted.","lastModifiedDate":"2023-10-08"},{"lineNumber":236,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":237,"author":{"gitId":"spinoandraptos"},"content":" public void editQuestionByIndex(int index, String newDescription, String newAnswer){","lastModifiedDate":"2023-10-08"},{"lineNumber":238,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-08"},{"lineNumber":239,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d allQns.get(index-1);","lastModifiedDate":"2023-10-08"},{"lineNumber":240,"author":{"gitId":"spinoandraptos"},"content":" question.editQuestion(newDescription, newAnswer);","lastModifiedDate":"2023-10-08"},{"lineNumber":241,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Roger that! I have edited the following question \u003ew\u003c !\");","lastModifiedDate":"2023-10-08"},{"lineNumber":242,"author":{"gitId":"spinoandraptos"},"content":" printQuestion(question, false);","lastModifiedDate":"2023-10-08"},{"lineNumber":243,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Now you have \" + getQuestionListSize() + \" questions in the list! UWU\");","lastModifiedDate":"2023-10-08"},{"lineNumber":244,"author":{"gitId":"spinoandraptos"},"content":" } catch (IndexOutOfBoundsException invalidIndex){","lastModifiedDate":"2023-10-08"},{"lineNumber":245,"author":{"gitId":"spinoandraptos"},"content":" if(index !\u003d 0){","lastModifiedDate":"2023-10-08"},{"lineNumber":246,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" Ono! Please enter valid question number *sobs*\");","lastModifiedDate":"2023-10-08"},{"lineNumber":247,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":248,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":249,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":250,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":251,"author":{"gitId":"James-Hong-Jey"},"content":" * Search for questions in the current question list using their description.","lastModifiedDate":"2023-10-08"},{"lineNumber":252,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":253,"author":{"gitId":"James-Hong-Jey"},"content":" * @param keyword Description keyword(s) used to search for matches.","lastModifiedDate":"2023-10-08"},{"lineNumber":254,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":255,"author":{"gitId":"James-Hong-Jey"},"content":" public void searchListByDescription(String keyword){","lastModifiedDate":"2023-10-08"},{"lineNumber":256,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-08"},{"lineNumber":257,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":258,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":259,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":260,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":261,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":262,"author":{"gitId":"StevenGX12"},"content":" if(question.getQuestionDescription().toLowerCase().contains(keyword.toLowerCase())){","lastModifiedDate":"2023-10-21"},{"lineNumber":263,"author":{"gitId":"James-Hong-Jey"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":264,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":265,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":266,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":267,"author":{"gitId":"James-Hong-Jey"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":268,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No results found :\u003c Check your keyword is correct?\");","lastModifiedDate":"2023-10-08"},{"lineNumber":269,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":270,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":271,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":272,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":273,"author":{"gitId":"James-Hong-Jey"},"content":" * Search for questions in the current question list using their date and time.","lastModifiedDate":"2023-10-08"},{"lineNumber":274,"author":{"gitId":"James-Hong-Jey"},"content":" *","lastModifiedDate":"2023-10-08"},{"lineNumber":275,"author":{"gitId":"James-Hong-Jey"},"content":" * @param dateTime Date and time used to search for matches.","lastModifiedDate":"2023-10-08"},{"lineNumber":276,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":277,"author":{"gitId":"James-Hong-Jey"},"content":" public void searchListByTime(String dateTime){","lastModifiedDate":"2023-10-08"},{"lineNumber":278,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-08"},{"lineNumber":279,"author":{"gitId":"James-Hong-Jey"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":280,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-08"},{"lineNumber":281,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":282,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-08"},{"lineNumber":283,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-08"},{"lineNumber":284,"author":{"gitId":"James-Hong-Jey"},"content":" if(question.getQuestionTiming(true).contains(dateTime)){","lastModifiedDate":"2023-10-08"},{"lineNumber":285,"author":{"gitId":"James-Hong-Jey"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-08"},{"lineNumber":286,"author":{"gitId":"James-Hong-Jey"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-08"},{"lineNumber":287,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":288,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":289,"author":{"gitId":"James-Hong-Jey"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-08"},{"lineNumber":290,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" No results found :\u003c Check your time format is in dd-MM-yyyy HH:mm?\");","lastModifiedDate":"2023-10-08"},{"lineNumber":291,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":292,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":293,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":294,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":295,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":296,"author":{"gitId":"StevenGX12"},"content":" * Search for questions in the current question list using their module.","lastModifiedDate":"2023-10-21"},{"lineNumber":297,"author":{"gitId":"StevenGX12"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":298,"author":{"gitId":"StevenGX12"},"content":" * @param module Module used to search for matches.","lastModifiedDate":"2023-10-21"},{"lineNumber":299,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":300,"author":{"gitId":"StevenGX12"},"content":" public void searchListByModule(String module){","lastModifiedDate":"2023-10-21"},{"lineNumber":301,"author":{"gitId":"StevenGX12"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-21"},{"lineNumber":302,"author":{"gitId":"StevenGX12"},"content":" if(allQns.isEmpty()){","lastModifiedDate":"2023-10-21"},{"lineNumber":303,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-21"},{"lineNumber":304,"author":{"gitId":"James-Hong-Jey"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":305,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Here are questions that matched your search:\");","lastModifiedDate":"2023-10-21"},{"lineNumber":306,"author":{"gitId":"StevenGX12"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-21"},{"lineNumber":307,"author":{"gitId":"StevenGX12"},"content":" if(question.getModule().toLowerCase().contains(module.toLowerCase())){","lastModifiedDate":"2023-10-21"},{"lineNumber":308,"author":{"gitId":"StevenGX12"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-21"},{"lineNumber":309,"author":{"gitId":"StevenGX12"},"content":" printQuestion(question, true);","lastModifiedDate":"2023-10-21"},{"lineNumber":310,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":311,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":312,"author":{"gitId":"StevenGX12"},"content":" if(matchedQuestions.isEmpty()){","lastModifiedDate":"2023-10-21"},{"lineNumber":313,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" No results found :\u003c Check your module is correct?\");","lastModifiedDate":"2023-10-21"},{"lineNumber":314,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":315,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":316,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":317,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":318,"author":{"gitId":"spinoandraptos"},"content":" * Build a new list of questions based on specified module.","lastModifiedDate":"2023-10-22"},{"lineNumber":319,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":320,"author":{"gitId":"spinoandraptos"},"content":" * @param modules Modules used to search for matches.","lastModifiedDate":"2023-10-27"},{"lineNumber":321,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":322,"author":{"gitId":"spinoandraptos"},"content":" public ArrayList\u003cQuestion\u003e categoriseListByModule(String[] modules){","lastModifiedDate":"2023-10-27"},{"lineNumber":323,"author":{"gitId":"spinoandraptos"},"content":" ArrayList\u003cQuestion\u003e matchedQuestions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":324,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":325,"author":{"gitId":"spinoandraptos"},"content":" if (allQns.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":326,"author":{"gitId":"spinoandraptos"},"content":" throw new QuizHubExceptions(\" Question list is empty! Time to add some OWO\");","lastModifiedDate":"2023-10-22"},{"lineNumber":327,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":328,"author":{"gitId":"spinoandraptos"},"content":" for (String module : modules) {","lastModifiedDate":"2023-10-27"},{"lineNumber":329,"author":{"gitId":"spinoandraptos"},"content":" for (Question question : allQns) {","lastModifiedDate":"2023-10-22"},{"lineNumber":330,"author":{"gitId":"spinoandraptos"},"content":" if (question.getModule().toLowerCase().matches(module.toLowerCase())) {","lastModifiedDate":"2023-10-22"},{"lineNumber":331,"author":{"gitId":"spinoandraptos"},"content":" matchedQuestions.add(question);","lastModifiedDate":"2023-10-22"},{"lineNumber":332,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":333,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":334,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":335,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":336,"author":{"gitId":"spinoandraptos"},"content":" } catch (QuizHubExceptions emptyList){","lastModifiedDate":"2023-10-22"},{"lineNumber":337,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(emptyList.getMessage());","lastModifiedDate":"2023-10-22"},{"lineNumber":338,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":339,"author":{"gitId":"spinoandraptos"},"content":" return matchedQuestions;","lastModifiedDate":"2023-10-22"},{"lineNumber":340,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":341,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":342,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns the size of current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":343,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":344,"author":{"gitId":"James-Hong-Jey"},"content":" public int getQuestionListSize(){","lastModifiedDate":"2023-10-08"},{"lineNumber":345,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns.size();","lastModifiedDate":"2023-10-08"},{"lineNumber":346,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":347,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-08"},{"lineNumber":348,"author":{"gitId":"James-Hong-Jey"},"content":" * Returns a list of all questions in the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":349,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-08"},{"lineNumber":350,"author":{"gitId":"James-Hong-Jey"},"content":" public ArrayList\u003cQuestion\u003e getAllQns(){","lastModifiedDate":"2023-10-08"},{"lineNumber":351,"author":{"gitId":"James-Hong-Jey"},"content":" return allQns;","lastModifiedDate":"2023-10-08"},{"lineNumber":352,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-08"},{"lineNumber":353,"author":{"gitId":"James-Hong-Jey"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":354,"author":{"gitId":"James-Hong-Jey"},"content":" * Shuffles the order of questions in the deck","lastModifiedDate":"2023-10-21"},{"lineNumber":355,"author":{"gitId":"James-Hong-Jey"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":356,"author":{"gitId":"James-Hong-Jey"},"content":" public void shuffleQuestions() {","lastModifiedDate":"2023-10-21"},{"lineNumber":357,"author":{"gitId":"James-Hong-Jey"},"content":" Collections.shuffle(allQns);","lastModifiedDate":"2023-10-21"},{"lineNumber":358,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":359,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":360,"author":{"gitId":"yeo-menghan"},"content":" * Retrieves the answer for a question by its index in the question list.","lastModifiedDate":"2023-10-09"},{"lineNumber":361,"author":{"gitId":"yeo-menghan"},"content":" * @param index The index of the question in the list.","lastModifiedDate":"2023-10-09"},{"lineNumber":362,"author":{"gitId":"yeo-menghan"},"content":" * @return The answer to the question, or null if the index is invalid or the question is of a different type.","lastModifiedDate":"2023-10-09"},{"lineNumber":363,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":364,"author":{"gitId":"spinoandraptos"},"content":" public String getAnswerByIndex(int index, ArrayList\u003cQuestion\u003e questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":365,"author":{"gitId":"yeo-menghan"},"content":" try {","lastModifiedDate":"2023-10-09"},{"lineNumber":366,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d questions.get(index - 1);","lastModifiedDate":"2023-10-22"},{"lineNumber":367,"author":{"gitId":"yeo-menghan"},"content":" if (question instanceof ShortAnsQn) {","lastModifiedDate":"2023-10-09"},{"lineNumber":368,"author":{"gitId":"yeo-menghan"},"content":" return ((ShortAnsQn) question).getQuestionAnswer();","lastModifiedDate":"2023-10-09"},{"lineNumber":369,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":370,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" This question is not a Short Answer question.\");","lastModifiedDate":"2023-10-09"},{"lineNumber":371,"author":{"gitId":"yeo-menghan"},"content":" return null;","lastModifiedDate":"2023-10-09"},{"lineNumber":372,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":373,"author":{"gitId":"yeo-menghan"},"content":" } catch (IndexOutOfBoundsException invalidIndex) {","lastModifiedDate":"2023-10-09"},{"lineNumber":374,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Ono! Please enter a valid question number *sobs*\");","lastModifiedDate":"2023-10-09"},{"lineNumber":375,"author":{"gitId":"yeo-menghan"},"content":" return null;","lastModifiedDate":"2023-10-09"},{"lineNumber":376,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":377,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":378,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":379,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-16"},{"lineNumber":380,"author":{"gitId":"yeo-menghan"},"content":" * Retrieves the question by its index in the question list.","lastModifiedDate":"2023-10-16"},{"lineNumber":381,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-16"},{"lineNumber":382,"author":{"gitId":"yeo-menghan"},"content":" * @param index The index of the question in the list.","lastModifiedDate":"2023-10-16"},{"lineNumber":383,"author":{"gitId":"yeo-menghan"},"content":" * @return The question, or null if the index is invalid or the question is of a different type.","lastModifiedDate":"2023-10-16"},{"lineNumber":384,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-16"},{"lineNumber":385,"author":{"gitId":"yeo-menghan"},"content":" public String getQuestionTextByIndex(int index) {","lastModifiedDate":"2023-10-16"},{"lineNumber":386,"author":{"gitId":"yeo-menghan"},"content":" if (index \u003e\u003d 0 \u0026\u0026 index \u003c allQns.size()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":387,"author":{"gitId":"yeo-menghan"},"content":" Question question \u003d allQns.get(index);","lastModifiedDate":"2023-10-16"},{"lineNumber":388,"author":{"gitId":"yeo-menghan"},"content":" return question.toString(); // Use the toString() method to get the text of the question","lastModifiedDate":"2023-10-16"},{"lineNumber":389,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":390,"author":{"gitId":"yeo-menghan"},"content":" return null; // Handle invalid index","lastModifiedDate":"2023-10-16"},{"lineNumber":391,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":392,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":393,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":394,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":395,"author":{"gitId":"yeo-menghan"},"content":" * Starts a quiz session using the provided user interface (UI).","lastModifiedDate":"2023-10-09"},{"lineNumber":396,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":397,"author":{"gitId":"yeo-menghan"},"content":" * @param ui The user interface to interact with the user.","lastModifiedDate":"2023-10-09"},{"lineNumber":398,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":399,"author":{"gitId":"spinoandraptos"},"content":" public void startQuiz(Ui ui, ArrayList\u003cQuestion\u003e questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":400,"author":{"gitId":"spinoandraptos"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":401,"author":{"gitId":"yeo-menghan"},"content":" ui.displayMessage(\" No questions found! Add questions before starting the quiz.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":402,"author":{"gitId":"yeo-menghan"},"content":" return;","lastModifiedDate":"2023-10-09"},{"lineNumber":403,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":404,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":405,"author":{"gitId":"yeo-menghan"},"content":" ui.displayMessage(\" Starting the quiz...\");","lastModifiedDate":"2023-10-17"},{"lineNumber":406,"author":{"gitId":"spinoandraptos"},"content":" int totalQuestions \u003d questions.size();","lastModifiedDate":"2023-10-22"},{"lineNumber":407,"author":{"gitId":"yeo-menghan"},"content":" int correctAnswers \u003d 0;","lastModifiedDate":"2023-10-09"},{"lineNumber":408,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":409,"author":{"gitId":"yeo-menghan"},"content":" for (int i \u003d 0; i \u003c totalQuestions; i++) {","lastModifiedDate":"2023-10-09"},{"lineNumber":410,"author":{"gitId":"spinoandraptos"},"content":" Question question \u003d questions.get(i);","lastModifiedDate":"2023-10-22"},{"lineNumber":411,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":412,"author":{"gitId":"yeo-menghan"},"content":" ui.displayQuestion(question, i + 1, totalQuestions);","lastModifiedDate":"2023-10-09"},{"lineNumber":413,"author":{"gitId":"spinoandraptos"},"content":" String correctAnswer \u003d getAnswerByIndex(i + 1, questions).strip(); // Get correct answer by index","lastModifiedDate":"2023-10-22"},{"lineNumber":414,"author":{"gitId":"lisizhuang-0121"},"content":" String userAnswer \u003d ui.getUserInput().strip();","lastModifiedDate":"2023-10-17"},{"lineNumber":415,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":416,"author":{"gitId":"yeo-menghan"},"content":" if (userAnswer.equalsIgnoreCase(correctAnswer)) {","lastModifiedDate":"2023-10-09"},{"lineNumber":417,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Correct!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":418,"author":{"gitId":"yeo-menghan"},"content":" correctAnswers++;","lastModifiedDate":"2023-10-09"},{"lineNumber":419,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":420,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Wrong!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":421,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":422,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":423,"author":{"gitId":"yeo-menghan"},"content":" int questionsLeft \u003d totalQuestions - (i + 1);","lastModifiedDate":"2023-10-09"},{"lineNumber":424,"author":{"gitId":"yeo-menghan"},"content":" if (questionsLeft \u003e 0) {","lastModifiedDate":"2023-10-09"},{"lineNumber":425,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Questions left: \" + questionsLeft);","lastModifiedDate":"2023-10-27"},{"lineNumber":426,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":427,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Quiz completed!\");","lastModifiedDate":"2023-10-27"},{"lineNumber":428,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":429,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":430,"author":{"gitId":"spinoandraptos"},"content":" ui.displayMessage(\" Your score: \" + correctAnswers + \"/\" + totalQuestions);","lastModifiedDate":"2023-10-27"},{"lineNumber":431,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":432,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-08"}],"authorContributionMap":{"spinoandraptos":121,"StevenGX12":25,"James-Hong-Jey":184,"yeo-menghan":91,"lisizhuang-0121":11}},{"path":"src/main/java/quizhub/storage/Storage.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-08"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import java.io.File;","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" * Represents the hard disk storage where","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" * question data is stored, read and updated.","lastModifiedDate":"2023-10-08"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"public class Storage {","lastModifiedDate":"2023-10-04"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" private File dataFile;","lastModifiedDate":"2023-10-04"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" * Creates a new storage for storing question data.","lastModifiedDate":"2023-10-08"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath The file location in hard disk where data is stored and read from.","lastModifiedDate":"2023-10-04"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" public Storage(String filePath) {","lastModifiedDate":"2023-10-04"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" dataFile \u003d new File(filePath);","lastModifiedDate":"2023-10-04"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" * Write in new data to storage.","lastModifiedDate":"2023-10-04"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * @param filePath The file location in hard disk where data is written to.","lastModifiedDate":"2023-10-04"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * @param textToAdd Data to be written.","lastModifiedDate":"2023-10-04"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * @param toAppend If true, new data is added to the back of existing data instead of overwriting them.","lastModifiedDate":"2023-10-04"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" private void writeToFile(String filePath, String textToAdd, boolean toAppend) throws IOException {","lastModifiedDate":"2023-10-04"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" FileWriter fileWriter \u003d new FileWriter(filePath, toAppend);","lastModifiedDate":"2023-10-04"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" fileWriter.write(textToAdd);","lastModifiedDate":"2023-10-04"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" fileWriter.close();","lastModifiedDate":"2023-10-04"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" * Adds a question from storage into question list being built.","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" * @param questions The question list to be built.","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnType Type of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDescription Description of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnDoneStatus Done status of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" * @param difficulty Difficulty of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" * @param qnModule Module of current question.","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" private int addQuestionFromFile(QuestionList questions, String qnType, String qnDescription,","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" String qnDoneStatus, Question.QnDifficulty difficulty,","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"lisizhuang-0121"},"content":" String qnModule) {","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"lisizhuang-0121"},"content":" switch (qnType) {","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" case \"S\":","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"lisizhuang-0121"},"content":" // Split the description by \"/\" and check for empty fields","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"lisizhuang-0121"},"content":" String[] qnTokens \u003d qnDescription.split(\"/\");","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"lisizhuang-0121"},"content":" if (qnTokens[0].isEmpty() || qnTokens[1].isEmpty() || qnModule.isEmpty()) {","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"lisizhuang-0121"},"content":" questions.addShortAnswerQn(qnTokens[0], qnTokens[1], qnModule, difficulty, false);","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"lisizhuang-0121"},"content":" if (qnDoneStatus.equals(\"done\")) {","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"lisizhuang-0121"},"content":" questions.markQuestionAsDone(questions.getQuestionListSize(), false);","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" return 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" return 1;","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"lisizhuang-0121"},"content":" * Parse raw questions read from the question file and store them in the questionList","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"lisizhuang-0121"},"content":" * Used at start of program to load all questions from the file","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"lisizhuang-0121"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" * @param rawQuestions the arrayList of question strings to be parsed","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" * @param questions the questionList object for string parsed questions","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"lisizhuang-0121"},"content":" private void parseQuestionsFromStrings(ArrayList\u003cString\u003e rawQuestions, QuestionList questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"lisizhuang-0121"},"content":" int failedQuestions \u003d 0;","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" for (int i \u003d 1; i \u003c rawQuestions.size(); i++) {","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"lisizhuang-0121"},"content":" String currentQuestion \u003d rawQuestions.get(i);","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"lisizhuang-0121"},"content":" String[] questionSubStrings \u003d currentQuestion.split(\"\\\\|\");","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"lisizhuang-0121"},"content":" String questionType \u003d questionSubStrings[0].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDoneStatus \u003d questionSubStrings[1].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDescription \u003d questionSubStrings[2].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"lisizhuang-0121"},"content":" String questionModule \u003d questionSubStrings[3].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"lisizhuang-0121"},"content":" String questionDifficulty \u003d questionSubStrings[4].strip();","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty difficulty \u003d Parser.extractQuestionDifficulty(questionDifficulty);","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"lisizhuang-0121"},"content":" failedQuestions +\u003d addQuestionFromFile(questions, questionType, questionDescription,","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" questionDoneStatus, difficulty, questionModule);","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" } catch (ArrayIndexOutOfBoundsException e) {","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" failedQuestions++;","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(\" \" + failedQuestions + \" questions parsed unsuccessfully from storage file\\n\");","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":98,"author":{"gitId":"James-Hong-Jey"},"content":" * Build a new question list from data stored in hard disk.","lastModifiedDate":"2023-10-08"},{"lineNumber":99,"author":{"gitId":"James-Hong-Jey"},"content":" * Used at program start to build the current question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":101,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list to be built.","lastModifiedDate":"2023-10-08"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":103,"author":{"gitId":"James-Hong-Jey"},"content":" public void buildCurrentListFromFile(QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" if (dataFile.createNewFile()) {","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" Question-list created: \" + dataFile.getName());","lastModifiedDate":"2023-10-08"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":111,"author":{"gitId":"James-Hong-Jey"},"content":" int questionIndex \u003d 0;","lastModifiedDate":"2023-10-08"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" try {","lastModifiedDate":"2023-10-04"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" Scanner fileScanner \u003d new Scanner(dataFile);","lastModifiedDate":"2023-10-04"},{"lineNumber":114,"author":{"gitId":"lisizhuang-0121"},"content":" // Pipe all lines into string arrayList for processing","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"lisizhuang-0121"},"content":" ArrayList\u003cString\u003e rawQuestions \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" while (fileScanner.hasNext()) {","lastModifiedDate":"2023-10-04"},{"lineNumber":117,"author":{"gitId":"lisizhuang-0121"},"content":" String rawQuestion \u003d fileScanner.nextLine();","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"lisizhuang-0121"},"content":" rawQuestions.add(rawQuestion);","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"lisizhuang-0121"},"content":" if (rawQuestions.size() \u003c\u003d 1) {","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":123,"author":{"gitId":"lisizhuang-0121"},"content":" parseQuestionsFromStrings(rawQuestions, questions);","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"James-Hong-Jey"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":129,"author":{"gitId":"James-Hong-Jey"},"content":" * Build a new question list from data stored in hard disk.","lastModifiedDate":"2023-10-08"},{"lineNumber":130,"author":{"gitId":"James-Hong-Jey"},"content":" * Prints out the questions in the list in CLI.","lastModifiedDate":"2023-10-08"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":132,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list that has been built.","lastModifiedDate":"2023-10-08"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":134,"author":{"gitId":"James-Hong-Jey"},"content":" public void loadData(QuestionList questions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":135,"author":{"gitId":"James-Hong-Jey"},"content":" buildCurrentListFromFile(questions);","lastModifiedDate":"2023-10-08"},{"lineNumber":136,"author":{"gitId":"lisizhuang-0121"},"content":" if (questions.getQuestionListSize() \u003d\u003d 0) {","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(\" You currently have no saved questions uWu\");","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"lisizhuang-0121"},"content":" return;","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"James-Hong-Jey"},"content":" System.out.println(\" You currently have the following questions uWu\");","lastModifiedDate":"2023-10-08"},{"lineNumber":141,"author":{"gitId":"James-Hong-Jey"},"content":" questions.printQuestionList();","lastModifiedDate":"2023-10-08"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" private void storeQuestionToFile(Question question) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" String isDoneString \u003d \"undone\";","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"lisizhuang-0121"},"content":" if (question.questionIsDone()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"lisizhuang-0121"},"content":" isDoneString \u003d \"done\";","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"lisizhuang-0121"},"content":" switch (question.getQuestionType()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":149,"author":{"gitId":"lisizhuang-0121"},"content":" case SHORTANSWER:","lastModifiedDate":"2023-10-22"},{"lineNumber":150,"author":{"gitId":"lisizhuang-0121"},"content":" writeToFile(dataFile.getPath(), \"S | \" + isDoneString + \" | \" + question.getQuestionDescription()","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"lisizhuang-0121"},"content":" + System.lineSeparator(), true);","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"lisizhuang-0121"},"content":" default:","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"lisizhuang-0121"},"content":" break;","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" * Overwrites all existing data in storage with","lastModifiedDate":"2023-10-04"},{"lineNumber":159,"author":{"gitId":"James-Hong-Jey"},"content":" * the current questions in the question list.","lastModifiedDate":"2023-10-08"},{"lineNumber":160,"author":{"gitId":"James-Hong-Jey"},"content":" * Used after every question change and on program termination.","lastModifiedDate":"2023-10-08"},{"lineNumber":161,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-04"},{"lineNumber":162,"author":{"gitId":"James-Hong-Jey"},"content":" * @param questions The question list to overwrite current data with.","lastModifiedDate":"2023-10-08"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":164,"author":{"gitId":"James-Hong-Jey"},"content":" public void updateData(QuestionList questions){","lastModifiedDate":"2023-10-08"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" try{","lastModifiedDate":"2023-10-04"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" //flush all current records","lastModifiedDate":"2023-10-04"},{"lineNumber":167,"author":{"gitId":"James-Hong-Jey"},"content":" writeToFile(dataFile.getPath(), \"Latest Questions\" + System.lineSeparator(), false);","lastModifiedDate":"2023-10-08"},{"lineNumber":168,"author":{"gitId":"James-Hong-Jey"},"content":" ArrayList\u003cQuestion\u003e allQuestions \u003d questions.getAllQns();","lastModifiedDate":"2023-10-08"},{"lineNumber":169,"author":{"gitId":"James-Hong-Jey"},"content":" for (Question question : allQuestions) {","lastModifiedDate":"2023-10-08"},{"lineNumber":170,"author":{"gitId":"lisizhuang-0121"},"content":" storeQuestionToFile(question);","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":172,"author":{"gitId":"James-Hong-Jey"},"content":" } catch(NullPointerException | IOException invalidFilePath) {","lastModifiedDate":"2023-10-25"},{"lineNumber":173,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" \" + invalidFilePath.getMessage());","lastModifiedDate":"2023-10-04"},{"lineNumber":174,"author":{"gitId":"spinoandraptos"},"content":" System.out.println(\" ____________________________________________________________\");","lastModifiedDate":"2023-10-04"},{"lineNumber":175,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":176,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":177,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":73,"James-Hong-Jey":26,"lisizhuang-0121":78}},{"path":"src/main/java/quizhub/ui/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.ui;","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-08"},{"lineNumber":5,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-04"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"/**","lastModifiedDate":"2023-10-04"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" * Represents the user interface for CLI displays.","lastModifiedDate":"2023-10-04"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" * Supports CLI interactions with users.","lastModifiedDate":"2023-10-04"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"public class Ui {","lastModifiedDate":"2023-10-04"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":" public static final String INVALID_COMMAND_MSG \u003d \" Please enter a valid command :0\";","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_COMMAND_FEEDBACK \u003d \" Here are the list of commands you can use:\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" \" 1. help - shows the list of commands you can use,\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" \" 2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" \"its answer to the list,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" \" 3. list - shows the list of questions and answers,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" \" 4. delete [question number] - deletes the question and answer at the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" \" 5. find /[description] - displays all questions that contains the the specified description,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" \" 6. find /[module] - displays all questions that belong to the specified module,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" \" 7. edit [question number] /description [description] - edits the description of the question \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" \" 8. edit [question number] /answer [answer] - edits the answer to the question with \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" \"the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" \" 9. start /[quiz mode] [start details] /[qn mode] - \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" \"starts the quiz with option for /module or /all and /random or /normal,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" \" 10. shuffle - shuffle quiz questions to a random order,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" \" 11. markdiff [question number] [question difficulty] - sets the difficulty of question \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-27"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" \" 12. bye - exits the program\";","lastModifiedDate":"2023-10-27"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_INTEGER_INDEX_MSG \u003d \" Please enter valid integer index!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" public static final String MISSING_QUESTION_NUMBER_MSG \u003d \" Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" public static final String INVALID_QUESTION_DIFFICULTY_MSG \u003d \" Ono! We only support easy, normal and hard \" +","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" \"difficulty levels\" + System.lineSeparator() + \" No changes will be made to your difficulty level\";","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" private final Scanner input \u003d new Scanner(System.in); // Create a Scanner object","lastModifiedDate":"2023-10-04"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" private Storage dataStorage;","lastModifiedDate":"2023-10-04"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" private QuestionList tasks;","lastModifiedDate":"2023-10-08"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" * Sets up the bridging between the UI and tasks data.","lastModifiedDate":"2023-10-21"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" *","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" * @param tasks A record of all tasks documented that is built on program start and disposed on program exit.","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * @param dataStorage The hard disk record of all tasks documented that persists even on program exit.","lastModifiedDate":"2023-10-21"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" public Ui(Storage dataStorage, QuestionList tasks){","lastModifiedDate":"2023-10-21"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" this.dataStorage \u003d dataStorage;","lastModifiedDate":"2023-10-21"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" this.tasks \u003d tasks;","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" * Print out separating line in CLI to mark","lastModifiedDate":"2023-10-04"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" * start and end of chatbot replies.","lastModifiedDate":"2023-10-04"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":" public void showLine(){","lastModifiedDate":"2023-10-04"},{"lineNumber":68,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" ____________________________________________________________\\n\");","lastModifiedDate":"2023-10-09"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" * Displays app logo and opening message to welcome users","lastModifiedDate":"2023-10-09"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * on the launch of chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" public void displayOpeningMessage(){","lastModifiedDate":"2023-10-04"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" String logo \u003d \" _______ _________ _______ ______ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" \" ( ___ )|\\\\ /|\\\\__ __// ___ )|\\\\ /||\\\\ /|( ___ \\\\ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" \" | ( ) || ) ( | ) ( \\\\/ ) || ) ( || ) ( || ( ) )\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":" \" | | | || | | | | | / )| (___) || | | || (__/ / \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" \" | | | || | | | | | / / | ___ || | | || __ ( \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" \" | | /\\\\| || | | | | | / / | ( ) || | | || ( \\\\ \\\\ \\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":" \" | (_\\\\ \\\\ || (___) |___) (___ / (_/\\\\| ) ( || (___) || )___) )\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" \" (____\\\\/_)(_______)\\\\_______/(_______/|/ \\\\|(_______)|/ \\\\___/\";","lastModifiedDate":"2023-10-09"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" System.out.println(logo);","lastModifiedDate":"2023-10-09"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Welcome to Quizhub!!!\\n\");","lastModifiedDate":"2023-10-09"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Let the quizzing begin XDD\");","lastModifiedDate":"2023-10-09"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" System.out.println();","lastModifiedDate":"2023-10-04"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.loadData(tasks);","lastModifiedDate":"2023-10-04"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":" assert tasks !\u003d null : \"Invalid null tasks\";","lastModifiedDate":"2023-10-24"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" * Retrieves the CLI input from the user","lastModifiedDate":"2023-10-04"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" * and documents it as a String object.","lastModifiedDate":"2023-10-04"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" public String getUserInput() {","lastModifiedDate":"2023-10-21"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" if(input.hasNextLine()){","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" return input.nextLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" } else {","lastModifiedDate":"2023-10-21"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-21"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-04"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" * Displays closing message on exiting the chatbot.","lastModifiedDate":"2023-10-04"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-04"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" public void displayClosingMessage(){","lastModifiedDate":"2023-10-04"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" dataStorage.updateData(tasks);","lastModifiedDate":"2023-10-04"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Are you sure you want to stop quizzing?\");","lastModifiedDate":"2023-10-09"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" Well... hope you had fun quizzing :D\");","lastModifiedDate":"2023-10-09"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":" System.out.println(\" See you again soon!\");","lastModifiedDate":"2023-10-09"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" showLine();","lastModifiedDate":"2023-10-04"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-04"},{"lineNumber":115,"author":{"gitId":"yeo-menghan"},"content":" /**","lastModifiedDate":"2023-10-09"},{"lineNumber":116,"author":{"gitId":"yeo-menghan"},"content":" * Displays a question along with its index in a set of questions and the total count of questions.","lastModifiedDate":"2023-10-09"},{"lineNumber":117,"author":{"gitId":"yeo-menghan"},"content":" * Extracts and displays the question part from the question description, which is in the \"question/answer\" format.","lastModifiedDate":"2023-10-09"},{"lineNumber":118,"author":{"gitId":"yeo-menghan"},"content":" * If the format is invalid or missing, it prompts the user to edit the question via the edit function.","lastModifiedDate":"2023-10-09"},{"lineNumber":119,"author":{"gitId":"yeo-menghan"},"content":" *","lastModifiedDate":"2023-10-09"},{"lineNumber":120,"author":{"gitId":"yeo-menghan"},"content":" * @param question The Question object containing the question description.","lastModifiedDate":"2023-10-09"},{"lineNumber":121,"author":{"gitId":"yeo-menghan"},"content":" * @param currentQuestionIndex The index of the current question in the set of questions.","lastModifiedDate":"2023-10-09"},{"lineNumber":122,"author":{"gitId":"yeo-menghan"},"content":" * @param totalQuestions The total count of questions in the set.","lastModifiedDate":"2023-10-09"},{"lineNumber":123,"author":{"gitId":"yeo-menghan"},"content":" */","lastModifiedDate":"2023-10-09"},{"lineNumber":124,"author":{"gitId":"yeo-menghan"},"content":" public void displayQuestion(Question question, int currentQuestionIndex, int totalQuestions) {","lastModifiedDate":"2023-10-09"},{"lineNumber":125,"author":{"gitId":"yeo-menghan"},"content":" showLine();","lastModifiedDate":"2023-10-09"},{"lineNumber":126,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Question \" + currentQuestionIndex + \" / \" + totalQuestions + \":\");","lastModifiedDate":"2023-10-09"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" // getQuestionDescription returns question/answer","lastModifiedDate":"2023-10-21"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" String questionDescription \u003d question.getQuestionDescription();","lastModifiedDate":"2023-10-21"},{"lineNumber":129,"author":{"gitId":"yeo-menghan"},"content":" String[] parts \u003d questionDescription.split(\"/\");","lastModifiedDate":"2023-10-09"},{"lineNumber":130,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":131,"author":{"gitId":"yeo-menghan"},"content":" if (parts.length \u003e\u003d 1) {","lastModifiedDate":"2023-10-09"},{"lineNumber":132,"author":{"gitId":"yeo-menghan"},"content":" // Extract and display the question part","lastModifiedDate":"2023-10-09"},{"lineNumber":133,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" \" + parts[0]); // part[0] returns the question part","lastModifiedDate":"2023-10-09"},{"lineNumber":134,"author":{"gitId":"yeo-menghan"},"content":" } else {","lastModifiedDate":"2023-10-09"},{"lineNumber":135,"author":{"gitId":"yeo-menghan"},"content":" // Handle the case where the format is invalid","lastModifiedDate":"2023-10-09"},{"lineNumber":136,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(\" Invalid question format, please edit this question via the edit function\");","lastModifiedDate":"2023-10-09"},{"lineNumber":137,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":138,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":139,"author":{"gitId":"yeo-menghan"},"content":" System.out.print(\" Your Answer: \");","lastModifiedDate":"2023-10-09"},{"lineNumber":140,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":141,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":142,"author":{"gitId":"lisizhuang-0121"},"content":" public void showInvalidCommandHelp(String feedback) {","lastModifiedDate":"2023-10-12"},{"lineNumber":143,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(feedback);","lastModifiedDate":"2023-10-12"},{"lineNumber":144,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":145,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"yeo-menghan"},"content":" public void displayMessage(String message) {","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"yeo-menghan"},"content":" System.out.println(message);","lastModifiedDate":"2023-10-17"},{"lineNumber":148,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-04"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-04"}],"authorContributionMap":{"spinoandraptos":95,"StevenGX12":17,"James-Hong-Jey":3,"yeo-menghan":30,"lisizhuang-0121":5}},{"path":"src/test/java/quizhub/command/CommandDeleteTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-21"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"public class CommandDeleteTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" private Parser parser;","lastModifiedDate":"2023-10-21"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":" private Ui ui;","lastModifiedDate":"2023-10-21"},{"lineNumber":23,"author":{"gitId":"StevenGX12"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-21"},{"lineNumber":31,"author":{"gitId":"StevenGX12"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"StevenGX12"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-21"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-21"},{"lineNumber":36,"author":{"gitId":"StevenGX12"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"StevenGX12"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" assert expectedOutput !\u003d null : \"Expected output should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"lisizhuang-0121"},"content":" System.out.println(expectedOutput + \"\\n\" +actualOutput);","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":68,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with out-of-bound index","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":72,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"StevenGX12"},"content":" void testDeleteOutOfBoundIndex() {","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" questionList.deleteQuestionByIndex(-1);","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with invalid type index","lastModifiedDate":"2023-10-21"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" void testDeleteInvalidTypeIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(\"delete test\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-21"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":" * Test deleting with missing index","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-21"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" void testDeleteMissingIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandDelete.MISSING_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(\"delete\").executeCommand(ui, mockStorage, questionList);;","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":" // /**","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":" // * Test deleting with valid index","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":" // * */","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":105,"author":{"gitId":"StevenGX12"},"content":" void testDeleteValidIndex() {","lastModifiedDate":"2023-10-21"},{"lineNumber":106,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have deleted the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"lisizhuang-0121"},"content":" \" [S][X] Question1 / Answer1 | Mod1 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":" \" Now you have 3 questions in the list! UWU\";","lastModifiedDate":"2023-10-21"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" questionList.deleteQuestionByIndex(1);","lastModifiedDate":"2023-10-21"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-21"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":9,"StevenGX12":88,"James-Hong-Jey":4,"lisizhuang-0121":11}},{"path":"src/test/java/quizhub/command/CommandEditTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeAll;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"public class CommandEditTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" @BeforeAll","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" public static void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4 / NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" for (String question:questionsToAdd) {","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with out-of-bound index","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" void testEditOutOfBoundIndex(){","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"Ono! Please enter valid question number *sobs*\";","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit -1 /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with non-integer index","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" void testEditNonIntIndex(){","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit abc /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with blank description and answer","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" void testEditBlankDes(){","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_KEYWORD_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 1 /description \";","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled answer and blank description","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" void testEditBlankAns(){","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_KEYWORD_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 1 /answer \";","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled description and blank answer","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":" void testEditNoIndex(){","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandEdit.MISSING_INDEX_MSG.strip() + CommandEdit.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit \";","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" * Test editing with filled description and answer","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" * */","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"StevenGX12"},"content":" void testEditValidDescription(){","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have edited the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" \" [S][X] NewDescription / Answer3 | Mod3 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" \" Now you have 4 questions in the list! UWU\";","lastModifiedDate":"2023-10-17"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 3 /description NewDescription\";","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" * Test editing with filled description and answer","lastModifiedDate":"2023-10-17"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":139,"author":{"gitId":"StevenGX12"},"content":" void testEditValidAnswer(){","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have edited the following question \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"StevenGX12"},"content":" \" [S][] Question4 / NewAnswer | Mod4 | NORMAL\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" \" Now you have 4 questions in the list! UWU\";","lastModifiedDate":"2023-10-17"},{"lineNumber":143,"author":{"gitId":"StevenGX12"},"content":" String userInput \u003d \"edit 4 /answer NewAnswer\";","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(userInput).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spinoandraptos":98,"StevenGX12":29,"James-Hong-Jey":5,"lisizhuang-0121":15}},{"path":"src/test/java/quizhub/command/CommandFindTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeAll;","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":"public class CommandFindTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" @BeforeAll","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" public static void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" \"short Question4 / Answer4 / Mod4 / NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" };","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-21"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"StevenGX12"},"content":" for (String question:questionsToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"StevenGX12"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"StevenGX12"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"StevenGX12"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"StevenGX12"},"content":" assert expectedOutput !\u003d null : \"Expected output should not be null\";","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":74,"author":{"gitId":"StevenGX12"},"content":" * Test finding with no criteria","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" void testFindNoCriteria() {","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_CRITERIA_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with no keyword","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionNoKeyword() {","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_KEYWORD_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with matches","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-21"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionWithMatches() {","lastModifiedDate":"2023-10-21"},{"lineNumber":100,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 1: [S][X] Question1 / Answer1 | Mod1 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 2: [S][] Question2 / Answer2 | Mod2 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"lisizhuang-0121"},"content":" + \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" + \" 4: [S][] Question4 / Answer4 | Mod4 | NORMAL\";","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description Question\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-21"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-21"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":" * Test finding by description with no matches","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" void testFindDescriptionNoMatches() {","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":" + \" No results found :\u003c Check your keyword is correct?\";","lastModifiedDate":"2023-10-18"},{"lineNumber":117,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(\"find /description no matches\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":119,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":120,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with no keyword","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleNoKeyword() {","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandFind.MISSING_KEYWORD_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"StevenGX12"},"content":" CommandFind.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput.strip());","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with matches","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"StevenGX12"},"content":" */ ","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleWithMatches() {","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"StevenGX12"},"content":" + \" 1: [S][X] Question1 / Answer1 | Mod1 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"StevenGX12"},"content":" + \" 2: [S][] Question2 / Answer2 | Mod2 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"StevenGX12"},"content":" + \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\"","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"StevenGX12"},"content":" + \" 4: [S][] Question4 / Answer4 | Mod4 | NORMAL\";","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module Mod\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"StevenGX12"},"content":" * Test finding by module with no matches","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"StevenGX12"},"content":" */","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"StevenGX12"},"content":" void testFindModuleNoMatches() {","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"StevenGX12"},"content":" String expectedOutput \u003d \"Here are questions that matched your search:\"","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"StevenGX12"},"content":" + \" No results found :\u003c Check your module is correct?\";","lastModifiedDate":"2023-10-26"},{"lineNumber":153,"author":{"gitId":"StevenGX12"},"content":" Parser.parseCommand(\"find /module no matches\").executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":154,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-26"},{"lineNumber":155,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":156,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":10,"StevenGX12":112,"James-Hong-Jey":2,"lisizhuang-0121":32}},{"path":"src/test/java/quizhub/command/CommandHelpTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"StevenGX12"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-18"},{"lineNumber":2,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":3,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-18"},{"lineNumber":4,"author":{"gitId":"StevenGX12"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":5,"author":{"gitId":"StevenGX12"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-18"},{"lineNumber":6,"author":{"gitId":"StevenGX12"},"content":"import quizhub.storage.Storage;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"StevenGX12"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"StevenGX12"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"StevenGX12"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"StevenGX12"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-18"},{"lineNumber":16,"author":{"gitId":"StevenGX12"},"content":"import java.util.List;","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"StevenGX12"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"StevenGX12"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"StevenGX12"},"content":"public class CommandHelpTest {","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"StevenGX12"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"StevenGX12"},"content":" private Ui mockUi;","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"StevenGX12"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"StevenGX12"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"StevenGX12"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"StevenGX12"},"content":" @BeforeEach","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"StevenGX12"},"content":" public void setUp(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"StevenGX12"},"content":" // Create a temporary file in the tempDir","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"StevenGX12"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"StevenGX12"},"content":" mockStorage \u003d new MockStorage(tempFile.toString()); // Pass the temporary file path","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"StevenGX12"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"StevenGX12"},"content":" mockUi \u003d new Ui(mockStorage,questionList);","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"StevenGX12"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"StevenGX12"},"content":" @AfterEach","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"StevenGX12"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"StevenGX12"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"StevenGX12"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"StevenGX12"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"StevenGX12"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"StevenGX12"},"content":" ","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"StevenGX12"},"content":" /**","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" * Test if help command displays the correct output","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"StevenGX12"},"content":" * */","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"StevenGX12"},"content":" @Test","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"StevenGX12"},"content":" public void testHelpCommand() {","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"James-Hong-Jey"},"content":" String expectedOutput\u003d \" Here are the list of commands you can use:\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"James-Hong-Jey"},"content":" \" 1. help - shows the list of commands you can use\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"James-Hong-Jey"},"content":" \" 2. short [question]/[answer]/[module]/[difficulty] - adds a short answer question and \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"James-Hong-Jey"},"content":" \"its answer to the list,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"James-Hong-Jey"},"content":" \" 3. list - shows the list of questions and answers,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"James-Hong-Jey"},"content":" \" 4. delete [question number] - deletes the question and answer at the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"James-Hong-Jey"},"content":" \" 5. find /[description] - displays all questions that contains the the specified description,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"James-Hong-Jey"},"content":" \" 6. find /[module] - displays all questions that belong to the specified module,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"James-Hong-Jey"},"content":" \" 7. edit [question number] /description [description] - edits the description of the question \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"James-Hong-Jey"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"James-Hong-Jey"},"content":" \" 8. edit [question number] /answer [answer] - edits the answer to the question with \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"James-Hong-Jey"},"content":" \"the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"James-Hong-Jey"},"content":" \" 9. start /[quiz mode] [start details] /[qn mode] - \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"James-Hong-Jey"},"content":" \"starts the quiz with option for /module or /all and /random or /normal,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"James-Hong-Jey"},"content":" \" 10. shuffle - shuffle quiz questions to a random order,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"James-Hong-Jey"},"content":" \" 11. markdiff [question number] [question difficulty] - sets the difficulty of question \" +","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"James-Hong-Jey"},"content":" \"with the specified number,\" +","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"James-Hong-Jey"},"content":" \" 12. bye - exits the program\";","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"James-Hong-Jey"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"StevenGX12"},"content":" CommandHelp help \u003d new CommandHelp();","lastModifiedDate":"2023-10-18"},{"lineNumber":78,"author":{"gitId":"StevenGX12"},"content":" help.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-18"},{"lineNumber":79,"author":{"gitId":"StevenGX12"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-18"},{"lineNumber":80,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":81,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":82,"author":{"gitId":"StevenGX12"},"content":" // MockStorage class for testing, using in-data memory","lastModifiedDate":"2023-10-18"},{"lineNumber":83,"author":{"gitId":"StevenGX12"},"content":" public class MockStorage extends Storage {","lastModifiedDate":"2023-10-18"},{"lineNumber":84,"author":{"gitId":"StevenGX12"},"content":" private List\u003cString\u003e questions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":86,"author":{"gitId":"StevenGX12"},"content":" public MockStorage(String filepath) {","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"StevenGX12"},"content":" super(filepath);","lastModifiedDate":"2023-10-18"},{"lineNumber":88,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":89,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":90,"author":{"gitId":"StevenGX12"},"content":" public void saveData(String dataToAdd) {","lastModifiedDate":"2023-10-18"},{"lineNumber":91,"author":{"gitId":"StevenGX12"},"content":" questions.add(dataToAdd);","lastModifiedDate":"2023-10-18"},{"lineNumber":92,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":93,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":94,"author":{"gitId":"StevenGX12"},"content":" public String loadData() {","lastModifiedDate":"2023-10-18"},{"lineNumber":95,"author":{"gitId":"StevenGX12"},"content":" // In-memory storage, retrieve data from the list","lastModifiedDate":"2023-10-18"},{"lineNumber":96,"author":{"gitId":"StevenGX12"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":97,"author":{"gitId":"StevenGX12"},"content":" return \"\";","lastModifiedDate":"2023-10-18"},{"lineNumber":98,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":99,"author":{"gitId":"StevenGX12"},"content":" // Concatenate the data with line breaks","lastModifiedDate":"2023-10-18"},{"lineNumber":100,"author":{"gitId":"StevenGX12"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-18"},{"lineNumber":101,"author":{"gitId":"StevenGX12"},"content":" for (String line : questions) {","lastModifiedDate":"2023-10-18"},{"lineNumber":102,"author":{"gitId":"StevenGX12"},"content":" result.append(line).append(System.lineSeparator());","lastModifiedDate":"2023-10-18"},{"lineNumber":103,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":104,"author":{"gitId":"StevenGX12"},"content":" return result.toString().trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":105,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":106,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":107,"author":{"gitId":"StevenGX12"},"content":" public boolean dataExists() {","lastModifiedDate":"2023-10-18"},{"lineNumber":108,"author":{"gitId":"StevenGX12"},"content":" return !questions.isEmpty();","lastModifiedDate":"2023-10-18"},{"lineNumber":109,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":110,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":111,"author":{"gitId":"StevenGX12"},"content":" public void clearData() {","lastModifiedDate":"2023-10-18"},{"lineNumber":112,"author":{"gitId":"StevenGX12"},"content":" questions.clear();","lastModifiedDate":"2023-10-18"},{"lineNumber":113,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":114,"author":{"gitId":"StevenGX12"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":115,"author":{"gitId":"StevenGX12"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":116,"author":{"gitId":"StevenGX12"},"content":"}","lastModifiedDate":"2023-10-18"}],"authorContributionMap":{"spinoandraptos":1,"StevenGX12":93,"James-Hong-Jey":19,"lisizhuang-0121":3}},{"path":"src/test/java/quizhub/command/CommandListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"public class CommandListTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":" private static QuestionList questionList;","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":" private static Ui ui;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private static MockStorage mockStorage;","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" public void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output.","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same.","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" * Test display of empty question list.","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" void testListEmptyList(){","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"No questions found! Time to add some OWO\";","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" * with one unmarked SHORTANSWER question.","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" void testListOneUnmarkedShort(){","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"1: [S][] Question / Answer | Mod1 | EASY\";","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question\", \"Answer\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.EASY, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" String actualOutput \u003d outputStreamCaptor.toString().strip();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * with one marked SHORTANSWER question.","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" void testListOneMarkedShort(){","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question\", \"Answer\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(1, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"1: [S][X] Question / Answer | Mod1 | HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" * Test display of populated question list","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * with a mix of marked and unmarked SHORTANSWER questions.","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" void testListMixedShorts(){","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question1\", \"Answer1\", \"Mod1\",","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":91,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question2\", \"Answer2\", \"Mod2\",","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.HARD, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question3\", \"Answer3\", \"Mod3\",","lastModifiedDate":"2023-10-26"},{"lineNumber":94,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.NORMAL, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.addShortAnswerQn(\"Question4\", \"Answer4\", \"Mod4\",","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"lisizhuang-0121"},"content":" Question.QnDifficulty.EASY, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":97,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(1, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":98,"author":{"gitId":"lisizhuang-0121"},"content":" questionList.markQuestionAsDone(3, false);","lastModifiedDate":"2023-10-26"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" \"1: [S][X] Question1 / Answer1 | Mod1 | HARD\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" \" 2: [S][] Question2 / Answer2 | Mod2 | HARD\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" \" 3: [S][X] Question3 / Answer3 | Mod3 | NORMAL\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" \" 4: [S][] Question4 / Answer4 | Mod4 | EASY\" ;","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" questionList.printQuestionList();","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"spinoandraptos":85,"lisizhuang-0121":24}},{"path":"src/test/java/quizhub/command/CommandMarkTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Assertions;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":"public class CommandMarkTest {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" * Create a new question list and populate with dummy SHORTANSWER questions","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"James-Hong-Jey"},"content":" String[] questionsToAdd \u003d { \"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\" };","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-22"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput){","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" Assertions.assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" * Test marking without question index and difficulty level","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNoIndexNoDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff\";","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.MISSING_INDEX_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" + CommandMarkDifficulty.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" * Test marking without question difficulty to assign","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNoDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1\";","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.MISSING_DIFFICULTY_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with out-of-bound index","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffOutOfBoundIndex(){","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff -1 NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with non-integer index","lastModifiedDate":"2023-10-22"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffNonIntIndex(){","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff ?@!# NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_INTEGER_INDEX_MSG.strip();","lastModifiedDate":"2023-10-27"},{"lineNumber":114,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question non-existent difficulty level","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffWrongDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 ???\";","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d Ui.INVALID_QUESTION_DIFFICULTY_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":126,"author":{"gitId":"spinoandraptos"},"content":" .replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question multiple difficulty levels","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffMultipleDifficulty(){","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 NORMAL hard EASY\";","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandMarkDifficulty.TOO_MANY_ARGUMENTS_MSG.strip()","lastModifiedDate":"2023-10-27"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" + CommandMarkDifficulty.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question same difficulty as its current one","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffRepeatedDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 1 NORMAL\";","lastModifiedDate":"2023-10-27"},{"lineNumber":149,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"Question is already set as normal ! No changes made!\";","lastModifiedDate":"2023-10-27"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" * Test marking with assigning question different, correct difficulty level","lastModifiedDate":"2023-10-22"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-22"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-22"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" void testMarkDiffCorrectDifficulty(){","lastModifiedDate":"2023-10-22"},{"lineNumber":160,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"markdiff 2 HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":161,"author":{"gitId":"lisizhuang-0121"},"content":" String expectedOutput \u003d \"Roger that! I have marked the following question as hard \u003ew\u003c !\" +","lastModifiedDate":"2023-10-26"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":" \" [S][] Question2 / Answer2 | Mod2 | HARD\";","lastModifiedDate":"2023-10-22"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-22"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"spinoandraptos":158,"James-Hong-Jey":4,"lisizhuang-0121":5}},{"path":"src/test/java/quizhub/command/CommandStartTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yeo-menghan"},"content":"package quizhub.command;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Nested;","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"yeo-menghan"},"content":"import org.junit.jupiter.api.io.TempDir;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.parser.Parser;","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.MockUi;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"yeo-menghan"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"yeo-menghan"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"yeo-menghan"},"content":"import java.nio.file.Path;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yeo-menghan"},"content":"public class CommandStartTest {","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yeo-menghan"},"content":" private QuestionList questionList;","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yeo-menghan"},"content":" private MockStorage mockStorage;","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" private Ui ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" * Compares system standard output with expected output","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" * Assertion error is thrown if the two are not the same","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" private void testCliOutputCorrectness(String expectedOutput) {","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" String actualOutput \u003d outputStreamCaptor.toString().trim();","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(\"\\r\", \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(\"\\n\", \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" actualOutput \u003d actualOutput.replace(System.lineSeparator(), \"\");","lastModifiedDate":"2023-10-27"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":38,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":39,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":40,"author":{"gitId":"spinoandraptos"},"content":" public class UninitialisedQnListBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":41,"author":{"gitId":"yeo-menghan"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yeo-menghan"},"content":" public void setUp(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yeo-menghan"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yeo-menghan"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yeo-menghan"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"yeo-menghan"},"content":" public void testStartQuizWithNoQuestions() {","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all /random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d \"No questions found! Add questions before starting the quiz.\";","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz when question list is empty","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"spinoandraptos"},"content":" * */","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"spinoandraptos"},"content":" public class InitialisedQnListWithErrorBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"spinoandraptos"},"content":" * Create a new blank question list","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) throws IOException {","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString());","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"spinoandraptos"},"content":" ui \u003d new Ui(mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d {\"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"spinoandraptos"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"spinoandraptos"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"spinoandraptos"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\"};","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"spinoandraptos"},"content":" boolean showMessage \u003d false;","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(1, showMessage);","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"spinoandraptos"},"content":" questionList.markQuestionAsDone(3, showMessage);","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"spinoandraptos"},"content":" public void setUpOutput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"spinoandraptos"},"content":" @AfterEach","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"spinoandraptos"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"spinoandraptos"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz without specifying quiz mode","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizNoQuizMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start\";","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QUIZ_MODE_MSG.strip().replace(System.lineSeparator(), \"\")","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"spinoandraptos"},"content":" + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":110,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":111,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":112,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":113,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":116,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode without start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":117,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":118,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":119,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeNoDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":120,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all\";","lastModifiedDate":"2023-10-27"},{"lineNumber":121,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":122,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":123,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":124,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":125,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":128,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":129,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":130,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":131,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":132,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all details\";","lastModifiedDate":"2023-10-27"},{"lineNumber":133,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":134,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":135,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":136,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":137,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":139,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode without start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":140,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":141,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":142,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeNoDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":143,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module\";","lastModifiedDate":"2023-10-27"},{"lineNumber":144,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_START_DETAILS.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":145,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":146,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":147,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":148,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":151,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with start details without question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":152,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":153,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":154,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsNoQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":155,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module cs2113\";","lastModifiedDate":"2023-10-27"},{"lineNumber":156,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_QN_MODE_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":157,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":158,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":159,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":160,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":161,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":163,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode without start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":164,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":165,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":166,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeNoDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":167,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module /random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":168,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.MISSING_START_DETAILS.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":169,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":170,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":171,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":172,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":173,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":174,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with excessive arguments at the back","lastModifiedDate":"2023-10-27"},{"lineNumber":175,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":176,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":177,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsWithQnModeTooManyArguments() {","lastModifiedDate":"2023-10-27"},{"lineNumber":178,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all Mod2 /normal random\";","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.TOO_MANY_ARGUMENTS_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":181,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":182,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":183,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":184,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":185,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with excessive arguments at the back","lastModifiedDate":"2023-10-27"},{"lineNumber":186,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":187,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":188,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsWithQnModeTooManyArguments() {","lastModifiedDate":"2023-10-27"},{"lineNumber":189,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod2 /random normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":190,"author":{"gitId":"spinoandraptos"},"content":" String expectedOutput \u003d CommandStart.TOO_MANY_ARGUMENTS_MSG.strip() + CommandStart.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-27"},{"lineNumber":191,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":192,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":193,"author":{"gitId":"spinoandraptos"},"content":" testCliOutputCorrectness(expectedOutput);","lastModifiedDate":"2023-10-27"},{"lineNumber":194,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":195,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":196,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":197,"author":{"gitId":"spinoandraptos"},"content":" @Nested","lastModifiedDate":"2023-10-27"},{"lineNumber":198,"author":{"gitId":"spinoandraptos"},"content":" public class InitialisedQnListWithoutErrorBlock {","lastModifiedDate":"2023-10-27"},{"lineNumber":199,"author":{"gitId":"spinoandraptos"},"content":" MockUi mockUi;","lastModifiedDate":"2023-10-27"},{"lineNumber":200,"author":{"gitId":"spinoandraptos"},"content":" @BeforeEach","lastModifiedDate":"2023-10-27"},{"lineNumber":201,"author":{"gitId":"spinoandraptos"},"content":" public void setQuestionList(@TempDir Path tempDir) {","lastModifiedDate":"2023-10-27"},{"lineNumber":202,"author":{"gitId":"spinoandraptos"},"content":" // Create a temporary file in the tempDir","lastModifiedDate":"2023-10-27"},{"lineNumber":203,"author":{"gitId":"spinoandraptos"},"content":" Path tempFile \u003d tempDir.resolve(\"testStorage.txt\");","lastModifiedDate":"2023-10-27"},{"lineNumber":204,"author":{"gitId":"spinoandraptos"},"content":" mockStorage \u003d new MockStorage(tempFile.toString()); // Pass the temporary file path","lastModifiedDate":"2023-10-27"},{"lineNumber":205,"author":{"gitId":"spinoandraptos"},"content":" questionList \u003d new QuestionList();","lastModifiedDate":"2023-10-27"},{"lineNumber":206,"author":{"gitId":"spinoandraptos"},"content":" mockUi \u003d new MockUi(questionList, mockStorage);","lastModifiedDate":"2023-10-27"},{"lineNumber":207,"author":{"gitId":"spinoandraptos"},"content":" String[] questionsToAdd \u003d {\"short Question1 / Answer1 / Mod1 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"spinoandraptos"},"content":" \"short Question2 / Answer2 / Mod2 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"spinoandraptos"},"content":" \"short Question3 / Answer3 / Mod3 / NORMAL\",","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"spinoandraptos"},"content":" \"short Question4 / Answer4 / Mod4/ NORMAL\"};","lastModifiedDate":"2023-10-27"},{"lineNumber":211,"author":{"gitId":"spinoandraptos"},"content":" for (String question : questionsToAdd) {","lastModifiedDate":"2023-10-27"},{"lineNumber":212,"author":{"gitId":"spinoandraptos"},"content":" Parser.parseCommand(question).executeCommand(ui, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":213,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":214,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":215,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":216,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode without start details with question mode random","lastModifiedDate":"2023-10-27"},{"lineNumber":217,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":218,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":219,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeNoDetailsWithRandomQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":220,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":221,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":222,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":223,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer4\");","lastModifiedDate":"2023-10-27"},{"lineNumber":224,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":225,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":226,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":227,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 4/4\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":228,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":229,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":230,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":231,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in all mode with start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":232,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":233,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":234,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizAllModeWithDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":235,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":236,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer8\");","lastModifiedDate":"2023-10-27"},{"lineNumber":237,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":238,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":239,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /all details /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":240,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":241,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":242,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 2/4\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":243,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":244,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":245,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":246,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":247,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":248,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":249,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer1\");","lastModifiedDate":"2023-10-27"},{"lineNumber":250,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod3 /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":251,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":252,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":253,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 0/1\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":254,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":255,"author":{"gitId":"yeo-menghan"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":256,"author":{"gitId":"spinoandraptos"},"content":" /**","lastModifiedDate":"2023-10-27"},{"lineNumber":257,"author":{"gitId":"spinoandraptos"},"content":" * Test starting quiz in module mode with multiple start details with question mode","lastModifiedDate":"2023-10-27"},{"lineNumber":258,"author":{"gitId":"spinoandraptos"},"content":" */","lastModifiedDate":"2023-10-27"},{"lineNumber":259,"author":{"gitId":"spinoandraptos"},"content":" @Test","lastModifiedDate":"2023-10-27"},{"lineNumber":260,"author":{"gitId":"spinoandraptos"},"content":" public void testStartQuizModuleModeWithMultipleDetailsWithQnMode() {","lastModifiedDate":"2023-10-27"},{"lineNumber":261,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer3\");","lastModifiedDate":"2023-10-27"},{"lineNumber":262,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer4\");","lastModifiedDate":"2023-10-27"},{"lineNumber":263,"author":{"gitId":"spinoandraptos"},"content":" mockUi.setUserInput(\"Answer2\");","lastModifiedDate":"2023-10-27"},{"lineNumber":264,"author":{"gitId":"spinoandraptos"},"content":" String input \u003d \"start /module Mod3 Mod1 Mod2 /normal\";","lastModifiedDate":"2023-10-27"},{"lineNumber":265,"author":{"gitId":"spinoandraptos"},"content":" Command command \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":266,"author":{"gitId":"spinoandraptos"},"content":" command.executeCommand(mockUi, mockStorage, questionList);","lastModifiedDate":"2023-10-27"},{"lineNumber":267,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\" Your score: 2/3\", mockUi.getLastDisplayedMessage());","lastModifiedDate":"2023-10-27"},{"lineNumber":268,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":269,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":270,"author":{"gitId":"yeo-menghan"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":271,"author":{"gitId":"yeo-menghan"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spinoandraptos":223,"yeo-menghan":48}},{"path":"src/test/java/quizhub/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"lisizhuang-0121"},"content":"package quizhub.parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"lisizhuang-0121"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.command.Command;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"lisizhuang-0121"},"content":"import quizhub.command.CommandDelete;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.command.CommandInvalid;","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.ui.Ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"lisizhuang-0121"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"lisizhuang-0121"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"lisizhuang-0121"},"content":"class ParserTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"lisizhuang-0121"},"content":" private Parser parser;","lastModifiedDate":"2023-10-12"},{"lineNumber":19,"author":{"gitId":"James-Hong-Jey"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":21,"author":{"gitId":"lisizhuang-0121"},"content":" @BeforeEach","lastModifiedDate":"2023-10-12"},{"lineNumber":22,"author":{"gitId":"lisizhuang-0121"},"content":" public void setUp() {","lastModifiedDate":"2023-10-12"},{"lineNumber":23,"author":{"gitId":"lisizhuang-0121"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-12"},{"lineNumber":24,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":25,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":26,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":27,"author":{"gitId":"lisizhuang-0121"},"content":" * Test command parser with empty commands (invalid commands)","lastModifiedDate":"2023-10-12"},{"lineNumber":28,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":29,"author":{"gitId":"lisizhuang-0121"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":30,"author":{"gitId":"lisizhuang-0121"},"content":" void test_parseCommand_emptyCommand() {","lastModifiedDate":"2023-10-12"},{"lineNumber":31,"author":{"gitId":"lisizhuang-0121"},"content":" final String[] emptyInputs \u003d { \"\", \" \", \"\\n \\n\" };","lastModifiedDate":"2023-10-12"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" final String resultMessage \u003d Ui.INVALID_COMMAND_MSG + System.lineSeparator() + Ui.INVALID_COMMAND_FEEDBACK;","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" parseAndAssertIncorrectWithMessage(resultMessage, emptyInputs);","lastModifiedDate":"2023-10-12"},{"lineNumber":34,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":35,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":36,"author":{"gitId":"lisizhuang-0121"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":37,"author":{"gitId":"lisizhuang-0121"},"content":" void test_parseCommand_invalidIntegerCommand() {","lastModifiedDate":"2023-10-12"},{"lineNumber":38,"author":{"gitId":"lisizhuang-0121"},"content":" final String[] invalidIntegers \u003d {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"lisizhuang-0121"},"content":" \"delete system32\",","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"lisizhuang-0121"},"content":" \"delete 1111111111111111111111111111111111111111111111111\"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"lisizhuang-0121"},"content":" };","lastModifiedDate":"2023-10-12"},{"lineNumber":42,"author":{"gitId":"spinoandraptos"},"content":" final String resultMessage \u003d Ui.INVALID_INTEGER_INDEX_MSG +","lastModifiedDate":"2023-10-27"},{"lineNumber":43,"author":{"gitId":"lisizhuang-0121"},"content":" System.lineSeparator() + CommandDelete.INVALID_FORMAT_MSG;","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"lisizhuang-0121"},"content":" parseAndAssertIncorrectWithMessage(resultMessage, invalidIntegers);","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":46,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":47,"author":{"gitId":"lisizhuang-0121"},"content":" /*","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"James-Hong-Jey"},"content":" @Test","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"spinoandraptos"},"content":" void test_parseCommand_commandShortAnswer() {","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"James-Hong-Jey"},"content":" final String validInput \u003d \"short What\u0027s 9 + 10 / 21\";","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"James-Hong-Jey"},"content":" CommandShortAnswer result \u003d parseAndAssertCommandType(validInput, CommandShortAnswer.class);","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"James-Hong-Jey"},"content":" assertEquals(\"short What\u0027s 9 + 10 / 21\", result.getUserInput());","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"lisizhuang-0121"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":57,"author":{"gitId":"lisizhuang-0121"},"content":" * Test list of INVALID inputs and validate their feedback","lastModifiedDate":"2023-10-12"},{"lineNumber":58,"author":{"gitId":"lisizhuang-0121"},"content":" * This function is adapted from ADDRESS_BOOK_LEVEL_2","lastModifiedDate":"2023-10-12"},{"lineNumber":59,"author":{"gitId":"lisizhuang-0121"},"content":" * @param feedback The target feedback message for invalid command","lastModifiedDate":"2023-10-12"},{"lineNumber":60,"author":{"gitId":"lisizhuang-0121"},"content":" * @param inputs The invalid inputs that would generate the same feedback","lastModifiedDate":"2023-10-12"},{"lineNumber":61,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":62,"author":{"gitId":"lisizhuang-0121"},"content":" private void parseAndAssertIncorrectWithMessage(String feedback, String[] inputs) {","lastModifiedDate":"2023-10-12"},{"lineNumber":63,"author":{"gitId":"lisizhuang-0121"},"content":" for (String input : inputs) {","lastModifiedDate":"2023-10-12"},{"lineNumber":64,"author":{"gitId":"lisizhuang-0121"},"content":" final CommandInvalid result \u003d parseAndAssertCommandType(input, CommandInvalid.class);","lastModifiedDate":"2023-10-12"},{"lineNumber":65,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(feedback, result.feedback);","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":67,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":68,"author":{"gitId":"lisizhuang-0121"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":69,"author":{"gitId":"lisizhuang-0121"},"content":" /**","lastModifiedDate":"2023-10-12"},{"lineNumber":70,"author":{"gitId":"lisizhuang-0121"},"content":" * Parses and tests the command type returned","lastModifiedDate":"2023-10-12"},{"lineNumber":71,"author":{"gitId":"lisizhuang-0121"},"content":" * This function is adapted from ADDRESS_BOOK_LEVEL_2","lastModifiedDate":"2023-10-12"},{"lineNumber":72,"author":{"gitId":"lisizhuang-0121"},"content":" * @param input The command input to be tested","lastModifiedDate":"2023-10-12"},{"lineNumber":73,"author":{"gitId":"lisizhuang-0121"},"content":" * @param expectedClass The expected command class","lastModifiedDate":"2023-10-12"},{"lineNumber":74,"author":{"gitId":"lisizhuang-0121"},"content":" * */","lastModifiedDate":"2023-10-12"},{"lineNumber":75,"author":{"gitId":"lisizhuang-0121"},"content":" private \u003cT extends Command\u003e T parseAndAssertCommandType(String input, Class\u003cT\u003e expectedClass) {","lastModifiedDate":"2023-10-12"},{"lineNumber":76,"author":{"gitId":"spinoandraptos"},"content":" final Command result \u003d Parser.parseCommand(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"lisizhuang-0121"},"content":" assertTrue(result.getClass().isAssignableFrom(expectedClass));","lastModifiedDate":"2023-10-12"},{"lineNumber":78,"author":{"gitId":"lisizhuang-0121"},"content":" return (T) result;","lastModifiedDate":"2023-10-12"},{"lineNumber":79,"author":{"gitId":"lisizhuang-0121"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":80,"author":{"gitId":"lisizhuang-0121"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"spinoandraptos":8,"James-Hong-Jey":10,"lisizhuang-0121":62}},{"path":"src/test/java/quizhub/questionlist/QuestionListTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"James-Hong-Jey"},"content":"package quizhub.questionlist;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"James-Hong-Jey"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.question.Question;","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"James-Hong-Jey"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"James-Hong-Jey"},"content":"class QuestionListTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"James-Hong-Jey"},"content":" private final PrintStream standardOut \u003d System.out;","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"James-Hong-Jey"},"content":" private final ByteArrayOutputStream outputStreamCaptor \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"James-Hong-Jey"},"content":" @BeforeEach","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"James-Hong-Jey"},"content":" public void setUp() {","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"James-Hong-Jey"},"content":" System.setOut(new PrintStream(outputStreamCaptor));","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"James-Hong-Jey"},"content":" @AfterEach","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"James-Hong-Jey"},"content":" public void tearDown() {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"James-Hong-Jey"},"content":" System.setOut(standardOut);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"James-Hong-Jey"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"James-Hong-Jey"},"content":" void test_addToQuestionList_valid() {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" Question.QnType qnType \u003d Question.QnType.SHORTANSWER;","lastModifiedDate":"2023-10-21"},{"lineNumber":30,"author":{"gitId":"James-Hong-Jey"},"content":" boolean showMessage \u003d true;","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"James-Hong-Jey"},"content":" QuestionList qns \u003d new QuestionList();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"lisizhuang-0121"},"content":" qns.addShortAnswerQn(\"Question\", \"Answer\",","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"lisizhuang-0121"},"content":" \"Mod1\", Question.QnDifficulty.NORMAL, true);","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" assertEquals(\"I have added the following question OwO:\" +","lastModifiedDate":"2023-10-21"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" \" [S] Question / Answer | Mod1 | NORMAL Now you have 1 questions in the list! UWU\",","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" outputStreamCaptor.toString().strip().replaceAll(\"\\\\R\", \"\"));","lastModifiedDate":"2023-10-21"},{"lineNumber":37,"author":{"gitId":"James-Hong-Jey"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"James-Hong-Jey"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"James-Hong-Jey"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"spinoandraptos":6,"James-Hong-Jey":31,"lisizhuang-0121":2}},{"path":"src/test/java/quizhub/storage/MockStorage.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.storage;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import java.util.List;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"public class MockStorage extends Storage {","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":" private List\u003cString\u003e questions \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":" public MockStorage(String filepath) {","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" super(filepath);","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" public void saveData(String dataToAdd) {","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" questions.add(dataToAdd);","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" public String loadData() {","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" // In-memory storage, retrieve data from the list","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":" if (questions.isEmpty()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" return \"\";","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" // Concatenate the data with line breaks","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" StringBuilder result \u003d new StringBuilder();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" for (String line : questions) {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" result.append(line).append(System.lineSeparator());","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" return result.toString().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" public boolean dataExists() {","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":" return !questions.isEmpty();","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" public void clearData() {","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":" questions.clear();","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"spinoandraptos":37}},{"path":"src/test/java/quizhub/ui/MockUi.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"spinoandraptos"},"content":"package quizhub.ui;","lastModifiedDate":"2023-10-27"},{"lineNumber":2,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":3,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.questionlist.QuestionList;","lastModifiedDate":"2023-10-27"},{"lineNumber":4,"author":{"gitId":"spinoandraptos"},"content":"import quizhub.storage.MockStorage;","lastModifiedDate":"2023-10-27"},{"lineNumber":5,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":6,"author":{"gitId":"spinoandraptos"},"content":"import java.util.LinkedList;","lastModifiedDate":"2023-10-27"},{"lineNumber":7,"author":{"gitId":"spinoandraptos"},"content":"import java.util.Queue;","lastModifiedDate":"2023-10-27"},{"lineNumber":8,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":9,"author":{"gitId":"spinoandraptos"},"content":"public class MockUi extends Ui {","lastModifiedDate":"2023-10-27"},{"lineNumber":10,"author":{"gitId":"spinoandraptos"},"content":" private final Queue\u003cString\u003e userInputQueue \u003d new LinkedList\u003c\u003e();","lastModifiedDate":"2023-10-27"},{"lineNumber":11,"author":{"gitId":"spinoandraptos"},"content":" private String lastDisplayedMessage;","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"spinoandraptos"},"content":" public MockUi(QuestionList tasks, MockStorage mockStorage) {","lastModifiedDate":"2023-10-27"},{"lineNumber":13,"author":{"gitId":"spinoandraptos"},"content":" super(mockStorage, tasks);","lastModifiedDate":"2023-10-27"},{"lineNumber":14,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":15,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"spinoandraptos"},"content":" public void setUserInput(String input) {","lastModifiedDate":"2023-10-27"},{"lineNumber":17,"author":{"gitId":"spinoandraptos"},"content":" userInputQueue.add(input);","lastModifiedDate":"2023-10-27"},{"lineNumber":18,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":19,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":20,"author":{"gitId":"spinoandraptos"},"content":" public String getUserInput() {","lastModifiedDate":"2023-10-27"},{"lineNumber":21,"author":{"gitId":"spinoandraptos"},"content":" if (userInputQueue.isEmpty()) {","lastModifiedDate":"2023-10-27"},{"lineNumber":22,"author":{"gitId":"spinoandraptos"},"content":" throw new RuntimeException(\"No more user inputs provided.\");","lastModifiedDate":"2023-10-27"},{"lineNumber":23,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"spinoandraptos"},"content":" return userInputQueue.poll();","lastModifiedDate":"2023-10-27"},{"lineNumber":25,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":27,"author":{"gitId":"spinoandraptos"},"content":" @Override","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"spinoandraptos"},"content":" public void displayMessage(String message) {","lastModifiedDate":"2023-10-27"},{"lineNumber":29,"author":{"gitId":"spinoandraptos"},"content":" lastDisplayedMessage \u003d message;","lastModifiedDate":"2023-10-27"},{"lineNumber":30,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":31,"author":{"gitId":"spinoandraptos"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":32,"author":{"gitId":"spinoandraptos"},"content":" public String getLastDisplayedMessage() {","lastModifiedDate":"2023-10-27"},{"lineNumber":33,"author":{"gitId":"spinoandraptos"},"content":" return lastDisplayedMessage;","lastModifiedDate":"2023-10-27"},{"lineNumber":34,"author":{"gitId":"spinoandraptos"},"content":" }","lastModifiedDate":"2023-10-27"},{"lineNumber":35,"author":{"gitId":"spinoandraptos"},"content":"}","lastModifiedDate":"2023-10-27"}],"authorContributionMap":{"spinoandraptos":35}}] diff --git a/AY2324S1-CS2113-W12-1_tp_master/commits.json b/AY2324S1-CS2113-W12-1_tp_master/commits.json index 6501fbd..b63eac4 100644 --- a/AY2324S1-CS2113-W12-1_tp_master/commits.json +++ b/AY2324S1-CS2113-W12-1_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"spinoandraptos":[{"date":"2023-10-04","commitResults":[{"hash":"6c6d1698f76fbc9d508f95105074ab9f2110d65c","isMergeCommit":true,"messageTitle":"Merge pull request #3 from StevenGX12/master","messageBody":"Add Guan Xiao","fileTypesAndContributionMap":{}},{"hash":"df29befffe396116433778af88e0a3623bece7fc","isMergeCommit":false,"messageTitle":"add Juncheng","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"419f657d64069e11fed53b7deb272799c0cf26f6","isMergeCommit":false,"messageTitle":"Refactoring","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1335,"deletions":21}}},{"hash":"7d646598095de5b46119f52d8328c6dcbe88e668","isMergeCommit":true,"messageTitle":"Merge pull request #6 from spinoandraptos/master","messageBody":"Refactoring","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"84ed7d900a90383cf0be6bb3cf33621d45496623","isMergeCommit":true,"messageTitle":"Merge pull request #8 from James-Hong-Jey/master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"174c6b202404b7d3e4890aea3b763a50171dff07","isMergeCommit":true,"messageTitle":"Merge pull request #9 from James-Hong-Jey/master","messageBody":"Add CommandShortAnswer, Update Parser","fileTypesAndContributionMap":{}},{"hash":"3189b597a50f04c45de9a88523964aeeb1bdcb7f","isMergeCommit":false,"messageTitle":"Added CommandEdit, Implemented Storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":154,"deletions":112},"other":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-12","commitResults":[{"hash":"8c043626b9ce59e181aef4173d1ccfd720fa7a51","isMergeCommit":true,"messageTitle":"Merge pull request #29 from lisizhuang-0121/master","messageBody":"Closes #27 Add skeleton for Parser JUnit test with test cases of invalid commands","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"d2d4c2442c60bc271a2448e5e30c354de723dfc5","isMergeCommit":false,"messageTitle":"Added tests for edit and list commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2},"test-code":{"insertions":223,"deletions":0}}},{"hash":"619754ac78040fedfcce7715229d1123faf8ff29","isMergeCommit":true,"messageTitle":"Merge pull request #35 from yeo-menghan/branch-Logger","messageBody":"Add CustomLogger Class - provide logging capabilities to QuizHub","fileTypesAndContributionMap":{}},{"hash":"9d306428b7e46da2eac2f6a781e197979ed989ed","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into junit-test-edit-list-command","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"77d5af63c40d5d1fec590a1839a9bda7e30cd8e5","isMergeCommit":true,"messageTitle":"Merge pull request #39 from StevenGX12/branch-junit-test-help-delete-find-command","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"02b2e656c2151f89645110e520df79a52d260788","isMergeCommit":true,"messageTitle":"Merge pull request #41 from lisizhuang-0121/master","messageBody":"Fix bug in editing questions and answers","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"803188901bf34d49d8dc2801c4b8f85cb756afdb","isMergeCommit":true,"messageTitle":"Merge pull request #50 from StevenGX12/branch-categorize-questions-by-module","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ac9694149cfd7f2e2faa3ae9a451f888d61f47ba","isMergeCommit":false,"messageTitle":"Refactored code to meet coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":111,"deletions":94},"other":{"insertions":2,"deletions":2},"test-code":{"insertions":63,"deletions":46}}},{"hash":"31df027fc7a15af84706e70831cd02a150409e39","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into code-quality-control","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7201655780fe5ec8aa3946d5fcb1468a03bda511","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"b1d0b039dda0013076f420c3744f03bf48e6d6c7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into code-quality-control","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"ff0205d612d5ceed374eb84a5dc5c2221c1beeb7","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":8,"deletions":83}}},{"hash":"96298734d292a2b39b661555af39485f9dab05a8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/spinoandraptos/tp into code-quality-control","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c0c68817e875fde5abfa7df5d05d0c1f512f5450","isMergeCommit":true,"messageTitle":"Merge branch \u0027code-quality-control\u0027 of https://github.com/spinoandraptos/tp into code-quality-control","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"0450003a6bc37a4824ffa42b902355ba2327077e","isMergeCommit":false,"messageTitle":"Refactored Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":11},"other":{"insertions":1,"deletions":1}}},{"hash":"22bc37216bfac6f1c761c71c5d22a7d66f467c43","isMergeCommit":false,"messageTitle":"Updated checkstyle version","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"28760df5d989cd3a75edd708e8a274374fd22e7f","isMergeCommit":false,"messageTitle":"Refactored code for coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":12}}},{"hash":"a942565335e3305fe202aea376a37b30675cebf1","isMergeCommit":false,"messageTitle":"Refactored Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":11}}},{"hash":"21f04502757b120fc73d5f0e5b738db96844a704","isMergeCommit":true,"messageTitle":"Merge pull request #56 from spinoandraptos/code-quality-control","messageBody":"Refactored code to meet coding standards","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"cb2634cafc2f25b928067ae2c5a360551b11b068","isMergeCommit":false,"messageTitle":"Added question difficulty levels","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":360,"deletions":126},"test-code":{"insertions":59,"deletions":54}}},{"hash":"395063d74f60e949ba60c3fb9f10d3f500a9e6fb","isMergeCommit":true,"messageTitle":"Merge pull request #57 from spinoandraptos/mark-questions","messageBody":"Added question difficulty levels","fileTypesAndContributionMap":{}},{"hash":"596ab0e3e0926218008b05da298bf26f627e6980","isMergeCommit":false,"messageTitle":"Added categorisation for quiz modes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":11},"test-code":{"insertions":2,"deletions":2}}},{"hash":"e0ede314755aa5c33370733627aebd54ba62976d","isMergeCommit":true,"messageTitle":"Merge pull request #59 from spinoandraptos/categorise-questions","messageBody":"Added categorisation to organise quiz questions by module","fileTypesAndContributionMap":{}},{"hash":"45183848877790c1b25b0c46e295570a906149a1","isMergeCommit":false,"messageTitle":"Added Junit testing for command to mark question difficulty, abstracted out class MockStorage for reuse during testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":186,"deletions":35}}},{"hash":"86d74d03ea53982ce91b3495df39f255fbd2023a","isMergeCommit":false,"messageTitle":"Added junit testing for command to mark question difficulty, abstracted out class MockStorage for easy reuse in testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":192,"deletions":36}}},{"hash":"2c95f662f577ae85402c9f6e201aed789e4fee4a","isMergeCommit":true,"messageTitle":"Merge pull request #62 from spinoandraptos/junit-mark-difficulty","messageBody":"Added junit testing for command to mark question difficulty, abstract…","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"7412057e77ee27c74055b20055258a24b3543468","isMergeCommit":true,"messageTitle":"Merge branch \u0027junit-mark-difficulty\u0027","messageBody":"# Conflicts:\n#\tsrc/test/java/quizhub/command/CommandDeleteTest.java\n#\tsrc/test/java/quizhub/command/CommandMarkTest.java\n#\tsrc/test/java/quizhub/storage/MockStorage.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"076594dc7c3f40cb8ba6d368a569ffb71dd4b313","isMergeCommit":true,"messageTitle":"Developer guide - added parser details","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"30d21e663aad83726249ee80c1a679e99a243ab1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-RandomQnsStart","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"65895a275aad73ce81415e2a417c0afbfdc7ef9d","isMergeCommit":true,"messageTitle":"Merge pull request #66 from yeo-menghan/branch-RandomQnsStart","messageBody":"Clarify details for Start command in parser","fileTypesAndContributionMap":{}},{"hash":"784e934163a5651180b64ecc00be36a14ec45b1b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into developer-guide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c795434676e4e1e54667589b68086f6bd70a0145","isMergeCommit":true,"messageTitle":"Merge pull request #67 from spinoandraptos/developer-guide","messageBody":"Developer guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"eaec1cdac145b8d2e9350b6a523da42ed8ee5c11","isMergeCommit":false,"messageTitle":"Optimised question difficulty processing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":23}}},{"hash":"8460f898f85d5c7bee4242cf0ff835dc825c7fe4","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/parser/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"b501674b35695192c02516c01ccfbef2348851e0","isMergeCommit":true,"messageTitle":"Merge pull request #77 from spinoandraptos/master","messageBody":"Optimised question difficulty interpreting","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"9d20f3f3662467dfe485c090a4f5c26ca0bfb17e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"24e0b27d25c307fb92fea9460feba9f91b0c4cb1","isMergeCommit":false,"messageTitle":"Abstracted command parsing for CommandMarkDifficulty and CommandStart into the Parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":85,"deletions":62}}},{"hash":"e698226b035dc121af0a2c7b14823f9cbc231e8c","isMergeCommit":false,"messageTitle":"Documentation fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"f028743ca528591025ae81dbe26ffbf59ad1adc5","isMergeCommit":false,"messageTitle":"Checkstyle fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"1552d4abd894466393d25f95f969781e366c8d51","isMergeCommit":true,"messageTitle":"Merge pull request #96 from spinoandraptos/parser-refactoring","messageBody":"Abstracted command parsing from CommandMarkDifficulty and CommandStart into Parser class","fileTypesAndContributionMap":{}},{"hash":"ca9052578ebab34d31bd32ccc32b0b473ddb9d88","isMergeCommit":false,"messageTitle":"Fixed UI display errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-27","commitResults":[{"hash":"a9353f69c3c628907557794a4f0327a8c6771b4a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95dc70f0db3ad00e68e2588fe735bc468849f293","isMergeCommit":false,"messageTitle":"Updated Junit tests for CommandStart and CommandMarkDifficulty","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":71},"other":{"insertions":1,"deletions":0},"test-code":{"insertions":339,"deletions":208}}},{"hash":"fb19b6801138c5d05e73c89c3b287c33ccd1dbb7","isMergeCommit":false,"messageTitle":"Fixed Checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"87bc426b2f8fdc90be5341f93cbe2f05a32beca9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0d8604dfcb65893f874a233671b17eafcf524ae7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into parser-refactoring-test","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"493de44748acceba4c70d6a7cc1778f3e05874f7","isMergeCommit":false,"messageTitle":"Fixed failing tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":9}}},{"hash":"85a94278750add285f2cc2d2e41bdcb66aabf68c","isMergeCommit":false,"messageTitle":"Fixed failing tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"314abaca8eba6369318b08a25edda2275731ccb4","isMergeCommit":true,"messageTitle":"Merge pull request #101 from spinoandraptos/parser-refactoring-test","messageBody":"Updated Junit tests for CommandStart and CommandMarkDifficulty","fileTypesAndContributionMap":{}},{"hash":"3dce94b26f7ab31c447340028c258c4b45906dba","isMergeCommit":true,"messageTitle":"Merge branch \u0027parser-refactoring-test\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d172b15fc19a1478c724f92be44f77874d783090","isMergeCommit":false,"messageTitle":"Updated parser parseCommand sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"69d8a0b9023f6dd1aa697f4a7e67f880b52bffb9","isMergeCommit":true,"messageTitle":"Merge pull request #108 from spinoandraptos/master","messageBody":"Updated Parser parseCommand Sequence Diagram ","fileTypesAndContributionMap":{}},{"hash":"28715538d00b192887adbc20a2ce55b394997903","isMergeCommit":false,"messageTitle":"Added DG appendix and fixed minor formatting issues","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":34}}},{"hash":"baf19adafb423d5f205aa3495809b93b30a84ed0","isMergeCommit":false,"messageTitle":"Added command edit and markdiff to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":80,"deletions":33}}},{"hash":"e610b2a7fd4591750f20e979b8444b4e0afc2978","isMergeCommit":false,"messageTitle":"Added command edit and markdiff to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":146,"deletions":109}}},{"hash":"220d1220da28ad7bc6e42a01dc39b1fecc83084b","isMergeCommit":true,"messageTitle":"Merge pull request #111 from spinoandraptos/user-guide","messageBody":"Added command edit and markdiff to UG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"5f28e1fe46eb60942bc947379ad9dc83b5fccab4","isMergeCommit":true,"messageTitle":"Merge branch \u0027user-guide\u0027","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n#\tdocs/UserGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"ec3e1cb9843b15b97dfbc52021f2a4f161060bdd","isMergeCommit":false,"messageTitle":"UG minor format issue","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0ba89c3b74848629c143b227becaed703c32f69e","isMergeCommit":false,"messageTitle":"Fixed DG merge conflict issues","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":36}}},{"hash":"f441f0a5adbc20852fb3830ec3a2a063f3d68072","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"79ec1e5ef98426f93fb6ab8b5e2286b01b14e109","isMergeCommit":false,"messageTitle":"Edited command output documentation for commandShort","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":5}}},{"hash":"04b1b0e7da9288bb64b1dd039643b78edab86cec","isMergeCommit":true,"messageTitle":"Merge pull request #115 from spinoandraptos/master","messageBody":"Fixed some UG and DG formatting issues ","fileTypesAndContributionMap":{}},{"hash":"a61da160651908eb7593de701a261cc1f07bc232","isMergeCommit":false,"messageTitle":"Fixed UG command output diplay formatting issue","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":27,"deletions":27}}},{"hash":"5feab10fa34b9586be80bcaca1c9e6d4a93a3be9","isMergeCommit":false,"messageTitle":"Fixed UG command output formatting issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":14,"deletions":1}}},{"hash":"575c352513ddd1675b3338b80dad6c6b9796d616","isMergeCommit":true,"messageTitle":"Merge pull request #116 from spinoandraptos/master","messageBody":"Fixed UG command output display formatting","fileTypesAndContributionMap":{}},{"hash":"d25ebf8db4dae0634147f8c4ac4edc916a113dcf","isMergeCommit":false,"messageTitle":"Fixed UG help command description","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":6}}},{"hash":"475c4fb2e8b2c08a0121af819ff6d8447125ca7c","isMergeCommit":true,"messageTitle":"Merge pull request #117 from spinoandraptos/master","messageBody":"Fixed UG help command description","fileTypesAndContributionMap":{}}]}],"StevenGX12":[{"date":"2023-10-04","commitResults":[{"hash":"89a5fcaa30ce7cd31fe47503bb2873226575c6b8","isMergeCommit":true,"messageTitle":"Merge pull request #2 from James-Hong-Jey/master","messageBody":"Add James","fileTypesAndContributionMap":{}},{"hash":"9dc6e6889ff581686f9e040603ee748d51c37b1a","isMergeCommit":false,"messageTitle":"added Guan Xiao AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e43a7268e881e66880f125a55ba992a5659e1637","isMergeCommit":true,"messageTitle":"resolved merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5794b6bc163b412507ec00d46d2f9627c6a034f7","isMergeCommit":true,"messageTitle":"Merge pull request #5 from lisizhuang-0121/master","messageBody":"Update aboutus.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"6dde24d6485345dc3c3bce285aa3370f4c826f7c","isMergeCommit":true,"messageTitle":"Merge pull request #12 from yeo-menghan/branch-QuizMode","messageBody":"Branch quiz mode","fileTypesAndContributionMap":{}},{"hash":"919bffd25b6508283eb156867e2dc13853958696","isMergeCommit":false,"messageTitle":"updated UI and help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":12}}}]},{"date":"2023-10-17","commitResults":[{"hash":"37e590ab99132292aba1ec5031af078a34d57805","isMergeCommit":true,"messageTitle":"Merge pull request #33 from yeo-menghan/branch-StartQuizTest","messageBody":"Branch StartTest","fileTypesAndContributionMap":{}},{"hash":"64a8e454d68bc3ae0aeba542489059b28323e079","isMergeCommit":true,"messageTitle":"Merge pull request #36 from spinoandraptos/junit-test-edit-list-command","messageBody":"Add JUnit CommandEdit, Add JUnit CommandList, Adjust Question Description Display Format","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"23ba5e69c4bbdf012c8f310e3105264004398153","isMergeCommit":false,"messageTitle":"Add Junit tests for help, find and delete commands","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":275,"deletions":0}}}]},{"date":"2023-10-21","commitResults":[{"hash":"c2027663c8ac122e37a35546af2da8be8d2a4b59","isMergeCommit":false,"messageTitle":"Update JUnit test for Help and Find commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":100,"deletions":34}}},{"hash":"18a095a2631ce870544a5c93efd82ab30779ba9b","isMergeCommit":true,"messageTitle":"Merge pull request #49 from StevenGX12/branch-junit-test-help-delete-find-command","messageBody":"Update JUnit test for Help and Find commands","fileTypesAndContributionMap":{}},{"hash":"c3b8139ffd40bc6ae94073568437b9404a5630ce","isMergeCommit":false,"messageTitle":"Add module attribute to question and search by module function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":72,"deletions":8},"test-code":{"insertions":15,"deletions":15}}}]},{"date":"2023-10-24","commitResults":[{"hash":"2f6f59f0c13ee0b29ac45e88736757b5fa17fb33","isMergeCommit":false,"messageTitle":"Add Storage component to developer guide Add several assertions in different classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0},"docs":{"insertions":47,"deletions":0},"test-code":{"insertions":2,"deletions":0}}},{"hash":"50b67f23f9b68a2f68c2912813b942e27c23d08a","isMergeCommit":false,"messageTitle":"Update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"24a0b4adcea8281b87de99a9697dcf53dbfec03f","isMergeCommit":true,"messageTitle":"Merge pull request #71 from StevenGX12/branch-developer-guide","messageBody":"Update developer guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"a42dacee2795f4d1a17444b40889359e7d35a9dc","isMergeCommit":false,"messageTitle":"Add UI component of developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":32,"deletions":0}}},{"hash":"6ce8ba86521d5a3db6dbc61b344d7ebbb2ca663b","isMergeCommit":false,"messageTitle":"Refactor parsing elements from CommandEdit to Parser Fixed tests for CommandFind and CommandEdit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":41},"test-code":{"insertions":80,"deletions":22}}},{"hash":"b0aafa75f406e3f84e19146b4783ce959f15f7a6","isMergeCommit":false,"messageTitle":"Fixed bug in CommandEditTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"32dd7db1a0dc748db256c8c676da8bc9e5b9137e","isMergeCommit":true,"messageTitle":"Merge pull request #97 from StevenGX12/branch-code-refactor","messageBody":"Refactor parsing elements from CommandEdit to Parser\r\nFixed tests for CommandFind and CommandEdit","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"54baf920c7a7fdbe6e96545125fd0369ab6de711","isMergeCommit":false,"messageTitle":"Add user guide for \u0027delete\u0027 and \u0027find\u0027 commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"932ab82eb97ae8c9f48fcf4f997751f94ce864f6","isMergeCommit":true,"messageTitle":"Merge pull request #112 from StevenGX12/branch-user-guide","messageBody":"Add user guide for \u0027delete\u0027 and \u0027find\u0027 commands","fileTypesAndContributionMap":{}}]}],"yeo-menghan":[{"date":"2023-10-04","commitResults":[{"hash":"437a578d991ab42603936e351239623440e806c8","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"Change from Duke to QuizHub on ReadMe","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"96293a9443789434cf941b15cdebf0bbfa57d745","isMergeCommit":false,"messageTitle":"Add personal details(Meng Han) on AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"568326efb68a7553262bf268501d90613739f023","isMergeCommit":true,"messageTitle":"Merge pull request #4 from spinoandraptos/master","messageBody":"add Juncheng","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"908207acef2fd89a00b4a74737adf8ded8a80145","isMergeCommit":true,"messageTitle":"Merge pull request #10 from AY2324S1-CS2113-W12-1/CommandEdit-and-Storage","messageBody":"Added CommandEdit, Implemented Storage","fileTypesAndContributionMap":{}},{"hash":"53259b048ec950c253cbc566fedba93fdad0d2f7","isMergeCommit":false,"messageTitle":"Add quiz mode with Start command - known bug: displaying both Question \u0026 Answer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":2}}},{"hash":"afbcce9d71aef01eec2235c69a34d0fe5ad737cb","isMergeCommit":false,"messageTitle":"Implement v1.0 start quiz mode - hide answer when displaying question","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":17}}}]},{"date":"2023-10-11","commitResults":[{"hash":"37435c2000856c832080cfb16ba748d83ee56dee","isMergeCommit":true,"messageTitle":"Merge pull request #13 from StevenGX12/branch-feature-ui","messageBody":"updated UI and help command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"ac403d72be67d1f75c3320a5126fbbc221e2574d","isMergeCommit":false,"messageTitle":"Add StartQuiz test in file QuestionListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":114,"deletions":0}}},{"hash":"0e8d55308019df6e501da3711ea7e1e81e61fcda","isMergeCommit":false,"messageTitle":"Add preliminary storage features - test cases 3/3 fail","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":0},"test-code":{"insertions":16,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"89aec25e8204afaf04a2a153900060902eb265fa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-StartQuizTest","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ab851efe950edee1dd31f03c777751cc81bc32f0","isMergeCommit":false,"messageTitle":"Pull from remote. Fix testStartQuizWithNoQuestions and testAddQuestionToListAndStorage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":1},"test-code":{"insertions":35,"deletions":23}}},{"hash":"e5a87ba72c59146eea2aa540c6d9059ef82dd580","isMergeCommit":false,"messageTitle":"Move QuestionListTest from parser to command - rename to StartTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"other":{"insertions":2,"deletions":2}}},{"hash":"f7fc87e17f86a4e5fa1f64ea8c8d49358f3d6f46","isMergeCommit":false,"messageTitle":"Pass 3/3 StartTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"test-code":{"insertions":5,"deletions":5}}},{"hash":"f17f3f8e6ff57b28b8b41862a9517d3efa054626","isMergeCommit":false,"messageTitle":"Add CustomLogger Class - provide logging capabilities to QuizHub","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":0}}},{"hash":"e86f5576f77bd60660ddaea01b2004011478424f","isMergeCommit":true,"messageTitle":"Merge pull request #37 from lisizhuang-0121/master","messageBody":"Fix minor code quality issues.","tags":["Version_1_0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"821b499e492917b6e4c50eba020b8c1a6839b65e","isMergeCommit":true,"messageTitle":"Merge pull request #38 from lisizhuang-0121/master","messageBody":"Fix minor bugs in adding questions and taking quiz","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"394b2be754c0261ccd2cabd51b5abc4e12ec3159","isMergeCommit":false,"messageTitle":"Update parser help for start command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":3}}},{"hash":"d276d02dc73ea4d49ec352125f1ec18acd21f6a8","isMergeCommit":false,"messageTitle":"Clarify definition of Command Shuffle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"fb00c8cb043f6bc35a76b77c4bfeb4a13af5445c","isMergeCommit":false,"messageTitle":"implement /normal and /random to startCommand to randomise or sequence questions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":4}}},{"hash":"a1f98f18b169094bf054a4639d0ec7584320f4a1","isMergeCommit":false,"messageTitle":"Refactor executeCommand in CommandStart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":32}}},{"hash":"36f65e810a94fabeabae270a05b02510a9d3761f","isMergeCommit":false,"messageTitle":"Extend short command to be clear","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"cca0cee732367b417feade88a0400aca22811735","isMergeCommit":false,"messageTitle":"Clarify details for Start command in parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"48c585a348444dc89362efbb490d443a9ff96997","isMergeCommit":false,"messageTitle":"Add /random to CommandStart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"docs":{"insertions":0,"deletions":2}}},{"hash":"bfa0dbaf71d34f67f1d77516511602d6cd51252a","isMergeCommit":true,"messageTitle":"Reimplement /random to CommandStart to resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"497a8678a512fec18759da039c2146823b2606de","isMergeCommit":false,"messageTitle":"Convert /random feature from if-else to switch","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":6}}},{"hash":"e2790379dd843d533a2efd077f72a77374fda7f5","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-RandomQnsStart","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"230a9be8548c0e1949800de7a700a91f017001c9","isMergeCommit":true,"messageTitle":"Merge pull request #68 from yeo-menghan/branch-RandomQnsStart","messageBody":"Branch random qns start","fileTypesAndContributionMap":{}},{"hash":"ee3a30e89e97a885127654cfb9922b8b2e1e7dee","isMergeCommit":false,"messageTitle":"Add StartCommand uml and StartCommand documentation to DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":66,"deletions":36}}},{"hash":"74667af8a90c7b0a99ecf14324df5242abe80b83","isMergeCommit":true,"messageTitle":"Merge pull request #69 from yeo-menghan/branch-CommandStartUML","messageBody":"Add StartCommand uml and StartCommand documentation to DeveloperGuide.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"07f3f38d233e40fb27b2343eca1cc93f006e4912","isMergeCommit":true,"messageTitle":"Merge pull request #89 from lisizhuang-0121/master","messageBody":"Fix tests in Delete, Edit, Find, List, and Start Test","fileTypesAndContributionMap":{}},{"hash":"edc42130ed23db3fc87396459b920bb24efac7a7","isMergeCommit":false,"messageTitle":"Remove \\r from failed test cases to achieve 100% test cases pass rate","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":8}}},{"hash":"a6ae45406e4159fb94ec01751c78d5e35b9cb5e3","isMergeCommit":true,"messageTitle":"Merge pull request #90 from yeo-menghan/branch-TestCI","messageBody":"Remove \\r from failed test cases to achieve 100% test cases pass rate","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"d849948bec9bff5ec4ec88243682d9bf7b71048f","isMergeCommit":false,"messageTitle":"Init CommandStartTest2","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":146,"deletions":0}}},{"hash":"67c2f966ef8db9da9605b3c496f25e2ae9bf85bf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-CommandStartTest2","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"28c555440691ba33b6669122a0bb45ff947a4867","isMergeCommit":false,"messageTitle":"Add UG for Introduction and /help command","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":33,"deletions":12},"test-code":{"insertions":0,"deletions":147}}},{"hash":"b18c8df13adb3ec8882607606e40397fa1a9562a","isMergeCommit":false,"messageTitle":"Add UG for /list and /short commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"e82b7aba052bf90723fb4bd74c79991d19846fc8","isMergeCommit":false,"messageTitle":"Add UG for /start and /shuffle commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"9e89a05f90c995aeaf1f30e7123e5d0e6b4dfba5","isMergeCommit":false,"messageTitle":"Edit feature list in UG and add Command Cheatsheet in UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":47,"deletions":41}}},{"hash":"7570f4b92f4a5c86562d382c0e05346e5e0f5480","isMergeCommit":true,"messageTitle":"Merge pull request #99 from yeo-menghan/branch-UG","messageBody":"Branch UG init","fileTypesAndContributionMap":{}}]}],"James-Hong-Jey":[{"date":"2023-10-04","commitResults":[{"hash":"cfa71b85ff164366845684af16d070e31ea60359","isMergeCommit":false,"messageTitle":"Change aboutus.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ff15f0850b54fd060d30b9efb9967fc1e0d9ab18","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"59726e824ebe24615b40411cb772b0cd1af4b63f","isMergeCommit":true,"messageTitle":"Merge pull request #7 from lisizhuang-0121/master","messageBody":"Refactor code to align with QuizHub code structure.","fileTypesAndContributionMap":{}},{"hash":"5781673f896f0c94d455e6f90bd81064a2b60c5d","isMergeCommit":false,"messageTitle":"Change Task words to Question, Comment out old code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":388,"deletions":382}}},{"hash":"6ae2d08763bc68f7ce450755d3341b498a8f2075","isMergeCommit":false,"messageTitle":"Add CommandShortAnswer, remove redundancies","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":38},"other":{"insertions":6,"deletions":6}}}]},{"date":"2023-10-16","commitResults":[{"hash":"3689320d26a5d1629ca650330a058b18c15a637b","isMergeCommit":false,"messageTitle":"Add JUnit CommandShortAnswer, Add JUnit addToQuestionList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1},"test-code":{"insertions":45,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"7a965c94ecafa3507c2246700af709a8e035b42f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from James-Hong-Jey/JUnit","messageBody":"Add JUnit CommandShortAnswer, Add JUnit addToQuestionList","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"2d48b66fa0ac979743ad4042ad721157907b1fea","isMergeCommit":false,"messageTitle":"Add Shuffle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":1}}},{"hash":"94f03b08917c989740c4aad088c8ac9b6cb66710","isMergeCommit":false,"messageTitle":"Add an assert and a logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"973220a81069c775bc9ce5aa1d62ccd51f606da2","isMergeCommit":false,"messageTitle":"Clean up Find command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":4}}},{"hash":"c83703fe81ed2dd8f4f32e1cd634fe4dcf0bfd1a","isMergeCommit":false,"messageTitle":"Add Dev Guide Architecture","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":2}}},{"hash":"636404c0ddaeffae283f1f9978da51e626a03f5e","isMergeCommit":true,"messageTitle":"Merge pull request #55 from James-Hong-Jey/master","messageBody":"Add Architecture to Dev Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"8eff0aa37130c992176747b7492a81e7b467881f","isMergeCommit":true,"messageTitle":"Merge pull request #64 from yeo-menghan/branch-RandomQnsStart","messageBody":"Branch random qns start","fileTypesAndContributionMap":{}},{"hash":"4c31e670091d8b8623045ef038dd0677faa4c706","isMergeCommit":false,"messageTitle":"Revert \"Branch random qns start\"","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":50}}},{"hash":"75b8cefa4e66396db41a38fe53c5fca5c56a331b","isMergeCommit":true,"messageTitle":"Merge pull request #65 from AY2324S1-CS2113-W12-1/revert-64-branch-RandomQnsStart","messageBody":"Revert \"Branch random qns start\"","fileTypesAndContributionMap":{}},{"hash":"7a52c4a396e0e4f2067745f743607d01275b11c4","isMergeCommit":false,"messageTitle":"Add Short Command and Find Command to Dev Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":30,"deletions":0}}},{"hash":"3f850e1678e0167cd2c3c3868c7e601a154824d2","isMergeCommit":true,"messageTitle":"Merge pull request #70 from James-Hong-Jey/master","messageBody":"Add Short Command and Find Command to Dev Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"ebf475c90b99fe9d6d3aa92bb985a9413c5147b0","isMergeCommit":false,"messageTitle":"Add Short Command diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":0}}},{"hash":"52e9f4189576a52196d287369f67fd5595f54dec","isMergeCommit":true,"messageTitle":"Merge pull request #72 from James-Hong-Jey/master","messageBody":"Add Short Command Diagram to DG","fileTypesAndContributionMap":{}},{"hash":"6a2bd99d3c3a5fcd38caec28c6549910dc9af1fa","isMergeCommit":false,"messageTitle":"Fix test files style","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":14}}},{"hash":"0aa3c28f9bf7bd41d534d1aae5e3e7f6bc391b31","isMergeCommit":false,"messageTitle":"Fix 1 Junit, 2 left to fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":34},"test-code":{"insertions":39,"deletions":0}}},{"hash":"5e4abb7ed5853f686f424aadfb582c960d75f4a0","isMergeCommit":true,"messageTitle":"Merge pull request #76 from James-Hong-Jey/master","messageBody":"Pass CI tests halfway","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"e67b9800fdbbd75a51dc6ee413230fd6a6e50bf8","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":36},"test-code":{"insertions":5,"deletions":5}}},{"hash":"d43962c336a76536f2e5408e1c2171dce94e0f5d","isMergeCommit":true,"messageTitle":"Merge pull request #87 from StevenGX12/branch-developer-guide","messageBody":"Add UI component of developer guide","fileTypesAndContributionMap":{}},{"hash":"0c023f11f1f368f6fded9ef6509758a4cf8554a0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5751d0bbd081e2f4d90d446cadacadd6c2425195","isMergeCommit":false,"messageTitle":"Attempt fix of edit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":1}}},{"hash":"67c4dd17ecf6911163fd11737ef539a04c918fdd","isMergeCommit":true,"messageTitle":"Merge pull request #88 from James-Hong-Jey/master","messageBody":"Fix Checkstyle","fileTypesAndContributionMap":{}}]}],"lisizhuang-0121":[{"date":"2023-10-04","commitResults":[{"hash":"db4924094e6d09cacbe80b263645d4f6e6778802","isMergeCommit":true,"messageTitle":"Merge pull request #1 from yeo-menghan/master","messageBody":"Add personal details(Meng Han) on AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"7398eac81f0be5e14293d06439587f84e7cea114","isMergeCommit":false,"messageTitle":"Update aboutus.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-05","commitResults":[{"hash":"be1e01236a2a636b43c835c00d65832c606e7b06","isMergeCommit":false,"messageTitle":"Refactor code to align with QuizHub code structure.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":65,"deletions":243},"other":{"insertions":99,"deletions":105}}},{"hash":"815456aa4e9a69f2359c634ce6d3183d0ca11172","isMergeCommit":false,"messageTitle":"Refactor and rename classes for better readability","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":274,"deletions":462},"other":{"insertions":9,"deletions":9}}}]},{"date":"2023-10-12","commitResults":[{"hash":"7c06aff1313bf138f10ec7375ff55889f31f8e56","isMergeCommit":false,"messageTitle":"Add Invalid Command Class for improved command parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":20}}},{"hash":"af8a7aab2f7cff548363c5615fa500b84cf7b7d4","isMergeCommit":true,"messageTitle":"Merge pull request #16 from lisizhuang-0121/master","messageBody":"Add Invalid Command Class for improved command parsing","fileTypesAndContributionMap":{}},{"hash":"76953b2108f83fa551f74a4db56822b3c9c22f8f","isMergeCommit":false,"messageTitle":"Fix minor bug in command parser for handling empty commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":16}}},{"hash":"c71a386f5bd64788eddb3377662b848b3782e91c","isMergeCommit":true,"messageTitle":"Merge pull request #28 from lisizhuang-0121/master","messageBody":"Fix minor bug in command parser for handling empty commands","fileTypesAndContributionMap":{}},{"hash":"6f9d92535a8c58c94add3a36bf2b6b7e374091f5","isMergeCommit":false,"messageTitle":"Add skeleton for Parser JUnit test with test cases of invalid commands","messageBody":"Edit message field of commandInvalid to public to allow comparison in the tests.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":63,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"4fdf529869faba917c09787471e457a9a43c39bb","isMergeCommit":false,"messageTitle":"Add assertions and fix minor code quality issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":98}}},{"hash":"46c9191ff97396777d903f98670298b78bab1ec6","isMergeCommit":false,"messageTitle":"Fix minor bug in assertion","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"d38040b3ebff23f9e10e4b8bbb1cd541605bcd11","isMergeCommit":false,"messageTitle":"Fix minor bugs in adding questions and taking quiz","messageBody":"Bug 1 - Add question has uncaught exceptions, fixed by checking for null\nBug 2 - Taking quiz may output wrong for white spaces in answers\n","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":4}}}]},{"date":"2023-10-18","commitResults":[{"hash":"7522945291940993ef8bc68b936802cb438a39be","isMergeCommit":false,"messageTitle":"Fix bug in editing questions and answers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":18},"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-21","commitResults":[{"hash":"3400e5554e05c19f7e781646902f06e1f2f5344f","isMergeCommit":false,"messageTitle":"Update skeleton for Developer guide with UML","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":64,"deletions":8}}},{"hash":"68b82f82ce1625c492e51edbfa099a8f070250bf","isMergeCommit":true,"messageTitle":"Merge pull request #51 from James-Hong-Jey/shuffle","messageBody":"Add Shuffle, Find","fileTypesAndContributionMap":{}},{"hash":"e8db9d9b43bd4a2a4a1d5a57f54ec35f98af1815","isMergeCommit":true,"messageTitle":"Merge pull request #52 from lisizhuang-0121/master","messageBody":"Update skeleton for Developer guide with UML","fileTypesAndContributionMap":{}},{"hash":"54454cd61ae874d56ee2857fdfd153c9841fa76e","isMergeCommit":true,"messageTitle":"Merge pull request #53 from lisizhuang-0121/master","messageBody":"Add UML Powerpoint Template","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"b5c467d5a61d9c6dcb6e5caa0f91cb4ad5463c0c","isMergeCommit":false,"messageTitle":"Improve code quality in /storage/Storage.java","messageBody":"Abstract functions for lower nesting level\nImprove error handling for file parsing cases\nImprove program logic\n","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":33}}},{"hash":"5089a7189cc6d7cd13cfa615f38cbb1998d391af","isMergeCommit":true,"messageTitle":"Merge pull request #60 from lisizhuang-0121/master","messageBody":"Improve code quality in /storage/Storage.java","fileTypesAndContributionMap":{}},{"hash":"07fb6ec555da28475febb6a2927956598ac36d41","isMergeCommit":false,"messageTitle":"Handle invalid question difficulty levels when reading from storage","messageBody":"Ensure questions conform to the 3 difficulty levels by calling the parser class\n","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"d2a3e118f4010cad370bc5dd182e929cdad34ae8","isMergeCommit":true,"messageTitle":"Merge pull request #61 from lisizhuang-0121/master","messageBody":"Handle invalid question difficulty levels when reading from storage","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"840bc8874c62cdae1635bb396c7472e5b92ea891","isMergeCommit":false,"messageTitle":"Update skeleton for parsing commands in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":25},"test-code":{"insertions":1,"deletions":1}}},{"hash":"3de09345ce79e937fe1b28d8547c95d1c96799e4","isMergeCommit":false,"messageTitle":"Convert error messages in commands to public static","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":31}}},{"hash":"d3ef7652234fa173d82caf858b55059787f7c7d4","isMergeCommit":true,"messageTitle":"Merge pull request #80 from lisizhuang-0121/master","messageBody":"Refactor code in parser and commands","fileTypesAndContributionMap":{}},{"hash":"ce66fae4dcbdf87e7be7c760939543bf9c09b9e3","isMergeCommit":false,"messageTitle":"Update test for DELETE command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":7,"deletions":5}}},{"hash":"6298b5e18132f5f793c53653f79c492abe4ef646","isMergeCommit":false,"messageTitle":"Refactor and move FIND command parsing to parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":39},"test-code":{"insertions":9,"deletions":1}}},{"hash":"491d4ea6282298abf9ad999247a115f48ac92c7b","isMergeCommit":true,"messageTitle":"Merge pull request #85 from lisizhuang-0121/master","messageBody":"Refactor code in command parsing and find command","fileTypesAndContributionMap":{}},{"hash":"aab6e922c577e387de591d9bbdd442e25d2185e2","isMergeCommit":false,"messageTitle":"Abstract function to create short answer question","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":76},"test-code":{"insertions":2,"deletions":0}}},{"hash":"e3f9ef91b2e39bf7748595322511426a06b03f63","isMergeCommit":false,"messageTitle":"Fix tests temporarily due to change in add question command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2},"test-code":{"insertions":21,"deletions":18}}},{"hash":"e1f6cf0c7f744be154bf2ed096925d28869d45d8","isMergeCommit":true,"messageTitle":"Merge pull request #86 from lisizhuang-0121/master","messageBody":"Modify Short Answer Question Command to use parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"0e0bdcaa0bfcfbe380db710e2c02ebde76472d8f","isMergeCommit":false,"messageTitle":"Fix tests in Delete, Edit, Find, List, and Start Test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":74,"deletions":60}}},{"hash":"47620310a4e57800b720b164b735f2745f03b751","isMergeCommit":false,"messageTitle":"Temporarily disable failed tests for refactoring","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":41,"deletions":41}}},{"hash":"c40c624bfa3912f4b168a06caa5e74576cb41707","isMergeCommit":false,"messageTitle":"Remove line seperators before assertion testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":36}}},{"hash":"d16ffcdc0e7dcac18b6be9842aaa91fa681cc3f7","isMergeCommit":true,"messageTitle":"Merge pull request #95 from lisizhuang-0121/master","messageBody":"Fix CI errors in assertion testing due to line seperators","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"spinoandraptos":{"docs":245,"functional-code":854,"test-code":670,"other":3},"StevenGX12":{"docs":117,"functional-code":127,"test-code":322},"yeo-menghan":{"docs":103,"functional-code":140,"test-code":48},"James-Hong-Jey":{"docs":50,"functional-code":311,"test-code":75},"lisizhuang-0121":{"docs":54,"functional-code":355,"test-code":154,"other":1}},"authorContributionVariance":{"spinoandraptos":95709.44,"StevenGX12":4508.729,"yeo-menghan":7601.7227,"James-Hong-Jey":19103.39,"lisizhuang-0121":48132.215},"authorDisplayNameMap":{"spinoandraptos":"CS2113-W12-1 MAN ..HENG","StevenGX12":"CS2113-W12-1 GUAN..XIAO","yeo-menghan":"CS2113-W12-1 YEO .. HAN","James-Hong-Jey":"CS2113-W12-1 JAME.. JEY","lisizhuang-0121":"CS2113-W12-1 LI S..UANG"}} +{"authorDailyContributionsMap":{"spinoandraptos":[{"date":"2023-10-04","commitResults":[{"hash":"6c6d1698f76fbc9d508f95105074ab9f2110d65c","isMergeCommit":true,"messageTitle":"Merge pull request #3 from StevenGX12/master","messageBody":"Add Guan Xiao","fileTypesAndContributionMap":{}},{"hash":"df29befffe396116433778af88e0a3623bece7fc","isMergeCommit":false,"messageTitle":"add Juncheng","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"419f657d64069e11fed53b7deb272799c0cf26f6","isMergeCommit":false,"messageTitle":"Refactoring","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1335,"deletions":21}}},{"hash":"7d646598095de5b46119f52d8328c6dcbe88e668","isMergeCommit":true,"messageTitle":"Merge pull request #6 from spinoandraptos/master","messageBody":"Refactoring","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"84ed7d900a90383cf0be6bb3cf33621d45496623","isMergeCommit":true,"messageTitle":"Merge pull request #8 from James-Hong-Jey/master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"174c6b202404b7d3e4890aea3b763a50171dff07","isMergeCommit":true,"messageTitle":"Merge pull request #9 from James-Hong-Jey/master","messageBody":"Add CommandShortAnswer, Update Parser","fileTypesAndContributionMap":{}},{"hash":"3189b597a50f04c45de9a88523964aeeb1bdcb7f","isMergeCommit":false,"messageTitle":"Added CommandEdit, Implemented Storage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":154,"deletions":112},"other":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-12","commitResults":[{"hash":"8c043626b9ce59e181aef4173d1ccfd720fa7a51","isMergeCommit":true,"messageTitle":"Merge pull request #29 from lisizhuang-0121/master","messageBody":"Closes #27 Add skeleton for Parser JUnit test with test cases of invalid commands","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"d2d4c2442c60bc271a2448e5e30c354de723dfc5","isMergeCommit":false,"messageTitle":"Added tests for edit and list commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2},"test-code":{"insertions":223,"deletions":0}}},{"hash":"619754ac78040fedfcce7715229d1123faf8ff29","isMergeCommit":true,"messageTitle":"Merge pull request #35 from yeo-menghan/branch-Logger","messageBody":"Add CustomLogger Class - provide logging capabilities to QuizHub","fileTypesAndContributionMap":{}},{"hash":"9d306428b7e46da2eac2f6a781e197979ed989ed","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into junit-test-edit-list-command","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"77d5af63c40d5d1fec590a1839a9bda7e30cd8e5","isMergeCommit":true,"messageTitle":"Merge pull request #39 from StevenGX12/branch-junit-test-help-delete-find-command","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"02b2e656c2151f89645110e520df79a52d260788","isMergeCommit":true,"messageTitle":"Merge pull request #41 from lisizhuang-0121/master","messageBody":"Fix bug in editing questions and answers","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"803188901bf34d49d8dc2801c4b8f85cb756afdb","isMergeCommit":true,"messageTitle":"Merge pull request #50 from StevenGX12/branch-categorize-questions-by-module","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ac9694149cfd7f2e2faa3ae9a451f888d61f47ba","isMergeCommit":false,"messageTitle":"Refactored code to meet coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":111,"deletions":94},"other":{"insertions":2,"deletions":2},"test-code":{"insertions":63,"deletions":46}}},{"hash":"31df027fc7a15af84706e70831cd02a150409e39","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into code-quality-control","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7201655780fe5ec8aa3946d5fcb1468a03bda511","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"b1d0b039dda0013076f420c3744f03bf48e6d6c7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into code-quality-control","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"ff0205d612d5ceed374eb84a5dc5c2221c1beeb7","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":8,"deletions":83}}},{"hash":"96298734d292a2b39b661555af39485f9dab05a8","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/spinoandraptos/tp into code-quality-control","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c0c68817e875fde5abfa7df5d05d0c1f512f5450","isMergeCommit":true,"messageTitle":"Merge branch \u0027code-quality-control\u0027 of https://github.com/spinoandraptos/tp into code-quality-control","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/questionlist/QuestionList.java\n","fileTypesAndContributionMap":{}},{"hash":"0450003a6bc37a4824ffa42b902355ba2327077e","isMergeCommit":false,"messageTitle":"Refactored Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":11},"other":{"insertions":1,"deletions":1}}},{"hash":"22bc37216bfac6f1c761c71c5d22a7d66f467c43","isMergeCommit":false,"messageTitle":"Updated checkstyle version","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"28760df5d989cd3a75edd708e8a274374fd22e7f","isMergeCommit":false,"messageTitle":"Refactored code for coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":12}}},{"hash":"a942565335e3305fe202aea376a37b30675cebf1","isMergeCommit":false,"messageTitle":"Refactored Code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":11}}},{"hash":"21f04502757b120fc73d5f0e5b738db96844a704","isMergeCommit":true,"messageTitle":"Merge pull request #56 from spinoandraptos/code-quality-control","messageBody":"Refactored code to meet coding standards","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"cb2634cafc2f25b928067ae2c5a360551b11b068","isMergeCommit":false,"messageTitle":"Added question difficulty levels","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":360,"deletions":126},"test-code":{"insertions":59,"deletions":54}}},{"hash":"395063d74f60e949ba60c3fb9f10d3f500a9e6fb","isMergeCommit":true,"messageTitle":"Merge pull request #57 from spinoandraptos/mark-questions","messageBody":"Added question difficulty levels","fileTypesAndContributionMap":{}},{"hash":"596ab0e3e0926218008b05da298bf26f627e6980","isMergeCommit":false,"messageTitle":"Added categorisation for quiz modes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":74,"deletions":11},"test-code":{"insertions":2,"deletions":2}}},{"hash":"e0ede314755aa5c33370733627aebd54ba62976d","isMergeCommit":true,"messageTitle":"Merge pull request #59 from spinoandraptos/categorise-questions","messageBody":"Added categorisation to organise quiz questions by module","fileTypesAndContributionMap":{}},{"hash":"45183848877790c1b25b0c46e295570a906149a1","isMergeCommit":false,"messageTitle":"Added Junit testing for command to mark question difficulty, abstracted out class MockStorage for reuse during testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":186,"deletions":35}}},{"hash":"86d74d03ea53982ce91b3495df39f255fbd2023a","isMergeCommit":false,"messageTitle":"Added junit testing for command to mark question difficulty, abstracted out class MockStorage for easy reuse in testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":192,"deletions":36}}},{"hash":"2c95f662f577ae85402c9f6e201aed789e4fee4a","isMergeCommit":true,"messageTitle":"Merge pull request #62 from spinoandraptos/junit-mark-difficulty","messageBody":"Added junit testing for command to mark question difficulty, abstract…","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"7412057e77ee27c74055b20055258a24b3543468","isMergeCommit":true,"messageTitle":"Merge branch \u0027junit-mark-difficulty\u0027","messageBody":"# Conflicts:\n#\tsrc/test/java/quizhub/command/CommandDeleteTest.java\n#\tsrc/test/java/quizhub/command/CommandMarkTest.java\n#\tsrc/test/java/quizhub/storage/MockStorage.java\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"076594dc7c3f40cb8ba6d368a569ffb71dd4b313","isMergeCommit":true,"messageTitle":"Developer guide - added parser details","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"30d21e663aad83726249ee80c1a679e99a243ab1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-RandomQnsStart","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"65895a275aad73ce81415e2a417c0afbfdc7ef9d","isMergeCommit":true,"messageTitle":"Merge pull request #66 from yeo-menghan/branch-RandomQnsStart","messageBody":"Clarify details for Start command in parser","fileTypesAndContributionMap":{}},{"hash":"784e934163a5651180b64ecc00be36a14ec45b1b","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into developer-guide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"c795434676e4e1e54667589b68086f6bd70a0145","isMergeCommit":true,"messageTitle":"Merge pull request #67 from spinoandraptos/developer-guide","messageBody":"Developer guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"eaec1cdac145b8d2e9350b6a523da42ed8ee5c11","isMergeCommit":false,"messageTitle":"Optimised question difficulty processing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":23}}},{"hash":"8460f898f85d5c7bee4242cf0ff835dc825c7fe4","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"# Conflicts:\n#\tsrc/main/java/quizhub/parser/Parser.java\n","fileTypesAndContributionMap":{}},{"hash":"b501674b35695192c02516c01ccfbef2348851e0","isMergeCommit":true,"messageTitle":"Merge pull request #77 from spinoandraptos/master","messageBody":"Optimised question difficulty interpreting","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"9d20f3f3662467dfe485c090a4f5c26ca0bfb17e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"24e0b27d25c307fb92fea9460feba9f91b0c4cb1","isMergeCommit":false,"messageTitle":"Abstracted command parsing for CommandMarkDifficulty and CommandStart into the Parser class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":85,"deletions":62}}},{"hash":"e698226b035dc121af0a2c7b14823f9cbc231e8c","isMergeCommit":false,"messageTitle":"Documentation fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"f028743ca528591025ae81dbe26ffbf59ad1adc5","isMergeCommit":false,"messageTitle":"Checkstyle fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"1552d4abd894466393d25f95f969781e366c8d51","isMergeCommit":true,"messageTitle":"Merge pull request #96 from spinoandraptos/parser-refactoring","messageBody":"Abstracted command parsing from CommandMarkDifficulty and CommandStart into Parser class","fileTypesAndContributionMap":{}},{"hash":"ca9052578ebab34d31bd32ccc32b0b473ddb9d88","isMergeCommit":false,"messageTitle":"Fixed UI display errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-27","commitResults":[{"hash":"a9353f69c3c628907557794a4f0327a8c6771b4a","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95dc70f0db3ad00e68e2588fe735bc468849f293","isMergeCommit":false,"messageTitle":"Updated Junit tests for CommandStart and CommandMarkDifficulty","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":71},"other":{"insertions":1,"deletions":0},"test-code":{"insertions":339,"deletions":208}}},{"hash":"fb19b6801138c5d05e73c89c3b287c33ccd1dbb7","isMergeCommit":false,"messageTitle":"Fixed Checkstyle errors","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"87bc426b2f8fdc90be5341f93cbe2f05a32beca9","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"0d8604dfcb65893f874a233671b17eafcf524ae7","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into parser-refactoring-test","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"493de44748acceba4c70d6a7cc1778f3e05874f7","isMergeCommit":false,"messageTitle":"Fixed failing tests","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":9}}},{"hash":"85a94278750add285f2cc2d2e41bdcb66aabf68c","isMergeCommit":false,"messageTitle":"Fixed failing tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}},{"hash":"314abaca8eba6369318b08a25edda2275731ccb4","isMergeCommit":true,"messageTitle":"Merge pull request #101 from spinoandraptos/parser-refactoring-test","messageBody":"Updated Junit tests for CommandStart and CommandMarkDifficulty","fileTypesAndContributionMap":{}},{"hash":"3dce94b26f7ab31c447340028c258c4b45906dba","isMergeCommit":true,"messageTitle":"Merge branch \u0027parser-refactoring-test\u0027","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d172b15fc19a1478c724f92be44f77874d783090","isMergeCommit":false,"messageTitle":"Updated parser parseCommand sequence diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"69d8a0b9023f6dd1aa697f4a7e67f880b52bffb9","isMergeCommit":true,"messageTitle":"Merge pull request #108 from spinoandraptos/master","messageBody":"Updated Parser parseCommand Sequence Diagram ","fileTypesAndContributionMap":{}},{"hash":"28715538d00b192887adbc20a2ce55b394997903","isMergeCommit":false,"messageTitle":"Added DG appendix and fixed minor formatting issues","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":24,"deletions":34}}},{"hash":"baf19adafb423d5f205aa3495809b93b30a84ed0","isMergeCommit":false,"messageTitle":"Added command edit and markdiff to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":80,"deletions":33}}},{"hash":"e610b2a7fd4591750f20e979b8444b4e0afc2978","isMergeCommit":false,"messageTitle":"Added command edit and markdiff to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":146,"deletions":109}}},{"hash":"220d1220da28ad7bc6e42a01dc39b1fecc83084b","isMergeCommit":true,"messageTitle":"Merge pull request #111 from spinoandraptos/user-guide","messageBody":"Added command edit and markdiff to UG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"5f28e1fe46eb60942bc947379ad9dc83b5fccab4","isMergeCommit":true,"messageTitle":"Merge branch \u0027user-guide\u0027","messageBody":"# Conflicts:\n#\tdocs/DeveloperGuide.md\n#\tdocs/UserGuide.md\n","fileTypesAndContributionMap":{}},{"hash":"ec3e1cb9843b15b97dfbc52021f2a4f161060bdd","isMergeCommit":false,"messageTitle":"UG minor format issue","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0ba89c3b74848629c143b227becaed703c32f69e","isMergeCommit":false,"messageTitle":"Fixed DG merge conflict issues","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":36}}},{"hash":"f441f0a5adbc20852fb3830ec3a2a063f3d68072","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"79ec1e5ef98426f93fb6ab8b5e2286b01b14e109","isMergeCommit":false,"messageTitle":"Edited command output documentation for commandShort","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":5}}},{"hash":"04b1b0e7da9288bb64b1dd039643b78edab86cec","isMergeCommit":true,"messageTitle":"Merge pull request #115 from spinoandraptos/master","messageBody":"Fixed some UG and DG formatting issues ","fileTypesAndContributionMap":{}},{"hash":"a61da160651908eb7593de701a261cc1f07bc232","isMergeCommit":false,"messageTitle":"Fixed UG command output diplay formatting issue","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":27,"deletions":27}}},{"hash":"5feab10fa34b9586be80bcaca1c9e6d4a93a3be9","isMergeCommit":false,"messageTitle":"Fixed UG command output formatting issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":14,"deletions":1}}},{"hash":"575c352513ddd1675b3338b80dad6c6b9796d616","isMergeCommit":true,"messageTitle":"Merge pull request #116 from spinoandraptos/master","messageBody":"Fixed UG command output display formatting","fileTypesAndContributionMap":{}},{"hash":"d25ebf8db4dae0634147f8c4ac4edc916a113dcf","isMergeCommit":false,"messageTitle":"Fixed UG help command description","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":6}}},{"hash":"475c4fb2e8b2c08a0121af819ff6d8447125ca7c","isMergeCommit":true,"messageTitle":"Merge pull request #117 from spinoandraptos/master","messageBody":"Fixed UG help command description","fileTypesAndContributionMap":{}}]}],"StevenGX12":[{"date":"2023-10-04","commitResults":[{"hash":"89a5fcaa30ce7cd31fe47503bb2873226575c6b8","isMergeCommit":true,"messageTitle":"Merge pull request #2 from James-Hong-Jey/master","messageBody":"Add James","fileTypesAndContributionMap":{}},{"hash":"9dc6e6889ff581686f9e040603ee748d51c37b1a","isMergeCommit":false,"messageTitle":"added Guan Xiao AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e43a7268e881e66880f125a55ba992a5659e1637","isMergeCommit":true,"messageTitle":"resolved merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5794b6bc163b412507ec00d46d2f9627c6a034f7","isMergeCommit":true,"messageTitle":"Merge pull request #5 from lisizhuang-0121/master","messageBody":"Update aboutus.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"6dde24d6485345dc3c3bce285aa3370f4c826f7c","isMergeCommit":true,"messageTitle":"Merge pull request #12 from yeo-menghan/branch-QuizMode","messageBody":"Branch quiz mode","fileTypesAndContributionMap":{}},{"hash":"919bffd25b6508283eb156867e2dc13853958696","isMergeCommit":false,"messageTitle":"updated UI and help command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":12}}}]},{"date":"2023-10-17","commitResults":[{"hash":"37e590ab99132292aba1ec5031af078a34d57805","isMergeCommit":true,"messageTitle":"Merge pull request #33 from yeo-menghan/branch-StartQuizTest","messageBody":"Branch StartTest","fileTypesAndContributionMap":{}},{"hash":"64a8e454d68bc3ae0aeba542489059b28323e079","isMergeCommit":true,"messageTitle":"Merge pull request #36 from spinoandraptos/junit-test-edit-list-command","messageBody":"Add JUnit CommandEdit, Add JUnit CommandList, Adjust Question Description Display Format","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"23ba5e69c4bbdf012c8f310e3105264004398153","isMergeCommit":false,"messageTitle":"Add Junit tests for help, find and delete commands","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":275,"deletions":0}}}]},{"date":"2023-10-21","commitResults":[{"hash":"c2027663c8ac122e37a35546af2da8be8d2a4b59","isMergeCommit":false,"messageTitle":"Update JUnit test for Help and Find commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":100,"deletions":34}}},{"hash":"18a095a2631ce870544a5c93efd82ab30779ba9b","isMergeCommit":true,"messageTitle":"Merge pull request #49 from StevenGX12/branch-junit-test-help-delete-find-command","messageBody":"Update JUnit test for Help and Find commands","fileTypesAndContributionMap":{}},{"hash":"c3b8139ffd40bc6ae94073568437b9404a5630ce","isMergeCommit":false,"messageTitle":"Add module attribute to question and search by module function","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":72,"deletions":8},"test-code":{"insertions":15,"deletions":15}}}]},{"date":"2023-10-24","commitResults":[{"hash":"2f6f59f0c13ee0b29ac45e88736757b5fa17fb33","isMergeCommit":false,"messageTitle":"Add Storage component to developer guide Add several assertions in different classes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":0},"docs":{"insertions":47,"deletions":0},"test-code":{"insertions":2,"deletions":0}}},{"hash":"50b67f23f9b68a2f68c2912813b942e27c23d08a","isMergeCommit":false,"messageTitle":"Update developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"24a0b4adcea8281b87de99a9697dcf53dbfec03f","isMergeCommit":true,"messageTitle":"Merge pull request #71 from StevenGX12/branch-developer-guide","messageBody":"Update developer guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"a42dacee2795f4d1a17444b40889359e7d35a9dc","isMergeCommit":false,"messageTitle":"Add UI component of developer guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":32,"deletions":0}}},{"hash":"6ce8ba86521d5a3db6dbc61b344d7ebbb2ca663b","isMergeCommit":false,"messageTitle":"Refactor parsing elements from CommandEdit to Parser Fixed tests for CommandFind and CommandEdit","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":44,"deletions":41},"test-code":{"insertions":80,"deletions":22}}},{"hash":"b0aafa75f406e3f84e19146b4783ce959f15f7a6","isMergeCommit":false,"messageTitle":"Fixed bug in CommandEditTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":1}}},{"hash":"32dd7db1a0dc748db256c8c676da8bc9e5b9137e","isMergeCommit":true,"messageTitle":"Merge pull request #97 from StevenGX12/branch-code-refactor","messageBody":"Refactor parsing elements from CommandEdit to Parser\r\nFixed tests for CommandFind and CommandEdit","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"54baf920c7a7fdbe6e96545125fd0369ab6de711","isMergeCommit":false,"messageTitle":"Add user guide for \u0027delete\u0027 and \u0027find\u0027 commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"932ab82eb97ae8c9f48fcf4f997751f94ce864f6","isMergeCommit":true,"messageTitle":"Merge pull request #112 from StevenGX12/branch-user-guide","messageBody":"Add user guide for \u0027delete\u0027 and \u0027find\u0027 commands","fileTypesAndContributionMap":{}}]}],"yeo-menghan":[{"date":"2023-10-04","commitResults":[{"hash":"437a578d991ab42603936e351239623440e806c8","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"Change from Duke to QuizHub on ReadMe","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"96293a9443789434cf941b15cdebf0bbfa57d745","isMergeCommit":false,"messageTitle":"Add personal details(Meng Han) on AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}},{"hash":"568326efb68a7553262bf268501d90613739f023","isMergeCommit":true,"messageTitle":"Merge pull request #4 from spinoandraptos/master","messageBody":"add Juncheng","fileTypesAndContributionMap":{}}]},{"date":"2023-10-09","commitResults":[{"hash":"908207acef2fd89a00b4a74737adf8ded8a80145","isMergeCommit":true,"messageTitle":"Merge pull request #10 from AY2324S1-CS2113-W12-1/CommandEdit-and-Storage","messageBody":"Added CommandEdit, Implemented Storage","fileTypesAndContributionMap":{}},{"hash":"53259b048ec950c253cbc566fedba93fdad0d2f7","isMergeCommit":false,"messageTitle":"Add quiz mode with Start command - known bug: displaying both Question \u0026 Answer","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":2}}},{"hash":"afbcce9d71aef01eec2235c69a34d0fe5ad737cb","isMergeCommit":false,"messageTitle":"Implement v1.0 start quiz mode - hide answer when displaying question","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":17}}}]},{"date":"2023-10-11","commitResults":[{"hash":"37435c2000856c832080cfb16ba748d83ee56dee","isMergeCommit":true,"messageTitle":"Merge pull request #13 from StevenGX12/branch-feature-ui","messageBody":"updated UI and help command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"ac403d72be67d1f75c3320a5126fbbc221e2574d","isMergeCommit":false,"messageTitle":"Add StartQuiz test in file QuestionListTest","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":114,"deletions":0}}},{"hash":"0e8d55308019df6e501da3711ea7e1e81e61fcda","isMergeCommit":false,"messageTitle":"Add preliminary storage features - test cases 3/3 fail","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":0},"test-code":{"insertions":16,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"89aec25e8204afaf04a2a153900060902eb265fa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-StartQuizTest","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ab851efe950edee1dd31f03c777751cc81bc32f0","isMergeCommit":false,"messageTitle":"Pull from remote. Fix testStartQuizWithNoQuestions and testAddQuestionToListAndStorage","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":1},"test-code":{"insertions":35,"deletions":23}}},{"hash":"e5a87ba72c59146eea2aa540c6d9059ef82dd580","isMergeCommit":false,"messageTitle":"Move QuestionListTest from parser to command - rename to StartTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4},"other":{"insertions":2,"deletions":2}}},{"hash":"f7fc87e17f86a4e5fa1f64ea8c8d49358f3d6f46","isMergeCommit":false,"messageTitle":"Pass 3/3 StartTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"test-code":{"insertions":5,"deletions":5}}},{"hash":"f17f3f8e6ff57b28b8b41862a9517d3efa054626","isMergeCommit":false,"messageTitle":"Add CustomLogger Class - provide logging capabilities to QuizHub","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":0}}},{"hash":"e86f5576f77bd60660ddaea01b2004011478424f","isMergeCommit":true,"messageTitle":"Merge pull request #37 from lisizhuang-0121/master","messageBody":"Fix minor code quality issues.","tags":["Version_1_0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"821b499e492917b6e4c50eba020b8c1a6839b65e","isMergeCommit":true,"messageTitle":"Merge pull request #38 from lisizhuang-0121/master","messageBody":"Fix minor bugs in adding questions and taking quiz","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"394b2be754c0261ccd2cabd51b5abc4e12ec3159","isMergeCommit":false,"messageTitle":"Update parser help for start command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":3}}},{"hash":"d276d02dc73ea4d49ec352125f1ec18acd21f6a8","isMergeCommit":false,"messageTitle":"Clarify definition of Command Shuffle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":2}}},{"hash":"fb00c8cb043f6bc35a76b77c4bfeb4a13af5445c","isMergeCommit":false,"messageTitle":"implement /normal and /random to startCommand to randomise or sequence questions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":4}}},{"hash":"a1f98f18b169094bf054a4639d0ec7584320f4a1","isMergeCommit":false,"messageTitle":"Refactor executeCommand in CommandStart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":32}}},{"hash":"36f65e810a94fabeabae270a05b02510a9d3761f","isMergeCommit":false,"messageTitle":"Extend short command to be clear","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-24","commitResults":[{"hash":"cca0cee732367b417feade88a0400aca22811735","isMergeCommit":false,"messageTitle":"Clarify details for Start command in parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"48c585a348444dc89362efbb490d443a9ff96997","isMergeCommit":false,"messageTitle":"Add /random to CommandStart","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"docs":{"insertions":0,"deletions":2}}},{"hash":"bfa0dbaf71d34f67f1d77516511602d6cd51252a","isMergeCommit":true,"messageTitle":"Reimplement /random to CommandStart to resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"497a8678a512fec18759da039c2146823b2606de","isMergeCommit":false,"messageTitle":"Convert /random feature from if-else to switch","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":6}}},{"hash":"e2790379dd843d533a2efd077f72a77374fda7f5","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-RandomQnsStart","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"230a9be8548c0e1949800de7a700a91f017001c9","isMergeCommit":true,"messageTitle":"Merge pull request #68 from yeo-menghan/branch-RandomQnsStart","messageBody":"Branch random qns start","fileTypesAndContributionMap":{}},{"hash":"ee3a30e89e97a885127654cfb9922b8b2e1e7dee","isMergeCommit":false,"messageTitle":"Add StartCommand uml and StartCommand documentation to DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":66,"deletions":36}}},{"hash":"74667af8a90c7b0a99ecf14324df5242abe80b83","isMergeCommit":true,"messageTitle":"Merge pull request #69 from yeo-menghan/branch-CommandStartUML","messageBody":"Add StartCommand uml and StartCommand documentation to DeveloperGuide.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"07f3f38d233e40fb27b2343eca1cc93f006e4912","isMergeCommit":true,"messageTitle":"Merge pull request #89 from lisizhuang-0121/master","messageBody":"Fix tests in Delete, Edit, Find, List, and Start Test","fileTypesAndContributionMap":{}},{"hash":"edc42130ed23db3fc87396459b920bb24efac7a7","isMergeCommit":false,"messageTitle":"Remove \\r from failed test cases to achieve 100% test cases pass rate","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":8,"deletions":8}}},{"hash":"a6ae45406e4159fb94ec01751c78d5e35b9cb5e3","isMergeCommit":true,"messageTitle":"Merge pull request #90 from yeo-menghan/branch-TestCI","messageBody":"Remove \\r from failed test cases to achieve 100% test cases pass rate","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"d849948bec9bff5ec4ec88243682d9bf7b71048f","isMergeCommit":false,"messageTitle":"Init CommandStartTest2","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":146,"deletions":0}}},{"hash":"67c2f966ef8db9da9605b3c496f25e2ae9bf85bf","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-CommandStartTest2","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"28c555440691ba33b6669122a0bb45ff947a4867","isMergeCommit":false,"messageTitle":"Add UG for Introduction and /help command","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":33,"deletions":12},"test-code":{"insertions":0,"deletions":147}}},{"hash":"b18c8df13adb3ec8882607606e40397fa1a9562a","isMergeCommit":false,"messageTitle":"Add UG for /list and /short commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":28,"deletions":0}}},{"hash":"e82b7aba052bf90723fb4bd74c79991d19846fc8","isMergeCommit":false,"messageTitle":"Add UG for /start and /shuffle commands","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":38,"deletions":0}}},{"hash":"9e89a05f90c995aeaf1f30e7123e5d0e6b4dfba5","isMergeCommit":false,"messageTitle":"Edit feature list in UG and add Command Cheatsheet in UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":47,"deletions":41}}},{"hash":"7570f4b92f4a5c86562d382c0e05346e5e0f5480","isMergeCommit":true,"messageTitle":"Merge pull request #99 from yeo-menghan/branch-UG","messageBody":"Branch UG init","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"5e671e61d0548e06eb54500c841e397c39e15cd9","isMergeCommit":false,"messageTitle":"Add ShortAns exception handling for additional commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":5}}}]},{"date":"2023-10-29","commitResults":[{"hash":"702281cfe98cb36b2e2fb4723175ec9dc8eb2f3b","isMergeCommit":false,"messageTitle":"Add duplicate feature to addShortAns to prevent duplicated entries","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":32}}},{"hash":"a6e4e12dc1b5dfbb3b89524862e48c6cca69af8c","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-ShortAnsIncrement","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8f67ddb669b1f23971beb98bbfc781f30d392334","isMergeCommit":false,"messageTitle":"Resolve gradle checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1},"test-code":{"insertions":2,"deletions":2}}},{"hash":"3ce892dfab685cb5255a0851e80e31650c827b6c","isMergeCommit":true,"messageTitle":"Merge pull request #119 from yeo-menghan/branch-ShortAnsIncrement","messageBody":"Branch short ans increment","fileTypesAndContributionMap":{}},{"hash":"0ab513c35ce0ae812eef641e0e195c3738e576ce","isMergeCommit":false,"messageTitle":"Resolve bug on add short answer with invalid difficulty","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"d72728ab2ca460b2530b36bb991207627a149a20","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp into branch-ShortAnsIncrement","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"8d9f727a7076cc83a85a9e31be84494af0603e71","isMergeCommit":true,"messageTitle":"Merge pull request #121 from yeo-menghan/branch-ShortAnsIncrement","messageBody":"Branch short ans increment","fileTypesAndContributionMap":{}}]}],"James-Hong-Jey":[{"date":"2023-10-04","commitResults":[{"hash":"cfa71b85ff164366845684af16d070e31ea60359","isMergeCommit":false,"messageTitle":"Change aboutus.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"ff15f0850b54fd060d30b9efb9967fc1e0d9ab18","isMergeCommit":true,"messageTitle":"Resolve merge conflict","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-08","commitResults":[{"hash":"59726e824ebe24615b40411cb772b0cd1af4b63f","isMergeCommit":true,"messageTitle":"Merge pull request #7 from lisizhuang-0121/master","messageBody":"Refactor code to align with QuizHub code structure.","fileTypesAndContributionMap":{}},{"hash":"5781673f896f0c94d455e6f90bd81064a2b60c5d","isMergeCommit":false,"messageTitle":"Change Task words to Question, Comment out old code","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":388,"deletions":382}}},{"hash":"6ae2d08763bc68f7ce450755d3341b498a8f2075","isMergeCommit":false,"messageTitle":"Add CommandShortAnswer, remove redundancies","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":31,"deletions":38},"other":{"insertions":6,"deletions":6}}}]},{"date":"2023-10-16","commitResults":[{"hash":"3689320d26a5d1629ca650330a058b18c15a637b","isMergeCommit":false,"messageTitle":"Add JUnit CommandShortAnswer, Add JUnit addToQuestionList","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":1},"test-code":{"insertions":45,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"7a965c94ecafa3507c2246700af709a8e035b42f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from James-Hong-Jey/JUnit","messageBody":"Add JUnit CommandShortAnswer, Add JUnit addToQuestionList","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"2d48b66fa0ac979743ad4042ad721157907b1fea","isMergeCommit":false,"messageTitle":"Add Shuffle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":23,"deletions":1}}},{"hash":"94f03b08917c989740c4aad088c8ac9b6cb66710","isMergeCommit":false,"messageTitle":"Add an assert and a logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":0}}},{"hash":"973220a81069c775bc9ce5aa1d62ccd51f606da2","isMergeCommit":false,"messageTitle":"Clean up Find command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":4}}},{"hash":"c83703fe81ed2dd8f4f32e1cd634fe4dcf0bfd1a","isMergeCommit":false,"messageTitle":"Add Dev Guide Architecture","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":21,"deletions":2}}},{"hash":"636404c0ddaeffae283f1f9978da51e626a03f5e","isMergeCommit":true,"messageTitle":"Merge pull request #55 from James-Hong-Jey/master","messageBody":"Add Architecture to Dev Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"8eff0aa37130c992176747b7492a81e7b467881f","isMergeCommit":true,"messageTitle":"Merge pull request #64 from yeo-menghan/branch-RandomQnsStart","messageBody":"Branch random qns start","fileTypesAndContributionMap":{}},{"hash":"4c31e670091d8b8623045ef038dd0677faa4c706","isMergeCommit":false,"messageTitle":"Revert \"Branch random qns start\"","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":50}}},{"hash":"75b8cefa4e66396db41a38fe53c5fca5c56a331b","isMergeCommit":true,"messageTitle":"Merge pull request #65 from AY2324S1-CS2113-W12-1/revert-64-branch-RandomQnsStart","messageBody":"Revert \"Branch random qns start\"","fileTypesAndContributionMap":{}},{"hash":"7a52c4a396e0e4f2067745f743607d01275b11c4","isMergeCommit":false,"messageTitle":"Add Short Command and Find Command to Dev Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":30,"deletions":0}}},{"hash":"3f850e1678e0167cd2c3c3868c7e601a154824d2","isMergeCommit":true,"messageTitle":"Merge pull request #70 from James-Hong-Jey/master","messageBody":"Add Short Command and Find Command to Dev Guide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"ebf475c90b99fe9d6d3aa92bb985a9413c5147b0","isMergeCommit":false,"messageTitle":"Add Short Command diagram","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":0}}},{"hash":"52e9f4189576a52196d287369f67fd5595f54dec","isMergeCommit":true,"messageTitle":"Merge pull request #72 from James-Hong-Jey/master","messageBody":"Add Short Command Diagram to DG","fileTypesAndContributionMap":{}},{"hash":"6a2bd99d3c3a5fcd38caec28c6549910dc9af1fa","isMergeCommit":false,"messageTitle":"Fix test files style","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":24,"deletions":14}}},{"hash":"0aa3c28f9bf7bd41d534d1aae5e3e7f6bc391b31","isMergeCommit":false,"messageTitle":"Fix 1 Junit, 2 left to fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":34},"test-code":{"insertions":39,"deletions":0}}},{"hash":"5e4abb7ed5853f686f424aadfb582c960d75f4a0","isMergeCommit":true,"messageTitle":"Merge pull request #76 from James-Hong-Jey/master","messageBody":"Pass CI tests halfway","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"e67b9800fdbbd75a51dc6ee413230fd6a6e50bf8","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":28,"deletions":36},"test-code":{"insertions":5,"deletions":5}}},{"hash":"d43962c336a76536f2e5408e1c2171dce94e0f5d","isMergeCommit":true,"messageTitle":"Merge pull request #87 from StevenGX12/branch-developer-guide","messageBody":"Add UI component of developer guide","fileTypesAndContributionMap":{}},{"hash":"0c023f11f1f368f6fded9ef6509758a4cf8554a0","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113-W12-1/tp","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5751d0bbd081e2f4d90d446cadacadd6c2425195","isMergeCommit":false,"messageTitle":"Attempt fix of edit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":4,"deletions":1}}},{"hash":"67c4dd17ecf6911163fd11737ef539a04c918fdd","isMergeCommit":true,"messageTitle":"Merge pull request #88 from James-Hong-Jey/master","messageBody":"Fix Checkstyle","fileTypesAndContributionMap":{}}]}],"lisizhuang-0121":[{"date":"2023-10-04","commitResults":[{"hash":"db4924094e6d09cacbe80b263645d4f6e6778802","isMergeCommit":true,"messageTitle":"Merge pull request #1 from yeo-menghan/master","messageBody":"Add personal details(Meng Han) on AboutUs.md","fileTypesAndContributionMap":{}},{"hash":"7398eac81f0be5e14293d06439587f84e7cea114","isMergeCommit":false,"messageTitle":"Update aboutus.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-05","commitResults":[{"hash":"be1e01236a2a636b43c835c00d65832c606e7b06","isMergeCommit":false,"messageTitle":"Refactor code to align with QuizHub code structure.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":65,"deletions":243},"other":{"insertions":99,"deletions":105}}},{"hash":"815456aa4e9a69f2359c634ce6d3183d0ca11172","isMergeCommit":false,"messageTitle":"Refactor and rename classes for better readability","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":274,"deletions":462},"other":{"insertions":9,"deletions":9}}}]},{"date":"2023-10-12","commitResults":[{"hash":"7c06aff1313bf138f10ec7375ff55889f31f8e56","isMergeCommit":false,"messageTitle":"Add Invalid Command Class for improved command parsing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":20}}},{"hash":"af8a7aab2f7cff548363c5615fa500b84cf7b7d4","isMergeCommit":true,"messageTitle":"Merge pull request #16 from lisizhuang-0121/master","messageBody":"Add Invalid Command Class for improved command parsing","fileTypesAndContributionMap":{}},{"hash":"76953b2108f83fa551f74a4db56822b3c9c22f8f","isMergeCommit":false,"messageTitle":"Fix minor bug in command parser for handling empty commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":20,"deletions":16}}},{"hash":"c71a386f5bd64788eddb3377662b848b3782e91c","isMergeCommit":true,"messageTitle":"Merge pull request #28 from lisizhuang-0121/master","messageBody":"Fix minor bug in command parser for handling empty commands","fileTypesAndContributionMap":{}},{"hash":"6f9d92535a8c58c94add3a36bf2b6b7e374091f5","isMergeCommit":false,"messageTitle":"Add skeleton for Parser JUnit test with test cases of invalid commands","messageBody":"Edit message field of commandInvalid to public to allow comparison in the tests.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":63,"deletions":0}}}]},{"date":"2023-10-17","commitResults":[{"hash":"4fdf529869faba917c09787471e457a9a43c39bb","isMergeCommit":false,"messageTitle":"Add assertions and fix minor code quality issues","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":98,"deletions":98}}},{"hash":"46c9191ff97396777d903f98670298b78bab1ec6","isMergeCommit":false,"messageTitle":"Fix minor bug in assertion","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"d38040b3ebff23f9e10e4b8bbb1cd541605bcd11","isMergeCommit":false,"messageTitle":"Fix minor bugs in adding questions and taking quiz","messageBody":"Bug 1 - Add question has uncaught exceptions, fixed by checking for null\nBug 2 - Taking quiz may output wrong for white spaces in answers\n","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":4}}}]},{"date":"2023-10-18","commitResults":[{"hash":"7522945291940993ef8bc68b936802cb438a39be","isMergeCommit":false,"messageTitle":"Fix bug in editing questions and answers","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":21,"deletions":18},"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-21","commitResults":[{"hash":"3400e5554e05c19f7e781646902f06e1f2f5344f","isMergeCommit":false,"messageTitle":"Update skeleton for Developer guide with UML","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":64,"deletions":8}}},{"hash":"68b82f82ce1625c492e51edbfa099a8f070250bf","isMergeCommit":true,"messageTitle":"Merge pull request #51 from James-Hong-Jey/shuffle","messageBody":"Add Shuffle, Find","fileTypesAndContributionMap":{}},{"hash":"e8db9d9b43bd4a2a4a1d5a57f54ec35f98af1815","isMergeCommit":true,"messageTitle":"Merge pull request #52 from lisizhuang-0121/master","messageBody":"Update skeleton for Developer guide with UML","fileTypesAndContributionMap":{}},{"hash":"54454cd61ae874d56ee2857fdfd153c9841fa76e","isMergeCommit":true,"messageTitle":"Merge pull request #53 from lisizhuang-0121/master","messageBody":"Add UML Powerpoint Template","fileTypesAndContributionMap":{}}]},{"date":"2023-10-22","commitResults":[{"hash":"b5c467d5a61d9c6dcb6e5caa0f91cb4ad5463c0c","isMergeCommit":false,"messageTitle":"Improve code quality in /storage/Storage.java","messageBody":"Abstract functions for lower nesting level\nImprove error handling for file parsing cases\nImprove program logic\n","fileTypesAndContributionMap":{"functional-code":{"insertions":53,"deletions":33}}},{"hash":"5089a7189cc6d7cd13cfa615f38cbb1998d391af","isMergeCommit":true,"messageTitle":"Merge pull request #60 from lisizhuang-0121/master","messageBody":"Improve code quality in /storage/Storage.java","fileTypesAndContributionMap":{}},{"hash":"07fb6ec555da28475febb6a2927956598ac36d41","isMergeCommit":false,"messageTitle":"Handle invalid question difficulty levels when reading from storage","messageBody":"Ensure questions conform to the 3 difficulty levels by calling the parser class\n","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":1}}},{"hash":"d2a3e118f4010cad370bc5dd182e929cdad34ae8","isMergeCommit":true,"messageTitle":"Merge pull request #61 from lisizhuang-0121/master","messageBody":"Handle invalid question difficulty levels when reading from storage","fileTypesAndContributionMap":{}}]},{"date":"2023-10-25","commitResults":[{"hash":"840bc8874c62cdae1635bb396c7472e5b92ea891","isMergeCommit":false,"messageTitle":"Update skeleton for parsing commands in Parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":82,"deletions":25},"test-code":{"insertions":1,"deletions":1}}},{"hash":"3de09345ce79e937fe1b28d8547c95d1c96799e4","isMergeCommit":false,"messageTitle":"Convert error messages in commands to public static","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":31}}},{"hash":"d3ef7652234fa173d82caf858b55059787f7c7d4","isMergeCommit":true,"messageTitle":"Merge pull request #80 from lisizhuang-0121/master","messageBody":"Refactor code in parser and commands","fileTypesAndContributionMap":{}},{"hash":"ce66fae4dcbdf87e7be7c760939543bf9c09b9e3","isMergeCommit":false,"messageTitle":"Update test for DELETE command","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":7,"deletions":5}}},{"hash":"6298b5e18132f5f793c53653f79c492abe4ef646","isMergeCommit":false,"messageTitle":"Refactor and move FIND command parsing to parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":43,"deletions":39},"test-code":{"insertions":9,"deletions":1}}},{"hash":"491d4ea6282298abf9ad999247a115f48ac92c7b","isMergeCommit":true,"messageTitle":"Merge pull request #85 from lisizhuang-0121/master","messageBody":"Refactor code in command parsing and find command","fileTypesAndContributionMap":{}},{"hash":"aab6e922c577e387de591d9bbdd442e25d2185e2","isMergeCommit":false,"messageTitle":"Abstract function to create short answer question","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":83,"deletions":76},"test-code":{"insertions":2,"deletions":0}}},{"hash":"e3f9ef91b2e39bf7748595322511426a06b03f63","isMergeCommit":false,"messageTitle":"Fix tests temporarily due to change in add question command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2},"test-code":{"insertions":21,"deletions":18}}},{"hash":"e1f6cf0c7f744be154bf2ed096925d28869d45d8","isMergeCommit":true,"messageTitle":"Merge pull request #86 from lisizhuang-0121/master","messageBody":"Modify Short Answer Question Command to use parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"0e0bdcaa0bfcfbe380db710e2c02ebde76472d8f","isMergeCommit":false,"messageTitle":"Fix tests in Delete, Edit, Find, List, and Start Test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":74,"deletions":60}}},{"hash":"47620310a4e57800b720b164b735f2745f03b751","isMergeCommit":false,"messageTitle":"Temporarily disable failed tests for refactoring","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":41,"deletions":41}}},{"hash":"c40c624bfa3912f4b168a06caa5e74576cb41707","isMergeCommit":false,"messageTitle":"Remove line seperators before assertion testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":42,"deletions":36}}},{"hash":"d16ffcdc0e7dcac18b6be9842aaa91fa681cc3f7","isMergeCommit":true,"messageTitle":"Merge pull request #95 from lisizhuang-0121/master","messageBody":"Fix CI errors in assertion testing due to line seperators","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"spinoandraptos":{"docs":245,"functional-code":853,"test-code":670,"other":3},"StevenGX12":{"docs":117,"functional-code":127,"test-code":322},"yeo-menghan":{"docs":103,"functional-code":200,"test-code":48},"James-Hong-Jey":{"docs":50,"functional-code":311,"test-code":75},"lisizhuang-0121":{"docs":54,"functional-code":351,"test-code":154,"other":1}},"authorContributionVariance":{"spinoandraptos":95709.44,"StevenGX12":4508.729,"yeo-menghan":7623.073,"James-Hong-Jey":19103.39,"lisizhuang-0121":48132.215},"authorDisplayNameMap":{"spinoandraptos":"CS2113-W12-1 MAN ..HENG","StevenGX12":"CS2113-W12-1 GUAN..XIAO","yeo-menghan":"CS2113-W12-1 YEO .. HAN","James-Hong-Jey":"CS2113-W12-1 JAME.. JEY","lisizhuang-0121":"CS2113-W12-1 LI S..UANG"}} diff --git a/AY2324S1-CS2113T-W11-1_tp_master/authorship.json b/AY2324S1-CS2113T-W11-1_tp_master/authorship.json index eddbf34..d25e8fa 100644 --- a/AY2324S1-CS2113T-W11-1_tp_master/authorship.json +++ b/AY2324S1-CS2113T-W11-1_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"-":46,"yingx9":1}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"|-------------------------------------------------------------------------|:-------------:|:-----------------------------------------:|:--------------------------------:|","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"| ![yingxia_portfolio.jpg](team/pictures/yingxia_portfolio.jpg) | Loke Ying Xia | [Github](https://github.com/yingx9) | [Portfolio](team/YingXia.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"| ![benjaminng_portfolio.jpeg](team/pictures/benjaminng_portfolio.jpeg) | Benjamin Ng | [Github](https://github.com/bnjm2000) | [Portfolio](team/BenjaminNg.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"| ![joanneang_portfolio.jpg](team/pictures/joanneang_portfolio.jpg) | Joanne Ang | [Github](https://github.com/JoanneJo) | [Portfolio](team/JoanneAng.md) |","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"| ![ashokbalaji_portfolio.jpg](./team/pictures/ashokbalaji_portfolio.jpg) | Ashok Balaji | [Github](https://github.com/000verflow) | [Portfolio](team/ashokbalaji.md) |","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Wu Xingyu | [Github](https://github.com/DavinciDelta) | [Portfolio](team/WuXingyu.md) |","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"bnjm2000":3,"JoanneJo":2,"-":1,"yingx9":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"## Setting Up \u0026 Getting Started","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"1. Fork the repo at https://github.com/AY2324S1-CS2113T-W11-1/tp.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"2. Clone the fork into your computer.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"## Design \u0026 Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"### Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"\u003cimg src\u003d\"images/ArchitectureDiagram.png\" /\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"**Main components of SysLib Architecture**","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"SysLib currently consists of four main components:","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"- `UI`: User Interaction","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"- `Parser`: Parsing User Response ","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"- `Command`: Command Executor","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"- `Data`: Holds the data of SysLib","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"### UI Component","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"### Parser Component","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":"### Command Component","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"### Data Component","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":"## Implementation ","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":"This section provides details on how certain features are implemented. ","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"### Find Resource Feature","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":"The `find` command allows users to search for resources based on specified filters such as author (`/a`), ISBN (`/i`), ID (`/id`), and title (`/t`). The results will show all resources that match any of the given filters.","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":"`find` has the following options:","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":"- `find /id [ID]`","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":"- `find /t [TITLE]`","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":"- `find /a [AUTHOR]`","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":"- `find /i [ISBN]`","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"Multiple filters can also be combined:","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":"- `find /t [TITLE] /a [AUTHOR]`","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":"#### Implementation","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":"Upon receiving the `find` command, the system will:","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"1. Parse the filters and their associated values.","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":"2. Filter the resources based on the given filters.","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":"3. Display the matching resources.","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":"#### Example Usage Scenario","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":"**Step 1.** The user inputs the command: `find /a \"F. Scott Fitzgerald\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"**Step 2.** The `UI` component forwards the input to `SYSLIB`, which then sends it to the `PARSER`.","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":"**Step 3.** The `PARSER` processes the command, extracts the `author` filter, and retrieves all resources written by \"F. Scott Fitzgerald\".","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":"**Step 4.** The matching resources are displayed to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":"#### Sequence Diagram","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":"A sequence diagram could be provided here to visually show how the `find` function works.","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":"(Note: You would include the actual sequence diagram image, similar to the diagrams shown for other features.)","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":"### Examples for Testing","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":"1. **Find by Author**","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":" - Test case: `find /a \"F. Scott Fitzgerald\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":" Expected: All resources written by F. Scott Fitzgerald are displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":"2. **Find by ISBN**","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" - Test case: `find /i \"9780061120084\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" Expected: The resource with ISBN \"9780061120084\" is displayed, which should be \"To Kill a Mockingbird\" by Harper Lee.","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"000verflow"},"content":"3. **Find by ID**","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" - Test case: `find /id 2`","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"000verflow"},"content":" Expected: The resource with ID \"2\" is displayed, which should be \"To Kill a Mockingbird\" by Harper Lee.","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":"4. **Find by Title**","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" - Test case: `find /t \"The Great Gatsby\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" Expected: The resource titled \"The Great Gatsby\" is displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":"5. **Combining Filters**","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" - Test case: `find /a \"F. Scott Fitzgerald\" /t \"The Great Gatsby\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" Expected: Only the resource that matches both the title \"The Great Gatsby\" and the author \"F. Scott Fitzgerald\" is displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"JoanneJo"},"content":"### Add Resource Feature","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"JoanneJo"},"content":"The `add` feature is responsible for processing user commands to add a new book to SysLib. It is facilitated by ","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"JoanneJo"},"content":"the `AddCommand` component. It works with `Parser` and `Command` components to parse and validate the user input. ","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"JoanneJo"},"content":"The new book is stored internally in `resourceList` as a `Book`. ","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"JoanneJo"},"content":"`add` has six options:","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"JoanneJo"},"content":"- add /id [id] /t [title] /a [author] /tag [tag] /i [isbn]","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"JoanneJo"},"content":"- add /id [id] /t [title] /a [author] /tag [tag] /i [isbn] _/g [genre]_","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"JoanneJo"},"content":"#### Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"JoanneJo"},"content":"It implements the following operations:","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#parseArgument(statement: String)` -- Parses the input command to extract relevant information.","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#validate(statement: String, values: String[])` -- Validates the input statement to ensure that it is valid.","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#createBook(values: String[])` -- Creates a new book based on the parsed and validated values.","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"JoanneJo"},"content":"#### Example Usage Scenario","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"JoanneJo"},"content":"Step 1. The user inputs the command: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"JoanneJo"},"content":"Step 2. The `UI` component forwards the input to `SYSLIB`, which in turn passes it to the `PARSER`.","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"JoanneJo"},"content":"Step 3. The `PARSER` processes the command and determines that it contains a valid key (`add`). It then calls ","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"JoanneJo"},"content":"`ADDCOMMAND#execute(statement: String, this: Parser)` with the input command.","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"JoanneJo"},"content":"Step 4. The `ADDCOMMMAND` component receives the command and performs the following operations:","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"JoanneJo"},"content":"- Calls `ADDCOMMAND#parseArgument(statement: String)` to extract values for ID, title, author, ISBN, tag, and genres.","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"JoanneJo"},"content":"- Calls `ADDCOMMAND#validate(statement: String, values: String[])` to ensure the validity of the input command.","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"JoanneJo"},"content":"Step 5. The `COMMAND` component processes the input command to ensure that it meets the required format and constraints.","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"JoanneJo"},"content":"It prepares the argument values for further processing.","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"JoanneJo"},"content":"Step 6. Since the `tag` argument in the input command indicates that it is a book, the `ADDCOMMAND` determines that the","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"JoanneJo"},"content":"key is equal to `b` (ignoring case). It then creates a new `Book` object using the parsed values (title, ISBN, author, ","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"JoanneJo"},"content":"genres, ID).","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"JoanneJo"},"content":"Step 7. The newly created book is forwarded to the `PARSER` to be added to the `resourceList`.","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"JoanneJo"},"content":"#### Sequence Diagram","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"JoanneJo"},"content":"The following sequence diagram shows how the add function works:","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"JoanneJo"},"content":"\u003cimg src\u003d\"images/AddSequenceDiagram.png\"/\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"yingx9"},"content":"### Listing Resources Feature","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"yingx9"},"content":"The `list` command works with the `Parser` and `Command` component to execute the correct action. ","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"yingx9"},"content":"`list` has four options:","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"yingx9"},"content":"- list","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"yingx9"},"content":"- list _/tag [tag]_","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"yingx9"},"content":"- list _/g [genre]_","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"yingx9"},"content":"- list _/tag [tag]_ _/g [genre]_","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"yingx9"},"content":"When `list` is specified with both `tag` and `genre` filters, it is `AND` inclusive, listing only ","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"yingx9"},"content":"Resources with the same tag and genre. ","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"yingx9"},"content":"Sequence Diagram:","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"yingx9"},"content":"\u003cimg src\u003d\"images/ListSequenceDiagram.png\" /\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"yingx9"},"content":"When a user enters `list /tag B`, the Parser retrieves the parameters from the input and","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"yingx9"},"content":"calls the `execute` function of ListCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"yingx9"},"content":"ListCommand then calls `parseArg` and `validate` from `Command`, which checks if the parameters are valid. If it passes","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"yingx9"},"content":"the checks, `filterResources` is called to begin the filtering process. First it calls `hasFilters()` check if the user ","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"yingx9"},"content":"selected any filters `[tag/genre/both]` or none. ","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"yingx9"},"content":"If hasFilters returns `true`, it filters the `resourceList` with the given keywords and display the details ","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"yingx9"},"content":"of the resources.","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"yingx9"},"content":"If hasFilters returns `false`, it skips the filtering process and displays the details of all the resources.","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":183,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":186,"author":{"gitId":"DavinciDelta"},"content":"All librarians, not just system librarian!","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":188,"author":{"gitId":"JoanneJo"},"content":"- Needs to manage inventory with significant number of resources e.g. books","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"JoanneJo"},"content":"- Is a fast typist","lastModifiedDate":"2023-10-26"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"JoanneJo"},"content":"### Value Proposition","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":193,"author":{"gitId":"DavinciDelta"},"content":"To provide a platform to help librarians to quickly find the information they need to assist patrons.","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":198,"author":{"gitId":"bnjm2000"},"content":"|---------|-----------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | view a list of books that the library has | have an overview of all the books |","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | add new books to our inventory by entering their title, author, ISBN, and publication year | keep our collection up-to-date |","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | delete books from the database | let the patrons know our library no longer carries it |","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | tag a book as physical medium like newspapers, audio cds, books or online like eJournals | patrons can know what type are available |","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | have a help function | know the commands of this programme |","lastModifiedDate":"2023-10-24"},{"lineNumber":204,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | quickly find out how many books we have of a particular author and the names of the books | know how many books are related to the author |","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"bnjm2000"},"content":"| v2.0 | librarian | import/export our library\u0027s inventory data to a file format | easily share with other libraries to be used for backup and archival purposes. |","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2023-10-27"},{"lineNumber":207,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | get the status of an item | know if it is available |","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | update the details of a resource | fix any mistakes and maintain consistency |","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | add in different types of resources | differentiate between resources such as magazines, cds... |","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":211,"author":{"gitId":"JoanneJo"},"content":"## Use Cases","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"JoanneJo"},"content":"(For all use cases below, the System is the SysLib and the Actor is the user, unless specified otherwise)","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"JoanneJo"},"content":"### Use case: Add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"JoanneJo"},"content":"#### MSS","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"JoanneJo"},"content":"1. User requests to add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"JoanneJo"},"content":"2. AddressBook adds the book","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"JoanneJo"},"content":"#### Extensions","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"JoanneJo"},"content":"- 1a. The given ID is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"JoanneJo"},"content":" - 1a1. SysLib shows an error message.","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"JoanneJo"},"content":"- 1b. Insufficient data given.","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"JoanneJo"},"content":" - 1b1. SysLib shows an error message.","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":236,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":238,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":239,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":240,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":242,"author":{"gitId":"JoanneJo"},"content":"## Instructions for Manual Testing","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"bnjm2000"},"content":"help","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"bnjm2000"},"content":"Commands available:","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"bnjm2000"},"content":"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE])","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"bnjm2000"},"content":"delete: deletes the resource with the specified ID from the library inventory. (e.g. delete /id 123456789)","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"bnjm2000"},"content":"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"bnjm2000"},"content":"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"bnjm2000"},"content":"exit: displays a farewell message and exits the program (e.g. exit)","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"bnjm2000"},"content":"For more information, please refer to our user guide at:https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"bnjm2000"},"content":"add /id 1 /t The Great Gatsby /a F. Scott Fitzgerald /tag B /i 9780023381201 /g Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"bnjm2000"},"content":"This book is added: The Great Gatsby","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"bnjm2000"},"content":"add /id 2 /t To Kill a Mockingbird /a Harper Lee /tag B /i 9780061120084 /g Novel, Bildungsroman, Southern Gothic, Domestic Fiction, Thriller, Legal Story","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"bnjm2000"},"content":"This book is added: To Kill a Mockingbird","lastModifiedDate":"2023-10-26"},{"lineNumber":275,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":276,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"bnjm2000"},"content":"list","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"bnjm2000"},"content":"Listing all resources in the Library:","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"bnjm2000"},"content":"1. [B] ID: 1 Title: The Great Gatsby ISBN: 9780023381201 Author: F. Scott Fitzgerald Genre: Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"bnjm2000"},"content":"2. [B] ID: 2 Title: To Kill a Mockingbird ISBN: 9780061120084 Author: Harper Lee Genre: Novel, Bildungsroman, Southern Gothic,","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"bnjm2000"},"content":"There are currently 2 resource(s).","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"bnjm2000"},"content":"delete /id 1","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"bnjm2000"},"content":"Looking for ID: 1...","lastModifiedDate":"2023-10-26"},{"lineNumber":298,"author":{"gitId":"bnjm2000"},"content":"This resource is removed: ","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"bnjm2000"},"content":"[B] ID: 1 Title: The Great Gatsby ISBN: 9780023381201 Author: F. Scott Fitzgerald Genre: Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"bnjm2000"},"content":"exit","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":308,"author":{"gitId":"bnjm2000"},"content":"Bye, hope to see you again soon!","lastModifiedDate":"2023-10-26"},{"lineNumber":309,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"JoanneJo"},"content":"### Launch and Shutdown","lastModifiedDate":"2023-10-26"},{"lineNumber":312,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":313,"author":{"gitId":"JoanneJo"},"content":"1. Initial launch","lastModifiedDate":"2023-10-26"},{"lineNumber":314,"author":{"gitId":"JoanneJo"},"content":" 1. Download the jar file and copy it into an empty folder.","lastModifiedDate":"2023-10-26"},{"lineNumber":315,"author":{"gitId":"JoanneJo"},"content":" 2. Open the command prompt and run `java -jar SysLib.jar`.","lastModifiedDate":"2023-10-26"},{"lineNumber":316,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":317,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":318,"author":{"gitId":"JoanneJo"},"content":"### Adding a Book","lastModifiedDate":"2023-10-26"},{"lineNumber":319,"author":{"gitId":"JoanneJo"},"content":"1. Add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":320,"author":{"gitId":"JoanneJo"},"content":" 1. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B`","lastModifiedDate":"2023-10-26"},{"lineNumber":321,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":322,"author":{"gitId":"JoanneJo"},"content":" Expected: A book with ID: 0005, Title: Frankenstein, Author: Mary Shelley, and ISBN: FKS0001 is created and added ","lastModifiedDate":"2023-10-26"},{"lineNumber":323,"author":{"gitId":"JoanneJo"},"content":" into the list. A message is shown to acknowledge that the book has been added successfully.","lastModifiedDate":"2023-10-26"},{"lineNumber":324,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":325,"author":{"gitId":"JoanneJo"},"content":" 2. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":326,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":327,"author":{"gitId":"JoanneJo"},"content":" Expected: A book with ID: 0005, Title: Frankenstein, Author: Mary Shelley, ISBN: FKS0001, and ","lastModifiedDate":"2023-10-26"},{"lineNumber":328,"author":{"gitId":"JoanneJo"},"content":" Genres: Gothic, Fiction is created and added into the list. A message is shown to acknowledge that the book ","lastModifiedDate":"2023-10-26"},{"lineNumber":329,"author":{"gitId":"JoanneJo"},"content":" has been added successfully.","lastModifiedDate":"2023-10-26"},{"lineNumber":330,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":331,"author":{"gitId":"JoanneJo"},"content":" 3. Test case: `add /id abcd /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":332,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":333,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the id is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":334,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":335,"author":{"gitId":"JoanneJo"},"content":" 4. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag A /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":336,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":337,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the tag is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":338,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":339,"author":{"gitId":"JoanneJo"},"content":" 5. Test case: `add /id 0005 /t Frankenstein`","lastModifiedDate":"2023-10-26"},{"lineNumber":340,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":341,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the input is incomplete.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"000verflow":69,"bnjm2000":70,"JoanneJo":107,"DavinciDelta":8,"-":31,"yingx9":56}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"# Syslib","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"SysLib CLI is a robust command-line tool designed for system librarians to efficiently handle inventory, events, and patron assistance. With quick command-based actions, manage your library\u0027s resources and events seamlessly. Simplify administrative tasks, so you can focus on serving patrons better.","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":6,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bnjm2000":3,"-":6}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"# User guide","lastModifiedDate":"2023-10-06"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"SysLib CLI is a program designed specially for system libarians to manage their work and responsibilities. Using intuitive commands, view, add, delete, and find books from the library inventory without any hassle.","lastModifiedDate":"2023-10-06"},{"lineNumber":3,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"## Contents","lastModifiedDate":"2023-10-06"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"* [Quick start](#quick-start--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"* [Features](#features--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":" * [Get help: `help`](#viewing-help--help--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":" * [Add a listing: `add`](#add-a-listing-add--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":" * [Delete a listing: `delete`](#delete-a-listing-delete--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" * [List items: `list`](#list-all-items-list--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" * [Find listing by search parameter: `find`](#find-specific-listings-find--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":" * [Exiting the program : `exit`](#exiting-the-program--exit--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":"* [FAQ](#faq--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"* [Known Issues](#known-issues--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"* [Command summary](#command-summary--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":"## Quick start | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":"- Make sure that you have Java 11 or above installed on your computer.","lastModifiedDate":"2023-10-06"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" - [How do I check the verison of my Java](https://www.java.com/en/download/help/version_manual.html)","lastModifiedDate":"2023-10-06"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":"## Features | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":"\u003e Note:","lastModifiedDate":"2023-10-06"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":"\u003e - Items in square brackets `[]` are optional arguments.","lastModifiedDate":"2023-10-06"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":"\u003e - Items with `...` after them can be used multiple times","lastModifiedDate":"2023-10-06"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" \u003e * e.g `[/g GENRE]` ... can be used as `/g Horror /g Fantasy`","lastModifiedDate":"2023-10-06"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":"## Viewing help : `help` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":"Displays a list of available commands with examples and their syntax format","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"000verflow"},"content":"Format: `help`","lastModifiedDate":"2023-10-06"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":"## Add a listing: `add` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":"Adds a new resource to the library inventory.","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"000verflow"},"content":"#### Types of tags:","lastModifiedDate":"2023-10-06"},{"lineNumber":39,"author":{"gitId":"000verflow"},"content":"`[B]` - Books","lastModifiedDate":"2023-10-06"},{"lineNumber":40,"author":{"gitId":"000verflow"},"content":"`[CD]` - CDs","lastModifiedDate":"2023-10-06"},{"lineNumber":41,"author":{"gitId":"000verflow"},"content":"`[N]` - Newspapers","lastModifiedDate":"2023-10-06"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":"`[M]` - Magazines","lastModifiedDate":"2023-10-06"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"\u003e Note:","lastModifiedDate":"2023-10-06"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":"\u003e - Anything with `e` prior is an electronic version","lastModifiedDate":"2023-10-06"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":" \u003e i.e. `[eB]` is an eBook, `[eM]` is an eMagazine","lastModifiedDate":"2023-10-06"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":"#### Notes about genre:","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":"Multiple genres are allowed for a single resource. Separate the different genres using comma followed by a space `, `.","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":"Format: `add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]...`","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":"**Example**","lastModifiedDate":"2023-10-06"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":"add /id 123456789 /t Moby Dick /a Herman Melville /tag B /i 9780763630188 /g Adventure, Fiction","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":"add /id 123456789 /t Harry Squatter /a J.K. /tag M /i 9780763630187 /g History","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":"## Delete a listing: `delete` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"Deletes the resource with the specified ID from the library inventory.","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":"Format: `delete /id ID`","lastModifiedDate":"2023-10-06"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":"**Example**","lastModifiedDate":"2023-10-06"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":"delete /id 123456789","lastModifiedDate":"2023-10-06"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"## List all items: `list` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":"You can list all resources OR filter by certain tags or genre.","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":"Format: `list [/tag TAG /g GENRE ]`","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"- Including both filters `tag` and `genre` will only list resources satisfying both criteria:","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":" - `list /tag B /g Horror` will list Books with Horror genre. ","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":"**Example**","lastModifiedDate":"2023-10-06"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":"list","lastModifiedDate":"2023-10-06"},{"lineNumber":80,"author":{"gitId":"yingx9"},"content":"list /tag B","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"yingx9"},"content":"list /tag B /g Fiction","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"JoanneJo"},"content":"list /g Thrill","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":"## Find specific listings: `find` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":86,"author":{"gitId":"yingx9"},"content":"Find a resource by title, author, ISBN or given id.","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":88,"author":{"gitId":"JoanneJo"},"content":"Format: `find [/t TITLE OR /i ISBN OR /a AUTHOR OR /id ID]`","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":"**Example**","lastModifiedDate":"2023-10-06"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":92,"author":{"gitId":"JoanneJo"},"content":"find /t Moby Dick","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"JoanneJo"},"content":"find /i 9780763630188","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":"find /a J. K. Rowling","lastModifiedDate":"2023-10-06"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":"find /id 123456789","lastModifiedDate":"2023-10-06"},{"lineNumber":96,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":"## Exiting the program : `exit` | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":"Displays a farewell message and exits the program","lastModifiedDate":"2023-10-06"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":"Format: `exit`","lastModifiedDate":"2023-10-06"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":"## FAQ | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":"...","lastModifiedDate":"2023-10-06"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":"## Known Issues | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":110,"author":{"gitId":"000verflow"},"content":"...","lastModifiedDate":"2023-10-06"},{"lineNumber":111,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":112,"author":{"gitId":"000verflow"},"content":"## Command summary | [Return to contents](#Contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":113,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":114,"author":{"gitId":"000verflow"},"content":"| Action | Command |","lastModifiedDate":"2023-10-06"},{"lineNumber":115,"author":{"gitId":"JoanneJo"},"content":"|-----------------------|------------------------------------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"JoanneJo"},"content":"| Add listing | `add /t \u003ctitle of listing\u003e /a \u003cauthor of item\u003e /tag \u003ctype of item\u003e /i \u003cISBN of item\u003e [/g \u003cgenre of item\u003e]` |","lastModifiedDate":"2023-10-15"},{"lineNumber":117,"author":{"gitId":"000verflow"},"content":"| Delete listing | `delete /id \u003cid of listing\u003e` |","lastModifiedDate":"2023-10-06"},{"lineNumber":118,"author":{"gitId":"yingx9"},"content":"| Listing all items | `list [/tag \u003ctype of item\u003e /g \u003cgenre of book\u003e]` |","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"JoanneJo"},"content":"| Find specific listing | `find [/t \u003ctitle of listing\u003e OR /i \u003cISBN of item\u003e OR /a AUTHOR OR /id ID]` |","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"000verflow"},"content":"| Exit | `exit` |","lastModifiedDate":"2023-10-06"},{"lineNumber":121,"author":{"gitId":"000verflow"},"content":"| View help | `help` |","lastModifiedDate":"2023-10-06"},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"000verflow":80,"bnjm2000":1,"JoanneJo":11,"-":19,"yingx9":11}},{"path":"docs/diagram/AddSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"participant \":SysLib\" as SYSLIB SYSLIB_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"participant \":UI\" as UI UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"actor User as USER USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"participant \":Parser\" as PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"box Command","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"participant \":AddCommand\" as ADDCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"participant \":Command\" as COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"end box","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":"SYSLIB -[SYSLIB_COLOR]\u003e UI : readCommand()","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":"activate SYSLIB SYSLIB_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":"activate UI UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":"USER -[USER_COLOR]\u003e UI : \"add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":"UI --[UI_COLOR]\u003e SYSLIB : input: String","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"JoanneJo"},"content":"deactivate UI","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":"SYSLIB -[SYSLIB_COLOR]\u003e PARSER : process(\"add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":"activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"JoanneJo"},"content":"alt containsKey","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"JoanneJo"},"content":" PARSER-[PARSER_COLOR]\u003e PARSER: removeFirstWord(add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction)","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"JoanneJo"},"content":" activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e PARSER : \"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\": String","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" deactivate PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" PARSER -[PARSER_COLOR]\u003e ADDCOMMAND : execute(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" activate ADDCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":"else noKey","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e SYSLIB","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":"end","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"JoanneJo"},"content":"ADDCOMMAND -[COMMAND_COLOR]\u003e COMMAND : parseArgument(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"JoanneJo"},"content":"activate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":"COMMAND --[COMMAND_COLOR]\u003e ADDCOMMAND : values: String[]","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":"ADDCOMMAND -[COMMAND_COLOR]\u003e COMMAND : validate(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\", values)","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"COMMAND --[COMMAND_COLOR]\u003e ADDCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":"deactivate COMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":"alt equalsIgnoreCase(\"b\")","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND -[COMMAND_COLOR]\u003e PARSER : createBook(values)","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e ADDCOMMAND : new Book (title, isbn, author, genres, id)","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":"else notEqualsIgnoreCase(\"b\")","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"JoanneJo"},"content":" deactivate ADDCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"JoanneJo"},"content":"end","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":"PARSER --[PARSER_COLOR]\u003e SYSLIB","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":"deactivate PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"JoanneJo":59}},{"path":"docs/diagram/Architecture.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/globe_internet\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/documents\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Users/user\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"Package \" \"\u003c\u003cRectangle\u003e\u003e{","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":" Class UI UI_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":" Class Parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":" Class Command COMMAND_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":" Class Data DATA_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":" Class Main #grey","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"Class \"\u003c$user\u003e\" as User STORAGE_COLOR_T2","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"UI -[#green]\u003e Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"Main -[#grey]-\u003e UI","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"Main -[#grey]-\u003e Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"Parser -[#grey]-\u003e Command","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"Parser -[#blue]-\u003e Data","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"User ..\u003e UI","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"yingx9":25}},{"path":"docs/diagram/ListSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"!include Style.puml","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/globe_internet\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/documents\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Users/user\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"participant \":Main\" as MAIN #grey","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"participant \":UI\" as UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"participant \":Parser\" as PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"box Command","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"participant \":ListCommand\" as LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"participant \":Command\" as COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"end box","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"MAIN -[#grey]\u003e UI : readcommand()","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"activate MAIN #grey","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"activate UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"user -[USER_COLOR]\u003e UI : \"list /tag B\"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"UI --[UI_COLOR]\u003e MAIN : \"list /tag B\"","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"deactivate UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"MAIN -[#grey]\u003e PARSER : process(\"list /tag B\")","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"alt containsKey","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" PARSER -[PARSER_COLOR]\u003e PARSER: removeFirstWord(\"list /tag B\")","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" PARSER --[PARSER_COLOR]\u003e PARSER : \"/tag B\"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" deactivate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" PARSER -[PARSER_COLOR]\u003e LISTCOMMAND: execute(\"/tag B\")","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":"else noKey","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" PARSER --[PARSER_COLOR]\u003e MAIN :","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e COMMAND : parseArg(\"/tag B)","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":"activate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"COMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND : String[] values","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e COMMAND : validate(\"/tag B\", values)","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":"COMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND :","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":"deactivate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : filterResources()","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : hasFilters()","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : displayResourcesDetails()","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":"PARSER --[PARSER_COLOR]\u003e MAIN :","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"deactivate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"yingx9":75}},{"path":"docs/diagram/Style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"/\u0027","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":" \u0027Commonly used styles and colors across diagrams.","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":" \u0027Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":" \u0027comprehensive list of skinparams.","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":" \u0027/","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"\u0027T1 through T4 are shades of the original color from lightest to darkest","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"!define SYSLIB_COLOR #grey","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":"!define DATA_COLOR #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"skinparam Package {","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" BackgroundColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" FontSize 16","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"skinparam Class {","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" FontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":" FontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" BorderColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" StereotypeFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"skinparam Actor {","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" BorderColor USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" Color USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"skinparam Sequence {","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" MessageAlign center","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":" BoxFontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" BoxPadding 0","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" BoxFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":"skinparam Participant {","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" FontColor #FFFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" Padding 20","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"skinparam ArrowFontStyle bold","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":"skinparam MinClassWidth 50","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"skinparam ParticipantPadding 10","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":"skinparam Shadowing false","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":"skinparam DefaultTextAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":"skinparam packageStyle Rectangle","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"yingx9"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":"hide members","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":"hide circle","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"JoanneJo":2,"yingx9":81}},{"path":"docs/team/BenjaminNg.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"# Benjamin Ng - Project Portfolio Page","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"## Overview","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"bnjm2000":6}},{"path":"docs/team/JoanneAng.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"# Joanne Ang - Project Portfolio Page","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"## Overview","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"JoanneJo":6}},{"path":"docs/team/WuXingyu.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"# Wu Xingyu - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"DavinciDelta":6}},{"path":"docs/team/YingXia.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"# Loke Ying Xia - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"yingx9":6}},{"path":"docs/team/ashokbalaji.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"# Ashok Balaji - Project Portfolio Page","lastModifiedDate":"2023-10-06"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"## Overview","lastModifiedDate":"2023-10-06"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"000verflow":6}},{"path":"src/main/java/seedu/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"public class AddCommand extends Command{","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":" public AddCommand(){","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":" args \u003d new String[]{\"id\", \"t\", \"a\", \"tag\", \"i\", \"g\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":" aliasArgs \u003d new String[]{\"id\", \"title\", \"author\", \"tag\", \"isbn\", \"genre\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" required \u003d new boolean[]{true, true, true, true, true, false};","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" public void execute(String statement, Parser parser) throws","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" IllegalStateException, NumberFormatException, SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" String[] values \u003d parseArgument(statement);","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":" validate(statement, values);","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":" String title \u003d values[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":" String tag \u003d values[3];","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":" if (tag.equalsIgnoreCase(\"b\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":" parser.resourceList.add(Parser.createBook(values));","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":" System.out.println(\"This book is added: \" + title);","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" throw new SysLibException(\"Please enter a valid tag.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"bnjm2000":3,"JoanneJo":12,"DavinciDelta":13}},{"path":"src/main/java/seedu/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" protected String[] args;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" protected String[] aliasArgs;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" protected boolean[] required;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" public abstract void execute(String statement, Parser parser) throws","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" IllegalArgumentException, IllegalStateException, SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" /*","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" validate will include str","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" public void validate(String statement, String[] value) throws IllegalArgumentException{","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" statement \u003d statement.toLowerCase();","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" for(int pointer \u003d 0; pointer \u003c args.length; pointer ++) {","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" if(value[pointer] !\u003d null){","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" String arg \u003d validateArg(statement, pointer);","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" statement \u003d statement.replaceAll(arg+ \"\\\\s*\" + Pattern.quote(value[pointer].toLowerCase()), \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" if (!statement.isBlank()){","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Unknown variable/command: \" + statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"DavinciDelta"},"content":" public String validateArg(String statement, int pointer){","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" String arg \u003d \"/\" + args[pointer] + \" \";","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":" int firstindex \u003d statement.indexOf(arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" if (firstindex \u003d\u003d -1){","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"DavinciDelta"},"content":" arg \u003d \"/\" + aliasArgs[pointer] + \" \";","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DavinciDelta"},"content":" firstindex \u003d statement.indexOf(arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"DavinciDelta"},"content":" } else if (!aliasArgs[pointer].equals(args[pointer])){","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" if (statement.contains(\"/\" + aliasArgs[pointer] + \" \")){","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Duplicate instances of\" + arg","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"DavinciDelta"},"content":" + \", \" + arg + \" and /\" + aliasArgs[pointer] + \" mean the same\");","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"DavinciDelta"},"content":" int secondIndex \u003d statement.indexOf(arg, firstindex + arg.length());","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"DavinciDelta"},"content":" if(secondIndex !\u003d -1){","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Duplicate instances of \" + arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"DavinciDelta"},"content":" return arg;","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"DavinciDelta"},"content":" public String[] parseArgument(String statement) throws IllegalArgumentException, IllegalStateException {","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DavinciDelta"},"content":" String[] orderedArgs \u003d new String[args.length];","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"DavinciDelta"},"content":" for(int pointer \u003d 0; pointer \u003c args.length; pointer ++) {","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DavinciDelta"},"content":" orderedArgs[pointer] \u003d getMatch(statement, pointer);","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DavinciDelta"},"content":" if(orderedArgs[pointer] \u003d\u003d null \u0026\u0026 required[pointer]){","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(args[pointer] + \" is missing in the argument!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"DavinciDelta"},"content":" return orderedArgs;","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DavinciDelta"},"content":" public String getMatch(String statement, int pointer){","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"DavinciDelta"},"content":" String key \u003d args[pointer];","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"DavinciDelta"},"content":" Pattern pattern \u003d Pattern.compile(\"/\" + key + \" (.+?)(?\u003d\\\\s?/|$)\", Pattern.CASE_INSENSITIVE);","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"DavinciDelta"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"DavinciDelta"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"DavinciDelta"},"content":" if (aliasArgs[pointer] !\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"DavinciDelta"},"content":" pattern \u003d Pattern.compile(\"/\" + aliasArgs[pointer] + \" (.+?)(?\u003d\\\\s?/|$)\", Pattern.CASE_INSENSITIVE);","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"DavinciDelta"},"content":" matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"DavinciDelta"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"DavinciDelta"},"content":" return null;","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"DavinciDelta"},"content":" public int parseInt(String value){","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":" try {","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"DavinciDelta"},"content":" int num \u003d Integer.parseInt(value);","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"DavinciDelta"},"content":" if (0 \u003c num){","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":" return num;","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException (\"The argument for id is not a valid number!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"yingx9"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException (\"The argument for id is not a number!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":3,"JoanneJo":2,"DavinciDelta":73,"yingx9":13}},{"path":"src/main/java/seedu/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" public DeleteCommand(){","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" args \u003d new String[]{\"id\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" required \u003d new boolean[]{true};","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" public void execute(String statement, Parser parser) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" int id \u003d parseInt(parseArgument(statement)[0]);","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" assert id \u003e 0;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" ArrayList\u003cResource\u003e toRemove \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" System.out.println(\"Looking for ID: \" + id + \"...\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" for (Resource r: parser.resourceList){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" Book b \u003d (Book) r;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" if (b.getId() \u003d\u003d id){","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":" System.out.println(\"This resource is removed: \");","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" System.out.println(b);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" toRemove.add(r);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" if(toRemove.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"No resources with id matching \" + id + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":" parser.resourceList.removeAll(toRemove);","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":3,"JoanneJo":1,"DavinciDelta":25,"yingx9":7}},{"path":"src/main/java/seedu/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"public class ExitCommand extends Command{","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException {","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" assert statement !\u003d null : \"Statement to execute cannot be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" assert parser !\u003d null : \"Parser must not be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.INFO, \"Executing ExitCommand...\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" UI ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" ui.showExitMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"bnjm2000":42}},{"path":"src/main/java/seedu/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":" private static final String INVALID_ARGUMENT_MESSAGE \u003d \"Please use the format \u0027find [/t TITLE OR \"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":" + \"/i ISBN OR /a AUTHOR OR /id ID]\u0027\\n\" + \"____________________________________________________________\";","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" private static final String NO_RESOURCE_FOUND_MESSAGE \u003d \"There are no resources found matching the given filters.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" private static final String RESOURCE_FOUND_MESSAGE \u003d \"Here are resources that matched the given filters:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"000verflow"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"000verflow"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"000verflow"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"000verflow"},"content":" protected String title;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":" protected String author;","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"000verflow"},"content":" protected String isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":" protected String id;","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":" protected UI ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":" public FindCommand(){","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":" args \u003d new String[]{\"id\", \"i\", \"a\", \"t\"};","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":" aliasArgs \u003d new String[]{\"id\", \"isbn\", \"author\", \"title\"};","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":" required \u003d new boolean[]{false, false, false, false};","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" LOGGER.info(\"FindCommand instance created.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" public void setTitle(String title){","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":" this.title \u003d title;","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":" public String getTitle(){","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" return this.title;","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":" public void setAuthor(String author){","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":" this.author \u003d author;","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":" public String getAuthor(){","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":" return this.author;","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":" public void setISBN(String isbn){","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":" this.isbn \u003d isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":" public String getISBN(){","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":" return this.isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":" public void setID(String id){","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":" this.id \u003d id;","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":" public String getID(){","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":" return this.id;","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException, SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" assert statement !\u003d null \u0026\u0026 !statement.trim().isEmpty() : \"Statement to execute cannot be null or empty!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":" assert parser !\u003d null : \"Parser cannot be null!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" String[] value \u003d parseArgument(statement);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":" validate(statement, value);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" if (value[3]\u003d\u003dnull \u0026\u0026 value[2]\u003d\u003dnull \u0026\u0026 value[1]\u003d\u003dnull \u0026\u0026 value[0]\u003d\u003dnull) {","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":" throw new IllegalArgumentException(INVALID_ARGUMENT_MESSAGE + System.lineSeparator());","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":" ArrayList\u003cResource\u003e matchedResources \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" for (Resource r: parser.resourceList){","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":" Book b \u003d (Book) r;","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" if (b.getTitle().equals(value[3]) || b.getISBN().equals(value[1]) || b.getAuthor().equals(value[2])){","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":" matchedResources.add(b);","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" if (matchedResources.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":" LOGGER.warning(\"No resources matched the given filters.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":" System.out.println(NO_RESOURCE_FOUND_MESSAGE);","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":" ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"000verflow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"000verflow"},"content":" LOGGER.info(\"Resources matched the given filters.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"000verflow"},"content":" System.out.println(RESOURCE_FOUND_MESSAGE);","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"000verflow"},"content":" for (Resource r : matchedResources) {","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"000verflow"},"content":" System.out.println(r);","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"000verflow"},"content":" ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":113,"yingx9":7}},{"path":"src/main/java/seedu/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" private static final Logger logger \u003d Logger.getLogger(HelpCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException {","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" assert statement !\u003d null : \"Statement to execute cannot be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" assert parser !\u003d null : \"Parser must not be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" UI ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" logger.log(Level.INFO, \"Executing HelpCommand\");","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":" ui.showHelpMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":35,"yingx9":7}},{"path":"src/main/java/seedu/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatLineSeparator;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatLastLineDivider;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatFirstLine;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":" public static final String FILTER_MESSAGE \u003d formatFirstLine(\"Listing resources matching given filters: \");","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":" public static final String GENERIC_MESSAGE \u003d formatFirstLine(\"Listing all resources in the Library:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":" public static final String ZERO_RESOURCES_MESSAGE \u003d formatLastLineDivider(\"There are currently 0 resources.\");","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":" private static String tagKeyword;","lastModifiedDate":"2023-10-19"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":" private static String genreKeyword;","lastModifiedDate":"2023-10-19"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":" private static String feedbackToUser;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":" public ListCommand(){","lastModifiedDate":"2023-10-19"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" args \u003d new String[]{\"tag\", \"g\"};","lastModifiedDate":"2023-10-19"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" aliasArgs \u003d new String[]{\"tag\", \"genre\"};","lastModifiedDate":"2023-10-19"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" required \u003d new boolean[]{false, false};","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" public void execute(String statement, Parser parser) throws SysLibException, IllegalArgumentException {","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" feedbackToUser \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" String[] values \u003d parseArgument(statement);","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" validate(statement, values);","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" filterResources(values, parser.resourceList);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" System.out.println(feedbackToUser);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" public void filterResources(String[] values, List\u003cResource\u003e resourceList) throws SysLibException{","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" boolean hasFilters \u003d hasFilters((values));","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" List\u003cResource\u003e matchedResources \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-19"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" if(hasFilters){","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" boolean isTagEqualToKeyword \u003d true;","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" boolean isGenreEqualToKeyword \u003d true;","lastModifiedDate":"2023-10-19"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" for (int i\u003d0; i \u003cresourceList.size(); i++){","lastModifiedDate":"2023-10-19"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" Resource resource \u003d resourceList.get(i);","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" if(tagKeyword !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" String resourceTag \u003d resource.getTag();","lastModifiedDate":"2023-10-19"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":" isTagEqualToKeyword \u003d resourceTag.equals(tagKeyword);","lastModifiedDate":"2023-10-19"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" if(genreKeyword !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" isGenreEqualToKeyword \u003d Resource.hasGenre(resource, genreKeyword);","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":" if (isTagEqualToKeyword \u0026\u0026 isGenreEqualToKeyword){","lastModifiedDate":"2023-10-19"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" matchedResources.add(resource);","lastModifiedDate":"2023-10-19"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":" displayResourcesDetails(matchedResources);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":" } else{","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"yingx9"},"content":" displayResourcesDetails(resourceList);","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"yingx9"},"content":" public String displayResourcesDetails(List\u003cResource\u003e resourcesList) {","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"yingx9"},"content":" String messageToDisplay \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"yingx9"},"content":" if (resourcesList.isEmpty()){","lastModifiedDate":"2023-10-19"},{"lineNumber":94,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d ZERO_RESOURCES_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"yingx9"},"content":" } else {","lastModifiedDate":"2023-10-19"},{"lineNumber":97,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":98,"author":{"gitId":"yingx9"},"content":" for (int i \u003d 0; i \u003c resourcesList.size(); i +\u003d 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"yingx9"},"content":" String resourceDetails \u003d resourcesList.get(i).toString();","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d formatLineSeparator(i+1 + \". \" + resourceDetails);","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":102,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d formatLastLineDivider(\"There are currently \" + resourcesList.size() +","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"yingx9"},"content":" \" resource(s).\");","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":107,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":108,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d messageToDisplay;","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"yingx9"},"content":" return messageToDisplay;","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":112,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":113,"author":{"gitId":"yingx9"},"content":" public static boolean hasFilters(String[] values) throws SysLibException {","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"yingx9"},"content":" tagKeyword \u003d null;","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"yingx9"},"content":" genreKeyword \u003d null;","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":117,"author":{"gitId":"yingx9"},"content":" boolean hasFilters \u003d true;","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"yingx9"},"content":" if (values[0] \u003d\u003d null \u0026\u0026 values[1] \u003d\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":122,"author":{"gitId":"yingx9"},"content":" if (values[0] !\u003d null) {","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"yingx9"},"content":" tagKeyword \u003d values[0];","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"yingx9"},"content":" if (values[1] !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"yingx9"},"content":" genreKeyword \u003d values[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":129,"author":{"gitId":"yingx9"},"content":" return hasFilters;","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":131,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":132,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":133,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":1,"yingx9":130}},{"path":"src/main/java/seedu/common/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"package seedu.common;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"public class Messages {","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":" public static String formatFirstLine(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":" return LINESEPARATOR + message + LINESEPARATOR + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":" public static String formatLineSeparator(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":" return message + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":" public static String formatLastLineDivider(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" return LINESEPARATOR + message + SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"yingx9":17}},{"path":"src/main/java/seedu/data/Book.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"public class Book extends Resource {","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":" private String author;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":" //private String synopsis;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":" private String[] genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":" private int id;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":" public Book(String title, String isbn, String author, String[] genres, int id) {","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" super(title, isbn);","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" setTag(\"B\");","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" setAuthor(author);","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" //setSynopsis(synopsis);","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" setGenre(genres);","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" setId(id);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" public String getAuthor() {","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" return author;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" public void setAuthor(String author) {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" this.author \u003d author;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":" /*public String getSynopsis() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" return synopsis;","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" public void setSynopsis(String synopsis) {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" this.synopsis \u003d synopsis;","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" }*/","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" public String[] getGenre() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" return genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":" public void setGenre(String[] genres) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":" this.genres \u003d genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":" public String getGenreString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" return String.join(\", \", genres);","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":" public int getId() {","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":" return id;","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" public void setId(int id) {","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" this.id \u003d id;","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":" StringBuilder genreString \u003d new StringBuilder();","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":" if (getGenre()[0] \u003d\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":" genreString.append(\"-\");","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":" genreString.append(java.util.Arrays.toString(getGenre()).replace(\"[\", \"\").replace(\"]\", \"\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"JoanneJo"},"content":" return \"[\" + getTag() + \"] \" + \" ID: \" + getId() + \" Title: \" + getTitle() + \" ISBN: \" + getISBN() + \" Author: \"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"bnjm2000"},"content":" + getAuthor() + \" Genre: \" + genreString;","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"bnjm2000":1,"JoanneJo":37,"DavinciDelta":23,"yingx9":4}},{"path":"src/main/java/seedu/data/Resource.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"public class Resource {","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":" private String title;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":" private boolean isBorrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":" private Integer copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":" private String tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":" private String isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" public Resource(String title, String isbn){","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" setTitle(title);","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" setBorrowed(false);","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" setISBN(isbn);","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" setCopies(1);","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" setTag(\"\");","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" public String getTitle() {","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" return title;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" public void setTitle(String title) {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" this.title \u003d title;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" public boolean isBorrowed() {","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" return isBorrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" public void setBorrowed(boolean borrowed) {","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" isBorrowed \u003d borrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":" public Integer getCopies() {","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"DavinciDelta"},"content":" return copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" public void setCopies(Integer copies) {","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DavinciDelta"},"content":" this.copies \u003d copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" public String getTag() {","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"DavinciDelta"},"content":" return tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"DavinciDelta"},"content":" public void setTag(String tag) {","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"DavinciDelta"},"content":" this.tag \u003d tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"DavinciDelta"},"content":" public String getISBN() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"DavinciDelta"},"content":" return isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"DavinciDelta"},"content":" public void setISBN(String isbn) {","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"DavinciDelta"},"content":" this.isbn \u003d isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" return \"[\" + tag + \"] \" + title;","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" public static boolean hasGenre(Resource resource, String genre){","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" Book bookResource;","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" if (resource instanceof Book) {","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":" bookResource \u003d (Book) resource;","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" String[] genres \u003d bookResource.getGenre();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" if (genres[0] \u003d\u003d null ){","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" for(int j \u003d0; j \u003c genres.length; j ++){","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" if (genres[j].equals(genre)){","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" return true;","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"DavinciDelta":53,"yingx9":25}},{"path":"src/main/java/seedu/data/SysLibException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"public class SysLibException extends Exception {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":" public SysLibException(String message) {","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":" super(message);","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"000verflow":1,"JoanneJo":6}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":7,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Main entry-point for the java.duke.Duke application.","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" private static UI ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" private static Parser parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":" public Duke(){","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":" ui \u003d new UI();","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" new Duke().run();","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" public void run(){","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":" ui.showWelcomeMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" while (true) {","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" String response \u003d ui.readCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" parser.process(response);","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" if (response.equalsIgnoreCase(\"exit\")){","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" break;","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"000verflow":19,"bnjm2000":2,"-":11,"yingx9":2}},{"path":"src/main/java/seedu/parser/DeleteParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"public class DeleteParser {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":" public static String parseDelete(String statement) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" String inputPattern \u003d \"/id (\\\\d+)\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DavinciDelta"},"content":" if (matchFound){","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" \"\u0027delete /id ID\");","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" } catch (IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" \"\u0027delete /id ID\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"DavinciDelta":26}},{"path":"src/main/java/seedu/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.AddCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.DeleteCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.FindCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.ListCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.HelpCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.ExitCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-19"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"public class Parser {","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":" public List\u003cResource\u003e resourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" public HashMap\u003cString, Command\u003e commandProcessor \u003d new HashMap\u003c\u003e() {","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" put(\"list\", new ListCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" put(\"delete\", new DeleteCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":" put(\"find\", new FindCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" put(\"help\", new HelpCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" put(\"exit\", new ExitCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" put(\"add\", new AddCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" };","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" public void process(String response) {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" String command \u003d response.split(\" \")[0];","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" if (commandProcessor.containsKey(command)) {","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" String statement \u003d removeFirstWord(response);","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" try {","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" commandProcessor.get(command).execute(statement, this);","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" } catch (IllegalArgumentException | IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" } else {","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" System.out.println(\"no commands found. Enter \\\"help\\\" for a list of commands.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" public static String removeFirstWord(String response) {","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" int index \u003d response.indexOf(\" \");","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" return \"\";","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" return response.substring(index + 1);","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":" public List\u003cResource\u003e getResourceList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":" return resourceList;","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"JoanneJo"},"content":" public static String[] parseAddCommand(String statement) throws SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"JoanneJo"},"content":" String inputPattern \u003d \"(.+?) /tag (.)(.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"JoanneJo"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"JoanneJo"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"JoanneJo"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"JoanneJo"},"content":" if (matchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"JoanneJo"},"content":" if (matcher.group(2).equalsIgnoreCase(\"b\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"JoanneJo"},"content":" return parseAddBook(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":75,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":79,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"JoanneJo"},"content":" public static String[] parseAddBook(String statement) throws SysLibException, IllegalStateException {","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"JoanneJo"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"JoanneJo"},"content":" String inputPattern \u003d \"/id (.+?) /t (.+?) /a (.+?) /tag (.+?) /i (.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"JoanneJo"},"content":" String genrePattern \u003d \"(.+) /g (.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"JoanneJo"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"JoanneJo"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"JoanneJo"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"JoanneJo"},"content":" Pattern gPattern \u003d Pattern.compile(genrePattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"JoanneJo"},"content":" Matcher gMatcher \u003d gPattern.matcher(matcher.group(5));","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"JoanneJo"},"content":" boolean gMatchFound \u003d gMatcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"JoanneJo"},"content":" String[] args \u003d new String[6];","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"JoanneJo"},"content":" if (matchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"JoanneJo"},"content":" args[0] \u003d matcher.group(1).trim(); // id","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"JoanneJo"},"content":" args[1] \u003d matcher.group(2).trim(); // title","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"JoanneJo"},"content":" args[2] \u003d matcher.group(3).trim(); // author","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"JoanneJo"},"content":" args[3] \u003d matcher.group(4).trim(); // tag","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"JoanneJo"},"content":" if (gMatchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"JoanneJo"},"content":" args[4] \u003d gMatcher.group(1).trim(); // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"JoanneJo"},"content":" args[5] \u003d gMatcher.group(2).trim(); // genre","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"JoanneJo"},"content":" args[4] \u003d matcher.group(5).trim(); // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"JoanneJo"},"content":" if (args[0].isEmpty() || args[1].isEmpty() || args[2].isEmpty() || args[3].isEmpty()","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"JoanneJo"},"content":" || args[4].isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"bnjm2000"},"content":" throw new SysLibException(\"Please state the id, title, author, tag, and ISBN.\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"yingx9"},"content":" SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":113,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":117,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"JoanneJo"},"content":" return args;","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"JoanneJo"},"content":" } catch (IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":121,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":122,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"JoanneJo"},"content":" public static Book createBook(String[] args) throws IllegalStateException, NumberFormatException {","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"JoanneJo"},"content":" int id;","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"JoanneJo"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"JoanneJo"},"content":" id \u003d Integer.parseInt(args[0]); // id","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"JoanneJo"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":130,"author":{"gitId":"yingx9"},"content":" throw new NumberFormatException(\"Please enter a valid id.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":131,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":132,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"JoanneJo"},"content":" String title \u003d args[1]; // title","lastModifiedDate":"2023-10-15"},{"lineNumber":134,"author":{"gitId":"JoanneJo"},"content":" String author \u003d args[2]; // author","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"JoanneJo"},"content":" String isbn \u003d args[4]; // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":136,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":137,"author":{"gitId":"JoanneJo"},"content":" String genre;","lastModifiedDate":"2023-10-15"},{"lineNumber":138,"author":{"gitId":"JoanneJo"},"content":" String[] genres \u003d new String[1];","lastModifiedDate":"2023-10-15"},{"lineNumber":139,"author":{"gitId":"JoanneJo"},"content":" if (args[5] !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":140,"author":{"gitId":"JoanneJo"},"content":" genre \u003d args[5]; // genre","lastModifiedDate":"2023-10-15"},{"lineNumber":141,"author":{"gitId":"JoanneJo"},"content":" genres \u003d genre.split(\", \");","lastModifiedDate":"2023-10-15"},{"lineNumber":142,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":143,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":144,"author":{"gitId":"JoanneJo"},"content":" return new Book(title, isbn, author, genres, id);","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"000verflow"},"content":" public Matcher parseFindCommand(String command) throws SysLibException{","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"000verflow"},"content":" // Define a regular expression pattern to match optional flags and their values","lastModifiedDate":"2023-10-15"},{"lineNumber":149,"author":{"gitId":"000verflow"},"content":" Pattern pattern \u003d Pattern.compile(\"/(t|a|i|id)\\\\s+([^/]+)\");","lastModifiedDate":"2023-10-15"},{"lineNumber":150,"author":{"gitId":"000verflow"},"content":" return pattern.matcher(command);","lastModifiedDate":"2023-10-15"},{"lineNumber":151,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":152,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":153,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":154,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":155,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":12,"bnjm2000":2,"JoanneJo":93,"DavinciDelta":1,"yingx9":47}},{"path":"src/main/java/seedu/ui/UI.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"public class UI {","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":" public static final String LINESEPARATOR \u003d System.lineSeparator();","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":" public static final String LINEDIVIDER \u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-19"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":" public static final String SEPARATOR_LINEDIVIDER \u003d LINESEPARATOR + LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":" protected static String logo \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":" \" ____ _ _ _ ____ _ ___ \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" \"/ ___| _ _ ___| | (_) |__ / ___| | |_ _|\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" \"\\\\___ \\\\| | | / __| | | | \u0027_ \\\\ | | | | | | \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":" \" ___) | |_| \\\\__ \\\\ |___| | |_) | | |___| |___ | | \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":" \"|____/ \\\\__, |___/_____|_|_.__/ \\\\____|_____|___|\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":" \" |___/ \";","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":" protected Scanner myScanner;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" public UI(){","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" this.myScanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" public void showWelcomeMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" System.out.println(logo);","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" System.out.println(\"What do you want to do?\");","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" public void showExitMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"Bye, hope to see you again soon!\");","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" public void showHelpMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"Commands available:\");","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"add: adds a new resource to the library inventory.\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE])\");","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"list: list all resources OR filter by certain tags or genre.\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" \"(e.g. list /tag B /g Fiction\");","lastModifiedDate":"2023-10-19"},{"lineNumber":44,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"exit: displays a farewell message and exits the program (e.g. exit)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\");","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"bnjm2000"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" public void showError(Exception e){","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" System.out.println(e);","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" public String readCommand(){","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":" System.out.print(\"\u003e \");","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" return myScanner.nextLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" public void showLine(){","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" System.out.println(LINEDIVIDER);","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":41,"bnjm2000":15,"yingx9":7}},{"path":"src/test/java/seedu/DukeTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"class DukeTest {","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"000verflow":1,"-":11}},{"path":"src/test/java/seedu/commands/AddCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":"public class AddCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" private final Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":" private final AddCommand addCommand \u003d new AddCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":" public void addCommandValidData() throws SysLibException {","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":" addCommand.execute(\"/id 123456789 /t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321 \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":" \"/g Non-Fiction, Biography\", parser);","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":" Book newBook \u003d (Book) parser.getResourceList().get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getId(), 123456789);","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getTitle(), \"The Minds of Billy Milligan\");","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getAuthor(), \"Daniel Keyes\");","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getTag(), \"B\");","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getISBN(), \"987654321\");","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getGenreString(), \"Non-Fiction, Biography\");","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" public void addCommandOutput() throws SysLibException {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":" addCommand.execute(\"/id 123456789 /t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321 \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":" \"/g Non-Fiction, Biography\", parser);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"JoanneJo"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" String expectedOutput \u003d \"This book is added: The Minds of Billy Milligan\" + System.lineSeparator() +","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" public void addCommandInvalidId() {","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003eaddCommand.execute(\"/id abcd \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":" \"/t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321\", parser));","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":" public void addCommandInsufficientData() {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003eaddCommand.execute(\"/id \", parser));","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"JoanneJo":58}},{"path":"src/test/java/seedu/commands/DeleteCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":"public class DeleteCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" void execute() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DavinciDelta"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" deleteCommand.execute(\"/id 1111\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" String expectedOutput \u003d \"Looking for ID: 1111...\" + System.lineSeparator()+","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" \"No resources with id matching 1111\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"DavinciDelta":31}},{"path":"src/test/java/seedu/commands/ExitCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"class ExitCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" ExitCommand exitCommand \u003d new ExitCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" exitCommand.execute(\"\", parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Bye, hope to see you again soon!\" + System.lineSeparator()+","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":28}},{"path":"src/test/java/seedu/commands/FindCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":"public class FindCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" private FindCommand findCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" private Parser parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" private final ByteArrayOutputStream outContent \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" findCommand \u003d new FindCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":" // Mock resourceList for Parser","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" parser.resourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"000verflow"},"content":" String[] genreTest1 \u003d {\"horror\"};","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" String[] genreTest2 \u003d {\"comedy\"};","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" parser.resourceList.add(new Book(\"Title1\", \"ISBN1\", \"Author1\", genreTest1, 1234));","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":" parser.resourceList.add(new Book(\"Title2\", \"ISBN2\", \"Author2\", genreTest2, 5678));","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"000verflow"},"content":" outContent.reset(); // Clearing any old content","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"000verflow"},"content":" System.setOut(new PrintStream(outContent)); // Redirect System.out","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"000verflow"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"000verflow"},"content":" void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":" System.setOut(originalOut); // Reset System.out after each test","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":" void testSetAndGetTitle() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":" findCommand.setTitle(\"TitleTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":" assertEquals(\"TitleTest\", findCommand.getTitle());","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" void testSetAndGetAuthor() {","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" findCommand.setAuthor(\"AuthorTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":" assertEquals(\"AuthorTest\", findCommand.getAuthor());","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":" void testSetAndGetISBN() {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":" findCommand.setISBN(\"ISBNTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" assertEquals(\"ISBNTest\", findCommand.getISBN());","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":" void testSetAndGetID() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":" findCommand.setID(\"IDTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":" assertEquals(\"IDTest\", findCommand.getID());","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":" void testExecuteWithInvalidFlag() {","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":" assertThrows(IllegalArgumentException.class, () -\u003e findCommand.execute(\"/x InvalidFlag\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":" void testExecuteWithNoFilter() {","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":" assertThrows(AssertionError.class, () -\u003e findCommand.execute(\"\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":" void testExecuteFindTitleMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Title1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":" void testExecuteFindAuthorMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/a Author1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Author1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":" void testExecuteFindISBNMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/i ISBN1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"ISBN1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":" void testExecuteNoMatchesFound() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title3\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"There are no resources found matching the given filters.\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" void testExecuteMultipleFilters() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title1 /a Author1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Title1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Author1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"000verflow"},"content":" void testExecuteInvalidFormat() {","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"000verflow"},"content":" assertThrows(IllegalArgumentException.class, () -\u003e findCommand.execute(\"find /z Invalid\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"000verflow"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"000verflow":114}},{"path":"src/test/java/seedu/commands/HelpCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"class HelpCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" HelpCommand helpCommand \u003d new HelpCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" helpCommand.execute(\"\", parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Commands available:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" \"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" \"/tag TAG /i ISBN [/g GENRE])\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" \"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" \"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" \"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() + \"exit: displays a farewell message and exits the program (e.g. exit)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":" \"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":38,"yingx9":1}},{"path":"src/test/java/seedu/commands/ListCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"import seedu.util.TestUtil;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.ZERO_RESOURCES_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"public class ListCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" private Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" private List\u003cResource\u003e emptyResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" private List\u003cResource\u003e testResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" private TestUtil testUtil \u003d new TestUtil();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" private Command listCommand \u003d new ListCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" void execute() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" testResourceList \u003d TestUtil.fillTestList();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" assertEmptyListMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" assertListByTagBehavior();","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" assertListByGenreBehavior();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" assertNoFilteredListDisplay();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" private void assertEmptyListMessage() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" String outputMessage \u003d testUtil.getOutputMessage(listCommand, \"\", emptyResourceList);","lastModifiedDate":"2023-10-19"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" String expectedMessage \u003d GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" expectedMessage +\u003d ZERO_RESOURCES_MESSAGE + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" assertEquals(expectedMessage, outputMessage);","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" private void assertListByTagBehavior() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" parser.resourceList \u003d testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003elistCommand.execute(\"/tag\", parser));","lastModifiedDate":"2023-10-19"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":" private void assertListByGenreBehavior() {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" parser.resourceList \u003d testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003elistCommand.execute(\"/g\", parser));","lastModifiedDate":"2023-10-19"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" private void assertNoFilteredListDisplay() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" String outputMessage \u003d testUtil.getOutputMessage(listCommand, \"/g Thriller\", testResourceList);","lastModifiedDate":"2023-10-19"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":" String expectedMessage \u003d FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":" expectedMessage +\u003d ZERO_RESOURCES_MESSAGE + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" assertEquals(expectedMessage, outputMessage);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yingx9":72}},{"path":"src/test/java/seedu/parser/DeleteParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"class DeleteParserTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":" public void testParseDeleteWithValidInput() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" String statement \u003d \"delete /id 1\";","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" String result \u003d DeleteParser.parseDelete(statement);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" assertEquals(\"1\", result);","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" public void testParseDeleteWithInvalidInput() {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" String statement \u003d \"delete /t hello\";","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" assertThrows(SysLibException.class, () -\u003e DeleteParser.parseDelete(statement));","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":23}},{"path":"src/test/java/seedu/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"class ParserTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" public void testProcessExitCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"exit\";","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Bye, hope to see you again soon!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" public void testProcessHelpCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Commands available:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bnjm2000"},"content":" \"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"bnjm2000"},"content":" \"/tag TAG /i ISBN [/g GENRE])\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"bnjm2000"},"content":" \"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"bnjm2000"},"content":" \"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"bnjm2000"},"content":" \"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() + \"exit: displays a farewell message and exits the program (e.g. exit)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bnjm2000"},"content":" \"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bnjm2000"},"content":" public void testProcessUnknownCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"bye\";","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"no commands found. Enter \\\"help\\\" for a list of commands.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bnjm2000"},"content":" public void testProcessCommands() {","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bnjm2000"},"content":" //Test add","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"add /id 1 /t Surrounded by Idiots /a Thomas Erikson \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bnjm2000"},"content":" \"/tag B /i 9781250255174 /g Self-help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"This book is added: Surrounded by Idiots\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"bnjm2000"},"content":" //Add second book","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"add /id 2 /t The Subtle Art of Not Giving a F*ck /a Mark Manson \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"bnjm2000"},"content":" \"/tag B /i 9780062457714 /g Self-help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"This book is added: The Subtle Art of Not Giving a F*ck\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"yingx9"},"content":" \"____________________________________________________________\" + System.lineSeparator()","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"yingx9"},"content":" + System.lineSeparator();;","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"bnjm2000"},"content":" //Test list","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Listing all resources in the Library:\" + System.lineSeparator() + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"bnjm2000"},"content":" \"1. [B] ID: 1 Title: Surrounded by Idiots ISBN: 9781250255174 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"bnjm2000"},"content":" \"Author: Thomas Erikson Genre: Self-help\" + System.lineSeparator()+","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"bnjm2000"},"content":" \"2. [B] ID: 2 Title: The Subtle Art of Not Giving a F*ck ISBN: 9780062457714 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"bnjm2000"},"content":" \"Author: Mark Manson Genre: Self-help\" + System.lineSeparator() + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"bnjm2000"},"content":" \"There are currently 2 resource(s).\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bnjm2000"},"content":" //Test find","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"find /t The Subtle Art of Not Giving a F*ck\";","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Here are resources that matched the given filters:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"bnjm2000"},"content":" \"[B] ID: 2 Title: The Subtle Art of Not Giving a F*ck ISBN: 9780062457714 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"bnjm2000"},"content":" \"Author: Mark Manson Genre: Self-help\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"bnjm2000"},"content":" //Negative find test","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"find /t No Such Book\";","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"000verflow"},"content":" expectedOutput +\u003d \"There are no resources found matching the given filters.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"bnjm2000"},"content":" //Test delete","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"delete /id 1\";","lastModifiedDate":"2023-10-16"},{"lineNumber":139,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":140,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":141,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Looking for ID: 1...\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":142,"author":{"gitId":"bnjm2000"},"content":" \"This resource is removed: \" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":143,"author":{"gitId":"bnjm2000"},"content":" \"[B] ID: 1 Title: Surrounded by Idiots ISBN: 9781250255174 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":144,"author":{"gitId":"bnjm2000"},"content":" \"Author: Thomas Erikson Genre: Self-help\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"bnjm2000"},"content":" public void testParseAddCommand() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":151,"author":{"gitId":"bnjm2000"},"content":" // Test case 1: Valid input with /tag b","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"bnjm2000"},"content":" String statement1 \u003d \"add /id ID /t TITLE /a AUTHOR /tag b /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":153,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs1 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", \"GENRE\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":154,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs1, Parser.parseAddCommand(statement1));","lastModifiedDate":"2023-10-16"},{"lineNumber":155,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":156,"author":{"gitId":"bnjm2000"},"content":" // Test case 2: Invalid input (missing /tag b)","lastModifiedDate":"2023-10-16"},{"lineNumber":157,"author":{"gitId":"bnjm2000"},"content":" String statement2 \u003d \"add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":158,"author":{"gitId":"bnjm2000"},"content":" assertThrows(SysLibException.class, () -\u003e Parser.parseAddCommand(statement2));","lastModifiedDate":"2023-10-16"},{"lineNumber":159,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":160,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":161,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"bnjm2000"},"content":" public void testParseAddBook() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":163,"author":{"gitId":"bnjm2000"},"content":" // Test case 1: Valid input with /g GENRE","lastModifiedDate":"2023-10-16"},{"lineNumber":164,"author":{"gitId":"bnjm2000"},"content":" String statement1 \u003d \"/id ID /t TITLE /a AUTHOR /tag b /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":165,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs1 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", \"GENRE\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":166,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs1, Parser.parseAddBook(statement1));","lastModifiedDate":"2023-10-16"},{"lineNumber":167,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":168,"author":{"gitId":"bnjm2000"},"content":" // Test case 2: Valid input without /g GENRE","lastModifiedDate":"2023-10-16"},{"lineNumber":169,"author":{"gitId":"bnjm2000"},"content":" String statement2 \u003d \"/id ID /t TITLE /a AUTHOR /tag b /i ISBN\";","lastModifiedDate":"2023-10-16"},{"lineNumber":170,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs2 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", null};","lastModifiedDate":"2023-10-16"},{"lineNumber":171,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs2, Parser.parseAddBook(statement2));","lastModifiedDate":"2023-10-16"},{"lineNumber":172,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":173,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":174,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":175,"author":{"gitId":"bnjm2000"},"content":" public void testCreateBook() {","lastModifiedDate":"2023-10-16"},{"lineNumber":176,"author":{"gitId":"bnjm2000"},"content":" String[] args \u003d {\"123\", \"CS2113T\", \"W11\", \"B\", \"1234\", \"Horror\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":177,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":178,"author":{"gitId":"bnjm2000"},"content":" Book book \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":179,"author":{"gitId":"bnjm2000"},"content":" book \u003d Parser.createBook(args);","lastModifiedDate":"2023-10-16"},{"lineNumber":180,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":181,"author":{"gitId":"bnjm2000"},"content":" int expectedId \u003d 123;","lastModifiedDate":"2023-10-16"},{"lineNumber":182,"author":{"gitId":"bnjm2000"},"content":" String expectedTitle \u003d \"CS2113T\";","lastModifiedDate":"2023-10-16"},{"lineNumber":183,"author":{"gitId":"bnjm2000"},"content":" String expectedAuthor \u003d \"W11\";","lastModifiedDate":"2023-10-16"},{"lineNumber":184,"author":{"gitId":"bnjm2000"},"content":" String expectedIsbn \u003d \"1234\";","lastModifiedDate":"2023-10-16"},{"lineNumber":185,"author":{"gitId":"bnjm2000"},"content":" String[] expectedGenres \u003d { \"Horror\" };","lastModifiedDate":"2023-10-16"},{"lineNumber":186,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":187,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedId, book.getId());","lastModifiedDate":"2023-10-16"},{"lineNumber":188,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedTitle, book.getTitle());","lastModifiedDate":"2023-10-16"},{"lineNumber":189,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedAuthor, book.getAuthor());","lastModifiedDate":"2023-10-16"},{"lineNumber":190,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedIsbn, book.getISBN());","lastModifiedDate":"2023-10-16"},{"lineNumber":191,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedGenres, book.getGenre());","lastModifiedDate":"2023-10-16"},{"lineNumber":192,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":193,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":194,"author":{"gitId":"bnjm2000"},"content":" public void testCreateBookInvalidId() {","lastModifiedDate":"2023-10-16"},{"lineNumber":195,"author":{"gitId":"bnjm2000"},"content":" String[] args \u003d {\"not_a_number\", \"Sample Title\", \"Sample Author\", \"\", \"Sample ISBN\", \"Sample Genre\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":196,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":197,"author":{"gitId":"bnjm2000"},"content":" assertThrows(NumberFormatException.class, () -\u003e Parser.createBook(args));","lastModifiedDate":"2023-10-16"},{"lineNumber":198,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":199,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"000verflow":1,"bnjm2000":195,"yingx9":3}},{"path":"src/test/java/seedu/util/TestUtil.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.util;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import seedu.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"public class TestUtil {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" public String getOutputMessage(Command c, String m) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" c.execute(m, parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" return outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" public String getOutputMessage(Command c, String m, List\u003cResource\u003e resourceList) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" parser.resourceList \u003d resourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" c.execute(m, parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" return outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" public static List\u003cResource\u003e fillTestList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" List\u003cResource\u003e testResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" String[] genres \u003d {\"Horror\", \"Fiction\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" String[] genresAdventure \u003d {\"Adventure\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" String[] genresNull \u003d {null};","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" Resource test1 \u003d new Resource(\"title1\", \"123123\");","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" Book testBook \u003d new Book(\"title2\", \"123123\", \"author\", genres, 123123);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" Book testBook2 \u003d new Book(\"title3\", \"123123\", \"author\", genresAdventure, 123123);","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" Book testBook3 \u003d new Book(\"title3\", \"123123\", \"author\", genresNull, 123123);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" testResourceList.add(test1);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook);","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook2);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook3);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" return testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":32,"yingx9":20}}] +[{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":" mainClass.set(\"seedu.duke.Duke\")","lastModifiedDate":"2023-08-05"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":" archiveBaseName.set(\"duke\")","lastModifiedDate":"2023-09-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"-":46,"yingx9":1}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"|-------------------------------------------------------------------------|:-------------:|:-----------------------------------------:|:--------------------------------:|","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"| ![yingxia_portfolio.jpg](team/pictures/yingxia_portfolio.jpg) | Loke Ying Xia | [Github](https://github.com/yingx9) | [Portfolio](team/YingXia.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"| ![benjaminng_portfolio.jpeg](team/pictures/benjaminng_portfolio.jpeg) | Benjamin Ng | [Github](https://github.com/bnjm2000) | [Portfolio](team/BenjaminNg.md) |","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"| ![joanneang_portfolio.jpg](team/pictures/joanneang_portfolio.jpg) | Joanne Ang | [Github](https://github.com/JoanneJo) | [Portfolio](team/JoanneAng.md) |","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"| ![ashokbalaji_portfolio.jpg](./team/pictures/ashokbalaji_portfolio.jpg) | Ashok Balaji | [Github](https://github.com/000verflow) | [Portfolio](team/ashokbalaji.md) |","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Wu Xingyu | [Github](https://github.com/DavinciDelta) | [Portfolio](team/WuXingyu.md) |","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"bnjm2000":3,"JoanneJo":2,"-":1,"yingx9":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"## Setting Up \u0026 Getting Started","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"1. Fork the repo at https://github.com/AY2324S1-CS2113T-W11-1/tp.","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"2. Clone the fork into your computer.","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"## Design \u0026 Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"### Architecture","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"\u003cimg src\u003d\"images/ArchitectureDiagram.png\" /\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"**Main components of SysLib Architecture**","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"SysLib currently consists of four main components:","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"- `UI`: User Interaction","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"- `Parser`: Parsing User Response ","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"- `Command`: Command Executor","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"- `Data`: Holds the data of SysLib","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"### UI Component","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"### Parser Component","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":"### Command Component","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"### Data Component","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":"## Implementation ","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":"This section provides details on how certain features are implemented. ","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"### Find Resource Feature","lastModifiedDate":"2023-10-27"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":"The `find` command allows users to search for resources based on specified filters such as author (`/a`), ISBN (`/i`), ID (`/id`), and title (`/t`). The results will show all resources that match any of the given filters.","lastModifiedDate":"2023-10-27"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":"`find` has the following options:","lastModifiedDate":"2023-10-27"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":"- `find /id [ID]`","lastModifiedDate":"2023-10-27"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":"- `find /t [TITLE]`","lastModifiedDate":"2023-10-27"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":"- `find /a [AUTHOR]`","lastModifiedDate":"2023-10-27"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":"- `find /i [ISBN]`","lastModifiedDate":"2023-10-27"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"Multiple filters can also be combined:","lastModifiedDate":"2023-10-27"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":"- `find /t [TITLE] /a [AUTHOR]`","lastModifiedDate":"2023-10-27"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":"#### Implementation","lastModifiedDate":"2023-10-27"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":"Upon receiving the `find` command, the system will:","lastModifiedDate":"2023-10-27"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"1. Parse the filters and their associated values.","lastModifiedDate":"2023-10-27"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":"2. Filter the resources based on the given filters.","lastModifiedDate":"2023-10-27"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":"3. Display the matching resources.","lastModifiedDate":"2023-10-27"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":"#### Example Usage Scenario","lastModifiedDate":"2023-10-27"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":"**Step 1.** The user inputs the command: `find /a \"F. Scott Fitzgerald\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"**Step 2.** The `UI` component forwards the input to `SYSLIB`, which then sends it to the `PARSER`.","lastModifiedDate":"2023-10-27"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":"**Step 3.** The `PARSER` processes the command, extracts the `author` filter, and retrieves all resources written by \"F. Scott Fitzgerald\".","lastModifiedDate":"2023-10-27"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":"**Step 4.** The matching resources are displayed to the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":"#### Sequence Diagram","lastModifiedDate":"2023-10-27"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":"A sequence diagram could be provided here to visually show how the `find` function works.","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":"(Note: You would include the actual sequence diagram image, similar to the diagrams shown for other features.)","lastModifiedDate":"2023-10-27"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":"### Examples for Testing","lastModifiedDate":"2023-10-27"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":"1. **Find by Author**","lastModifiedDate":"2023-10-27"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":" - Test case: `find /a \"F. Scott Fitzgerald\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":" Expected: All resources written by F. Scott Fitzgerald are displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":87,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":"2. **Find by ISBN**","lastModifiedDate":"2023-10-27"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" - Test case: `find /i \"9780061120084\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" Expected: The resource with ISBN \"9780061120084\" is displayed, which should be \"To Kill a Mockingbird\" by Harper Lee.","lastModifiedDate":"2023-10-27"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":93,"author":{"gitId":"000verflow"},"content":"3. **Find by ID**","lastModifiedDate":"2023-10-27"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" - Test case: `find /id 2`","lastModifiedDate":"2023-10-27"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":96,"author":{"gitId":"000verflow"},"content":" Expected: The resource with ID \"2\" is displayed, which should be \"To Kill a Mockingbird\" by Harper Lee.","lastModifiedDate":"2023-10-27"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":"4. **Find by Title**","lastModifiedDate":"2023-10-27"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" - Test case: `find /t \"The Great Gatsby\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" Expected: The resource titled \"The Great Gatsby\" is displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":"5. **Combining Filters**","lastModifiedDate":"2023-10-27"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" - Test case: `find /a \"F. Scott Fitzgerald\" /t \"The Great Gatsby\"`","lastModifiedDate":"2023-10-27"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" Expected: Only the resource that matches both the title \"The Great Gatsby\" and the author \"F. Scott Fitzgerald\" is displayed.","lastModifiedDate":"2023-10-27"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":109,"author":{"gitId":"JoanneJo"},"content":"### Add Resource Feature","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"JoanneJo"},"content":"The `add` feature is responsible for processing user commands to add a new book to SysLib. It is facilitated by ","lastModifiedDate":"2023-10-26"},{"lineNumber":112,"author":{"gitId":"JoanneJo"},"content":"the `AddCommand` component. It works with `Parser` and `Command` components to parse and validate the user input. ","lastModifiedDate":"2023-10-26"},{"lineNumber":113,"author":{"gitId":"JoanneJo"},"content":"The new book is stored internally in `resourceList` as a `Book`. ","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"JoanneJo"},"content":"`add` has six options:","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"JoanneJo"},"content":"- add /id [id] /t [title] /a [author] /tag [tag] /i [isbn]","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"JoanneJo"},"content":"- add /id [id] /t [title] /a [author] /tag [tag] /i [isbn] _/g [genre]_","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"JoanneJo"},"content":"#### Implementation","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"JoanneJo"},"content":"It implements the following operations:","lastModifiedDate":"2023-10-26"},{"lineNumber":122,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#parseArgument(statement: String)` -- Parses the input command to extract relevant information.","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#validate(statement: String, values: String[])` -- Validates the input statement to ensure that it is valid.","lastModifiedDate":"2023-10-26"},{"lineNumber":125,"author":{"gitId":"JoanneJo"},"content":"- `ADDCOMMAND#createBook(values: String[])` -- Creates a new book based on the parsed and validated values.","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"JoanneJo"},"content":"#### Example Usage Scenario","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":129,"author":{"gitId":"JoanneJo"},"content":"Step 1. The user inputs the command: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":131,"author":{"gitId":"JoanneJo"},"content":"Step 2. The `UI` component forwards the input to `SYSLIB`, which in turn passes it to the `PARSER`.","lastModifiedDate":"2023-10-26"},{"lineNumber":132,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":133,"author":{"gitId":"JoanneJo"},"content":"Step 3. The `PARSER` processes the command and determines that it contains a valid key (`add`). It then calls ","lastModifiedDate":"2023-10-26"},{"lineNumber":134,"author":{"gitId":"JoanneJo"},"content":"`ADDCOMMAND#execute(statement: String, this: Parser)` with the input command.","lastModifiedDate":"2023-10-26"},{"lineNumber":135,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":136,"author":{"gitId":"JoanneJo"},"content":"Step 4. The `ADDCOMMMAND` component receives the command and performs the following operations:","lastModifiedDate":"2023-10-26"},{"lineNumber":137,"author":{"gitId":"JoanneJo"},"content":"- Calls `ADDCOMMAND#parseArgument(statement: String)` to extract values for ID, title, author, ISBN, tag, and genres.","lastModifiedDate":"2023-10-26"},{"lineNumber":138,"author":{"gitId":"JoanneJo"},"content":"- Calls `ADDCOMMAND#validate(statement: String, values: String[])` to ensure the validity of the input command.","lastModifiedDate":"2023-10-26"},{"lineNumber":139,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":140,"author":{"gitId":"JoanneJo"},"content":"Step 5. The `COMMAND` component processes the input command to ensure that it meets the required format and constraints.","lastModifiedDate":"2023-10-26"},{"lineNumber":141,"author":{"gitId":"JoanneJo"},"content":"It prepares the argument values for further processing.","lastModifiedDate":"2023-10-26"},{"lineNumber":142,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":143,"author":{"gitId":"JoanneJo"},"content":"Step 6. Since the `tag` argument in the input command indicates that it is a book, the `ADDCOMMAND` determines that the","lastModifiedDate":"2023-10-26"},{"lineNumber":144,"author":{"gitId":"JoanneJo"},"content":"key is equal to `b` (ignoring case). It then creates a new `Book` object using the parsed values (title, ISBN, author, ","lastModifiedDate":"2023-10-26"},{"lineNumber":145,"author":{"gitId":"JoanneJo"},"content":"genres, ID).","lastModifiedDate":"2023-10-26"},{"lineNumber":146,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":147,"author":{"gitId":"JoanneJo"},"content":"Step 7. The newly created book is forwarded to the `PARSER` to be added to the `resourceList`.","lastModifiedDate":"2023-10-26"},{"lineNumber":148,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":149,"author":{"gitId":"JoanneJo"},"content":"#### Sequence Diagram","lastModifiedDate":"2023-10-26"},{"lineNumber":150,"author":{"gitId":"JoanneJo"},"content":"The following sequence diagram shows how the add function works:","lastModifiedDate":"2023-10-26"},{"lineNumber":151,"author":{"gitId":"JoanneJo"},"content":"\u003cimg src\u003d\"images/AddSequenceDiagram.png\"/\u003e","lastModifiedDate":"2023-10-26"},{"lineNumber":152,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":153,"author":{"gitId":"yingx9"},"content":"### Listing Resources Feature","lastModifiedDate":"2023-10-25"},{"lineNumber":154,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":155,"author":{"gitId":"yingx9"},"content":"The `list` command works with the `Parser` and `Command` component to execute the correct action. ","lastModifiedDate":"2023-10-25"},{"lineNumber":156,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":157,"author":{"gitId":"yingx9"},"content":"`list` has four options:","lastModifiedDate":"2023-10-25"},{"lineNumber":158,"author":{"gitId":"yingx9"},"content":"- list","lastModifiedDate":"2023-10-25"},{"lineNumber":159,"author":{"gitId":"yingx9"},"content":"- list _/tag [tag]_","lastModifiedDate":"2023-10-25"},{"lineNumber":160,"author":{"gitId":"yingx9"},"content":"- list _/g [genre]_","lastModifiedDate":"2023-10-25"},{"lineNumber":161,"author":{"gitId":"yingx9"},"content":"- list _/tag [tag]_ _/g [genre]_","lastModifiedDate":"2023-10-25"},{"lineNumber":162,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":163,"author":{"gitId":"yingx9"},"content":"When `list` is specified with both `tag` and `genre` filters, it is `AND` inclusive, listing only ","lastModifiedDate":"2023-10-25"},{"lineNumber":164,"author":{"gitId":"yingx9"},"content":"Resources with the same tag and genre. ","lastModifiedDate":"2023-10-25"},{"lineNumber":165,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":166,"author":{"gitId":"yingx9"},"content":"Sequence Diagram:","lastModifiedDate":"2023-10-25"},{"lineNumber":167,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":168,"author":{"gitId":"yingx9"},"content":"\u003cimg src\u003d\"images/ListSequenceDiagram.png\" /\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":169,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":170,"author":{"gitId":"yingx9"},"content":"When a user enters `list /tag B`, the Parser retrieves the parameters from the input and","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"yingx9"},"content":"calls the `execute` function of ListCommand.","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"yingx9"},"content":"ListCommand then calls `parseArg` and `validate` from `Command`, which checks if the parameters are valid. If it passes","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"yingx9"},"content":"the checks, `filterResources` is called to begin the filtering process. First it calls `hasFilters()` check if the user ","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"yingx9"},"content":"selected any filters `[tag/genre/both]` or none. ","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"yingx9"},"content":"If hasFilters returns `true`, it filters the `resourceList` with the given keywords and display the details ","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"yingx9"},"content":"of the resources.","lastModifiedDate":"2023-10-26"},{"lineNumber":179,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":180,"author":{"gitId":"yingx9"},"content":"If hasFilters returns `false`, it skips the filtering process and displays the details of all the resources.","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":182,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":183,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":184,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":186,"author":{"gitId":"DavinciDelta"},"content":"All librarians, not just system librarian!","lastModifiedDate":"2023-10-24"},{"lineNumber":187,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":188,"author":{"gitId":"JoanneJo"},"content":"- Needs to manage inventory with significant number of resources e.g. books","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"JoanneJo"},"content":"- Is a fast typist","lastModifiedDate":"2023-10-26"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":191,"author":{"gitId":"JoanneJo"},"content":"### Value Proposition","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":193,"author":{"gitId":"DavinciDelta"},"content":"To provide a platform to help librarians to quickly find the information they need to assist patrons.","lastModifiedDate":"2023-10-24"},{"lineNumber":194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":"| Version | As a ... | I want to ... | So that I can ... |","lastModifiedDate":"2020-05-24"},{"lineNumber":198,"author":{"gitId":"bnjm2000"},"content":"|---------|-----------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-26"},{"lineNumber":199,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | view a list of books that the library has | have an overview of all the books |","lastModifiedDate":"2023-10-24"},{"lineNumber":200,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | add new books to our inventory by entering their title, author, ISBN, and publication year | keep our collection up-to-date |","lastModifiedDate":"2023-10-24"},{"lineNumber":201,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | delete books from the database | let the patrons know our library no longer carries it |","lastModifiedDate":"2023-10-24"},{"lineNumber":202,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | tag a book as physical medium like newspapers, audio cds, books or online like eJournals | patrons can know what type are available |","lastModifiedDate":"2023-10-24"},{"lineNumber":203,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | have a help function | know the commands of this programme |","lastModifiedDate":"2023-10-24"},{"lineNumber":204,"author":{"gitId":"DavinciDelta"},"content":"| v1.0 | librarian | quickly find out how many books we have of a particular author and the names of the books | know how many books are related to the author |","lastModifiedDate":"2023-10-24"},{"lineNumber":205,"author":{"gitId":"bnjm2000"},"content":"| v2.0 | librarian | import/export our library\u0027s inventory data to a file format | easily share with other libraries to be used for backup and archival purposes. |","lastModifiedDate":"2023-10-26"},{"lineNumber":206,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | find a to-do item by name | locate a to-do without having to go through the entire list |","lastModifiedDate":"2023-10-27"},{"lineNumber":207,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | get the status of an item | know if it is available |","lastModifiedDate":"2023-10-27"},{"lineNumber":208,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | update the details of a resource | fix any mistakes and maintain consistency |","lastModifiedDate":"2023-10-27"},{"lineNumber":209,"author":{"gitId":"000verflow"},"content":"| v2.0 | librarian | add in different types of resources | differentiate between resources such as magazines, cds... |","lastModifiedDate":"2023-10-27"},{"lineNumber":210,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":211,"author":{"gitId":"JoanneJo"},"content":"## Use Cases","lastModifiedDate":"2023-10-26"},{"lineNumber":212,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":213,"author":{"gitId":"JoanneJo"},"content":"(For all use cases below, the System is the SysLib and the Actor is the user, unless specified otherwise)","lastModifiedDate":"2023-10-26"},{"lineNumber":214,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":215,"author":{"gitId":"JoanneJo"},"content":"### Use case: Add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":216,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":217,"author":{"gitId":"JoanneJo"},"content":"#### MSS","lastModifiedDate":"2023-10-26"},{"lineNumber":218,"author":{"gitId":"JoanneJo"},"content":"1. User requests to add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":219,"author":{"gitId":"JoanneJo"},"content":"2. AddressBook adds the book","lastModifiedDate":"2023-10-26"},{"lineNumber":220,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":221,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":222,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":223,"author":{"gitId":"JoanneJo"},"content":"#### Extensions","lastModifiedDate":"2023-10-26"},{"lineNumber":224,"author":{"gitId":"JoanneJo"},"content":"- 1a. The given ID is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":225,"author":{"gitId":"JoanneJo"},"content":" - 1a1. SysLib shows an error message.","lastModifiedDate":"2023-10-26"},{"lineNumber":226,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":227,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":228,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":229,"author":{"gitId":"JoanneJo"},"content":"- 1b. Insufficient data given.","lastModifiedDate":"2023-10-26"},{"lineNumber":230,"author":{"gitId":"JoanneJo"},"content":" - 1b1. SysLib shows an error message.","lastModifiedDate":"2023-10-26"},{"lineNumber":231,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":232,"author":{"gitId":"JoanneJo"},"content":" Use case ends.","lastModifiedDate":"2023-10-26"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":234,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":236,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":238,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":239,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":240,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":242,"author":{"gitId":"JoanneJo"},"content":"## Instructions for Manual Testing","lastModifiedDate":"2023-10-26"},{"lineNumber":243,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":244,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":245,"author":{"gitId":"bnjm2000"},"content":"help","lastModifiedDate":"2023-10-26"},{"lineNumber":246,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":247,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":248,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":249,"author":{"gitId":"bnjm2000"},"content":"Commands available:","lastModifiedDate":"2023-10-26"},{"lineNumber":250,"author":{"gitId":"bnjm2000"},"content":"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE])","lastModifiedDate":"2023-10-26"},{"lineNumber":251,"author":{"gitId":"bnjm2000"},"content":"delete: deletes the resource with the specified ID from the library inventory. (e.g. delete /id 123456789)","lastModifiedDate":"2023-10-26"},{"lineNumber":252,"author":{"gitId":"bnjm2000"},"content":"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction","lastModifiedDate":"2023-10-26"},{"lineNumber":253,"author":{"gitId":"bnjm2000"},"content":"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)","lastModifiedDate":"2023-10-26"},{"lineNumber":254,"author":{"gitId":"bnjm2000"},"content":"exit: displays a farewell message and exits the program (e.g. exit)","lastModifiedDate":"2023-10-26"},{"lineNumber":255,"author":{"gitId":"bnjm2000"},"content":"For more information, please refer to our user guide at:https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html","lastModifiedDate":"2023-10-26"},{"lineNumber":256,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":257,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":258,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":259,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":260,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":261,"author":{"gitId":"bnjm2000"},"content":"add /id 1 /t The Great Gatsby /a F. Scott Fitzgerald /tag B /i 9780023381201 /g Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":262,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":263,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":264,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":265,"author":{"gitId":"bnjm2000"},"content":"This book is added: The Great Gatsby","lastModifiedDate":"2023-10-26"},{"lineNumber":266,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":267,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":268,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":269,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":270,"author":{"gitId":"bnjm2000"},"content":"add /id 2 /t To Kill a Mockingbird /a Harper Lee /tag B /i 9780061120084 /g Novel, Bildungsroman, Southern Gothic, Domestic Fiction, Thriller, Legal Story","lastModifiedDate":"2023-10-26"},{"lineNumber":271,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":272,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":273,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":274,"author":{"gitId":"bnjm2000"},"content":"This book is added: To Kill a Mockingbird","lastModifiedDate":"2023-10-26"},{"lineNumber":275,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":276,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":277,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":278,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":279,"author":{"gitId":"bnjm2000"},"content":"list","lastModifiedDate":"2023-10-26"},{"lineNumber":280,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":281,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":282,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":283,"author":{"gitId":"bnjm2000"},"content":"Listing all resources in the Library:","lastModifiedDate":"2023-10-26"},{"lineNumber":284,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":285,"author":{"gitId":"bnjm2000"},"content":"1. [B] ID: 1 Title: The Great Gatsby ISBN: 9780023381201 Author: F. Scott Fitzgerald Genre: Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":286,"author":{"gitId":"bnjm2000"},"content":"2. [B] ID: 2 Title: To Kill a Mockingbird ISBN: 9780061120084 Author: Harper Lee Genre: Novel, Bildungsroman, Southern Gothic,","lastModifiedDate":"2023-10-26"},{"lineNumber":287,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":288,"author":{"gitId":"bnjm2000"},"content":"There are currently 2 resource(s).","lastModifiedDate":"2023-10-26"},{"lineNumber":289,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":290,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":291,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":292,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":293,"author":{"gitId":"bnjm2000"},"content":"delete /id 1","lastModifiedDate":"2023-10-26"},{"lineNumber":294,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":295,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":296,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":297,"author":{"gitId":"bnjm2000"},"content":"Looking for ID: 1...","lastModifiedDate":"2023-10-26"},{"lineNumber":298,"author":{"gitId":"bnjm2000"},"content":"This resource is removed: ","lastModifiedDate":"2023-10-26"},{"lineNumber":299,"author":{"gitId":"bnjm2000"},"content":"[B] ID: 1 Title: The Great Gatsby ISBN: 9780023381201 Author: F. Scott Fitzgerald Genre: Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-26"},{"lineNumber":300,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":301,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":302,"author":{"gitId":"bnjm2000"},"content":"Example input:","lastModifiedDate":"2023-10-26"},{"lineNumber":303,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":304,"author":{"gitId":"bnjm2000"},"content":"exit","lastModifiedDate":"2023-10-26"},{"lineNumber":305,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":306,"author":{"gitId":"bnjm2000"},"content":"Example response:","lastModifiedDate":"2023-10-26"},{"lineNumber":307,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":308,"author":{"gitId":"bnjm2000"},"content":"Bye, hope to see you again soon!","lastModifiedDate":"2023-10-26"},{"lineNumber":309,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-26"},{"lineNumber":310,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-26"},{"lineNumber":311,"author":{"gitId":"JoanneJo"},"content":"### Launch and Shutdown","lastModifiedDate":"2023-10-26"},{"lineNumber":312,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":313,"author":{"gitId":"JoanneJo"},"content":"1. Initial launch","lastModifiedDate":"2023-10-26"},{"lineNumber":314,"author":{"gitId":"JoanneJo"},"content":" 1. Download the jar file and copy it into an empty folder.","lastModifiedDate":"2023-10-26"},{"lineNumber":315,"author":{"gitId":"JoanneJo"},"content":" 2. Open the command prompt and run `java -jar SysLib.jar`.","lastModifiedDate":"2023-10-26"},{"lineNumber":316,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":317,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":318,"author":{"gitId":"JoanneJo"},"content":"### Adding a Book","lastModifiedDate":"2023-10-26"},{"lineNumber":319,"author":{"gitId":"JoanneJo"},"content":"1. Add a book","lastModifiedDate":"2023-10-26"},{"lineNumber":320,"author":{"gitId":"JoanneJo"},"content":" 1. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B`","lastModifiedDate":"2023-10-26"},{"lineNumber":321,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":322,"author":{"gitId":"JoanneJo"},"content":" Expected: A book with ID: 0005, Title: Frankenstein, Author: Mary Shelley, and ISBN: FKS0001 is created and added ","lastModifiedDate":"2023-10-26"},{"lineNumber":323,"author":{"gitId":"JoanneJo"},"content":" into the list. A message is shown to acknowledge that the book has been added successfully.","lastModifiedDate":"2023-10-26"},{"lineNumber":324,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":325,"author":{"gitId":"JoanneJo"},"content":" 2. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":326,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":327,"author":{"gitId":"JoanneJo"},"content":" Expected: A book with ID: 0005, Title: Frankenstein, Author: Mary Shelley, ISBN: FKS0001, and ","lastModifiedDate":"2023-10-26"},{"lineNumber":328,"author":{"gitId":"JoanneJo"},"content":" Genres: Gothic, Fiction is created and added into the list. A message is shown to acknowledge that the book ","lastModifiedDate":"2023-10-26"},{"lineNumber":329,"author":{"gitId":"JoanneJo"},"content":" has been added successfully.","lastModifiedDate":"2023-10-26"},{"lineNumber":330,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":331,"author":{"gitId":"JoanneJo"},"content":" 3. Test case: `add /id abcd /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":332,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":333,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the id is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":334,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":335,"author":{"gitId":"JoanneJo"},"content":" 4. Test case: `add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag A /g Gothic, Fiction`","lastModifiedDate":"2023-10-26"},{"lineNumber":336,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":337,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the tag is invalid.","lastModifiedDate":"2023-10-26"},{"lineNumber":338,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":339,"author":{"gitId":"JoanneJo"},"content":" 5. Test case: `add /id 0005 /t Frankenstein`","lastModifiedDate":"2023-10-26"},{"lineNumber":340,"author":{"gitId":"JoanneJo"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":341,"author":{"gitId":"JoanneJo"},"content":" Expected: No book is added. An error message is shown to indicate that the input is incomplete.","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"000verflow":69,"bnjm2000":70,"JoanneJo":107,"DavinciDelta":8,"-":31,"yingx9":56}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"# Syslib","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"SysLib CLI is a robust command-line tool designed for system librarians to efficiently handle inventory, events, and patron assistance. With quick command-based actions, manage your library\u0027s resources and events seamlessly. Simplify administrative tasks, so you can focus on serving patrons better.","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":6,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"bnjm2000":3,"-":6}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"# Syslib User guide","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"SysLib is a program designed specially for system librarians to manage their work and responsibilities. Using intuitive commands, view, add, delete, and find books from the library inventory without any hassle. ","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"This user guide is for System Librarians to ensure optimal use of Syslib","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"## Contents","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"* [Quick start](#quick-start--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":"* [Features](#features--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":" * [Add a listing: `add`](#add-a-listing-add--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":" * [Delete a listing: `delete`](#delete-a-listing-delete--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" * [List items: `list`](#list-all-items-list--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" * [Find listing by search parameter: `find`](#find-specific-listings-find--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":" * [Exiting the program : `exit`](#exiting-the-program--exit--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" * [Get help: `help`](#viewing-help--help--return-to-contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"* [FAQ](#faq--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"* [Known Issues](#known-issues--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":16,"author":{"gitId":"000verflow"},"content":"* [Command summary](#command-summary--return-to-contents)","lastModifiedDate":"2023-10-06"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":"## Quick start | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":"1. Make sure that you have Java 11 or above installed on your computer.","lastModifiedDate":"2023-10-28"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" - Open terminal and type `java --version`","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" - [How do I check the version of my Java](https://www.java.com/en/download/help/version_manual.html)","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":"2. [Download the latest release](https://github.com/AY2324S1-CS2113T-W11-1/tp/releases/tag/v1.0) of `Syslib.jar`","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"3. Copy the `Syslib.jar` file into a folder on its own.","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":"4. Open a command terminal, type `cd \u003cFILE_DIRECTORY\u003e`, where \u003cFILE_DIRECTORY\u003e refers to the directory to the `Syslib.jar` file.","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":"5. Run the following command: `java -jar Syslib.jar`. You should see the following welcome screen.","lastModifiedDate":"2023-10-28"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" ____ _ _ _ ____ _ ___ ","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":"/ ___| _ _ ___| | (_) |__ / ___| | |_ _|","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":"\\___ \\| | | / __| | | | \u0027_ \\ | | | | | | ","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" ___) | |_| \\__ \\ |___| | |_) | | |___| |___ | | ","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"|____/ \\__, |___/_____|_|_.__/ \\____|_____|___|","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" |___/ ","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":"What would you like to do?","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":"## Features | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":"\u003e Note:","lastModifiedDate":"2023-10-06"},{"lineNumber":43,"author":{"gitId":"000verflow"},"content":"\u003e - Items in square brackets `[]` are optional arguments.","lastModifiedDate":"2023-10-06"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"\u003e - Items with `...` after them can be used multiple times","lastModifiedDate":"2023-10-06"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":" \u003e * e.g `[/g GENRE]` ... can be used as `/g Horror /g Fantasy`","lastModifiedDate":"2023-10-06"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"bnjm2000"},"content":"## Add a listing: `add` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":"Adds a new resource to the library inventory.","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":"#### Types of tags:","lastModifiedDate":"2023-10-06"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":"`[B]` - Books","lastModifiedDate":"2023-10-06"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":"`[CD]` - CDs","lastModifiedDate":"2023-10-06"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"`[N]` - Newspapers","lastModifiedDate":"2023-10-06"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":"`[M]` - Magazines","lastModifiedDate":"2023-10-06"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"\u003e Note:","lastModifiedDate":"2023-10-06"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":"\u003e - Anything with `e` prior is an electronic version ","lastModifiedDate":"2023-10-06"},{"lineNumber":59,"author":{"gitId":"bnjm2000"},"content":"\u003e\u003e i.e. `[eB]` is an eBook, `[eM]` is an eMagazine","lastModifiedDate":"2023-10-28"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"JoanneJo"},"content":"#### Notes about genre:","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"bnjm2000"},"content":"Multiple genres are allowed for a single resource. You can separate the different genres using comma followed by a space `, `.","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":64,"author":{"gitId":"JoanneJo"},"content":"Format: `add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]...`","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":66,"author":{"gitId":"bnjm2000"},"content":"**Example input:**","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":68,"author":{"gitId":"JoanneJo"},"content":"add /id 123456789 /t Moby Dick /a Herman Melville /tag B /i 9780763630188 /g Adventure, Fiction","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"JoanneJo"},"content":"add /id 123456789 /t Harry Squatter /a J.K. /tag M /i 9780763630187 /g History","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":71,"author":{"gitId":"bnjm2000"},"content":"**Example response:**","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"bnjm2000"},"content":"This book is added: Moby Dick","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":77,"author":{"gitId":"bnjm2000"},"content":"## Delete a listing: `delete` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":79,"author":{"gitId":"bnjm2000"},"content":"Deletes the resource with the specified ID from the library inventory. You can find the ID using the `list` command.","lastModifiedDate":"2023-10-28"},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":"Format: `delete /id ID`","lastModifiedDate":"2023-10-06"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":83,"author":{"gitId":"bnjm2000"},"content":"**Example input:**","lastModifiedDate":"2023-10-28"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":"delete /id 123456789","lastModifiedDate":"2023-10-06"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":87,"author":{"gitId":"bnjm2000"},"content":"**Example input:**","lastModifiedDate":"2023-10-28"},{"lineNumber":88,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":89,"author":{"gitId":"bnjm2000"},"content":"Looking for ID: 123456789...","lastModifiedDate":"2023-10-28"},{"lineNumber":90,"author":{"gitId":"bnjm2000"},"content":"This resource is removed: ","lastModifiedDate":"2023-10-28"},{"lineNumber":91,"author":{"gitId":"bnjm2000"},"content":"[B] ID: 123456789 Title: Moby Dick ISBN: 9780763630188 Author: Herman Melville Genre: Adventure, Fiction","lastModifiedDate":"2023-10-28"},{"lineNumber":92,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":93,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":95,"author":{"gitId":"bnjm2000"},"content":"## List all items: `list` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"bnjm2000"},"content":"List all resources OR filter by certain tags or genre.","lastModifiedDate":"2023-10-28"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":98,"author":{"gitId":"yingx9"},"content":"Format: `list [/tag TAG /g GENRE ]`","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"yingx9"},"content":"- Including both filters `tag` and `genre` will only list resources satisfying both criteria:","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"yingx9"},"content":" - `list /tag B /g Horror` will list Books with Horror genre. ","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":102,"author":{"gitId":"bnjm2000"},"content":"**Example input:**","lastModifiedDate":"2023-10-28"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":"list","lastModifiedDate":"2023-10-06"},{"lineNumber":105,"author":{"gitId":"yingx9"},"content":"list /tag B","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"yingx9"},"content":"list /tag B /g Fiction","lastModifiedDate":"2023-10-16"},{"lineNumber":107,"author":{"gitId":"JoanneJo"},"content":"list /g Thrill","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":110,"author":{"gitId":"bnjm2000"},"content":"**Example output:**","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":112,"author":{"gitId":"bnjm2000"},"content":"Listing all resources in the Library:","lastModifiedDate":"2023-10-28"},{"lineNumber":113,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":114,"author":{"gitId":"bnjm2000"},"content":"1. [B] ID: 1 Title: Moby Dick ISBN: 9780763630188 Author: Herman Melville Genre: Adventure, Fiction","lastModifiedDate":"2023-10-28"},{"lineNumber":115,"author":{"gitId":"bnjm2000"},"content":"2. [M] ID: 2 Title: Harry Squatter ISBN: 9780763630187 Author: J.K. Genre: History","lastModifiedDate":"2023-10-28"},{"lineNumber":116,"author":{"gitId":"bnjm2000"},"content":"3. [B] ID: 3 Title: Frankenstein ISBN: FKS0001 Author: Mary Shelley Genre: -","lastModifiedDate":"2023-10-28"},{"lineNumber":117,"author":{"gitId":"bnjm2000"},"content":"4. [B] ID: 4 Title: The Great Gatsby ISBN: 9780023381201 Author: F. Scott Fitzgerald Genre: Novel, Fiction, Tragedy","lastModifiedDate":"2023-10-28"},{"lineNumber":118,"author":{"gitId":"bnjm2000"},"content":"5. [B] ID: 5 Title: To Kill a Mockingbird ISBN: 9780061120084 Author: Harper Lee Genre: Novel, Bildungsroman, Southern Gothic, Domestic Fiction, Thriller, Legal Story","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"bnjm2000"},"content":"There are currently 5 resource(s).","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"bnjm2000"},"content":"## Find specific listings: `find` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"yingx9"},"content":"Find a resource by title, author, ISBN or given id.","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":127,"author":{"gitId":"JoanneJo"},"content":"Format: `find [/t TITLE OR /i ISBN OR /a AUTHOR OR /id ID]`","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":129,"author":{"gitId":"bnjm2000"},"content":"**Example input:**","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":131,"author":{"gitId":"JoanneJo"},"content":"find /t Moby Dick","lastModifiedDate":"2023-10-15"},{"lineNumber":132,"author":{"gitId":"JoanneJo"},"content":"find /i 9780763630188","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"000verflow"},"content":"find /a J. K. Rowling","lastModifiedDate":"2023-10-06"},{"lineNumber":134,"author":{"gitId":"000verflow"},"content":"find /id 123456789","lastModifiedDate":"2023-10-06"},{"lineNumber":135,"author":{"gitId":"000verflow"},"content":"```","lastModifiedDate":"2023-10-06"},{"lineNumber":136,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":137,"author":{"gitId":"bnjm2000"},"content":"**Example output:**","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"bnjm2000"},"content":"Here are resources that matched the given filters:","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"bnjm2000"},"content":"[B] ID: 123456789 Title: Moby Dick ISBN: 9780763630188 Author: Herman Melville Genre: Adventure, Fiction","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"bnjm2000"},"content":"## Exiting the program : `exit` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"bnjm2000"},"content":"Displays a farewell message and exits the program.","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":147,"author":{"gitId":"000verflow"},"content":"Format: `exit`","lastModifiedDate":"2023-10-06"},{"lineNumber":148,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":149,"author":{"gitId":"bnjm2000"},"content":"**Example**","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"bnjm2000"},"content":"Bye, hope to see you again soon!","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"bnjm2000"},"content":"## Viewing help : `help` | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"bnjm2000"},"content":"Displays a list of available commands with examples and their syntax format.","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"bnjm2000"},"content":"Format: `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"bnjm2000"},"content":"Example:","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"bnjm2000"},"content":"Commands available:","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"bnjm2000"},"content":"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE])","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"bnjm2000"},"content":"delete: deletes the resource with the specified ID from the library inventory. (e.g. delete /id 123456789)","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"bnjm2000"},"content":"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"bnjm2000"},"content":"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"bnjm2000"},"content":"exit: displays a farewell message and exits the program (e.g. exit)","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"bnjm2000"},"content":"For more information, please refer to our user guide at:https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"bnjm2000"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"bnjm2000"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":171,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":172,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":173,"author":{"gitId":"bnjm2000"},"content":"## FAQ | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":174,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":175,"author":{"gitId":"000verflow"},"content":"...","lastModifiedDate":"2023-10-06"},{"lineNumber":176,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":177,"author":{"gitId":"bnjm2000"},"content":"## Known Issues | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":178,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":179,"author":{"gitId":"000verflow"},"content":"...","lastModifiedDate":"2023-10-06"},{"lineNumber":180,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":181,"author":{"gitId":"bnjm2000"},"content":"## Command summary | [Return to contents](#contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":183,"author":{"gitId":"000verflow"},"content":"| Action | Command |","lastModifiedDate":"2023-10-06"},{"lineNumber":184,"author":{"gitId":"JoanneJo"},"content":"|-----------------------|------------------------------------------------------------------------------------------------------------|","lastModifiedDate":"2023-10-15"},{"lineNumber":185,"author":{"gitId":"JoanneJo"},"content":"| Add listing | `add /t \u003ctitle of listing\u003e /a \u003cauthor of item\u003e /tag \u003ctype of item\u003e /i \u003cISBN of item\u003e [/g \u003cgenre of item\u003e]` |","lastModifiedDate":"2023-10-15"},{"lineNumber":186,"author":{"gitId":"000verflow"},"content":"| Delete listing | `delete /id \u003cid of listing\u003e` |","lastModifiedDate":"2023-10-06"},{"lineNumber":187,"author":{"gitId":"yingx9"},"content":"| Listing all items | `list [/tag \u003ctype of item\u003e /g \u003cgenre of book\u003e]` |","lastModifiedDate":"2023-10-16"},{"lineNumber":188,"author":{"gitId":"JoanneJo"},"content":"| Find specific listing | `find [/t \u003ctitle of listing\u003e OR /i \u003cISBN of item\u003e OR /a AUTHOR OR /id ID]` |","lastModifiedDate":"2023-10-15"},{"lineNumber":189,"author":{"gitId":"000verflow"},"content":"| Exit | `exit` |","lastModifiedDate":"2023-10-06"},{"lineNumber":190,"author":{"gitId":"000verflow"},"content":"| View help | `help` |","lastModifiedDate":"2023-10-06"},{"lineNumber":191,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"000verflow":58,"bnjm2000":98,"JoanneJo":11,"-":16,"yingx9":8}},{"path":"docs/diagram/AddSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"@startuml","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"!include Style.puml","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"participant \":SysLib\" as SYSLIB SYSLIB_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"participant \":UI\" as UI UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"actor User as USER USER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"participant \":Parser\" as PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"box Command","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"participant \":AddCommand\" as ADDCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"participant \":Command\" as COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"end box","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":"SYSLIB -[SYSLIB_COLOR]\u003e UI : readCommand()","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":"activate SYSLIB SYSLIB_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":"activate UI UI_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":"USER -[USER_COLOR]\u003e UI : \"add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\"","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":"UI --[UI_COLOR]\u003e SYSLIB : input: String","lastModifiedDate":"2023-10-26"},{"lineNumber":22,"author":{"gitId":"JoanneJo"},"content":"deactivate UI","lastModifiedDate":"2023-10-26"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":"SYSLIB -[SYSLIB_COLOR]\u003e PARSER : process(\"add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":"activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":27,"author":{"gitId":"JoanneJo"},"content":"alt containsKey","lastModifiedDate":"2023-10-26"},{"lineNumber":28,"author":{"gitId":"JoanneJo"},"content":" PARSER-[PARSER_COLOR]\u003e PARSER: removeFirstWord(add /id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction)","lastModifiedDate":"2023-10-26"},{"lineNumber":29,"author":{"gitId":"JoanneJo"},"content":" activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e PARSER : \"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\": String","lastModifiedDate":"2023-10-26"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" deactivate PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" PARSER -[PARSER_COLOR]\u003e ADDCOMMAND : execute(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" activate ADDCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":"else noKey","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e SYSLIB","lastModifiedDate":"2023-10-26"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":"end","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"JoanneJo"},"content":"ADDCOMMAND -[COMMAND_COLOR]\u003e COMMAND : parseArgument(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\")","lastModifiedDate":"2023-10-26"},{"lineNumber":40,"author":{"gitId":"JoanneJo"},"content":"activate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":"COMMAND --[COMMAND_COLOR]\u003e ADDCOMMAND : values: String[]","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":"ADDCOMMAND -[COMMAND_COLOR]\u003e COMMAND : validate(\"/id 0005 /t Frankenstein /a Mary Shelley /i FKS0001 /tag B /g Gothic, Fiction\", values)","lastModifiedDate":"2023-10-26"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"COMMAND --[COMMAND_COLOR]\u003e ADDCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":"deactivate COMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":"alt equalsIgnoreCase(\"b\")","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND -[COMMAND_COLOR]\u003e PARSER : createBook(values)","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" PARSER --[PARSER_COLOR]\u003e ADDCOMMAND : new Book (title, isbn, author, genres, id)","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":"else notEqualsIgnoreCase(\"b\")","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":" ADDCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"JoanneJo"},"content":" deactivate ADDCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":54,"author":{"gitId":"JoanneJo"},"content":"end","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":"PARSER --[PARSER_COLOR]\u003e SYSLIB","lastModifiedDate":"2023-10-26"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":"deactivate PARSER","lastModifiedDate":"2023-10-26"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":"@enduml","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"JoanneJo":59}},{"path":"docs/diagram/Architecture.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"@startuml","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/globe_internet\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/documents\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Users/user\u003e","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"!include style.puml","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"Package \" \"\u003c\u003cRectangle\u003e\u003e{","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":" Class UI UI_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":" Class Parser PARSER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":" Class Command COMMAND_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":" Class Data DATA_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":" Class Main #grey","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"Class \"\u003c$user\u003e\" as User STORAGE_COLOR_T2","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"UI -[#green]\u003e Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"Main -[#grey]-\u003e UI","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"Main -[#grey]-\u003e Parser","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"Parser -[#grey]-\u003e Command","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"Parser -[#blue]-\u003e Data","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"User ..\u003e UI","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"@enduml","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"yingx9":25}},{"path":"docs/diagram/ListSequenceDiagram.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"@startuml","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"!include Style.puml","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/globe_internet\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Concepts/documents\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"!include \u003coffice/Users/user\u003e","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"skinparam ArrowFontStyle plain","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"participant \":Main\" as MAIN #grey","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"participant \":UI\" as UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"Actor User as user USER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"participant \":Parser\" as PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"box Command","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"participant \":ListCommand\" as LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"participant \":Command\" as COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"end box","lastModifiedDate":"2023-10-25"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"MAIN -[#grey]\u003e UI : readcommand()","lastModifiedDate":"2023-10-25"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"activate MAIN #grey","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"activate UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"user -[USER_COLOR]\u003e UI : \"list /tag B\"","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"UI --[UI_COLOR]\u003e MAIN : \"list /tag B\"","lastModifiedDate":"2023-10-26"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"deactivate UI UI_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"MAIN -[#grey]\u003e PARSER : process(\"list /tag B\")","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"alt containsKey","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" PARSER -[PARSER_COLOR]\u003e PARSER: removeFirstWord(\"list /tag B\")","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" activate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" PARSER --[PARSER_COLOR]\u003e PARSER : \"/tag B\"","lastModifiedDate":"2023-10-26"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" deactivate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" PARSER -[PARSER_COLOR]\u003e LISTCOMMAND: execute(\"/tag B\")","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":"else noKey","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" PARSER --[PARSER_COLOR]\u003e MAIN :","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":"end","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e COMMAND : parseArg(\"/tag B)","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":"activate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"COMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND : String[] values","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e COMMAND : validate(\"/tag B\", values)","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":"COMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND :","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":"deactivate COMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : filterResources()","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : hasFilters()","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND --[COMMAND_COLOR]\u003e LISTCOMMAND","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND -[COMMAND_COLOR]\u003e LISTCOMMAND : displayResourcesDetails()","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":"activate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"LISTCOMMAND --[COMMAND_COLOR]\u003e PARSER","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":"deactivate LISTCOMMAND COMMAND_COLOR","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":"PARSER --[PARSER_COLOR]\u003e MAIN :","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"deactivate PARSER PARSER_COLOR","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":"@enduml","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"yingx9":75}},{"path":"docs/diagram/Style.puml","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"/\u0027","lastModifiedDate":"2023-10-24"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":" \u0027Commonly used styles and colors across diagrams.","lastModifiedDate":"2023-10-24"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":" \u0027Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more","lastModifiedDate":"2023-10-24"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":" \u0027comprehensive list of skinparams.","lastModifiedDate":"2023-10-24"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":" \u0027/","lastModifiedDate":"2023-10-24"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"\u0027T1 through T4 are shades of the original color from lightest to darkest","lastModifiedDate":"2023-10-24"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"!define SYSLIB_COLOR #grey","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR #1D8900","lastModifiedDate":"2023-10-24"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T1 #83E769","lastModifiedDate":"2023-10-24"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T2 #3FC71B","lastModifiedDate":"2023-10-24"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T3 #166800","lastModifiedDate":"2023-10-24"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"!define UI_COLOR_T4 #0E4100","lastModifiedDate":"2023-10-24"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR #3333C4","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T1 #C8C8FA","lastModifiedDate":"2023-10-24"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T2 #6A6ADC","lastModifiedDate":"2023-10-24"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T3 #1616B0","lastModifiedDate":"2023-10-24"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"!define PARSER_COLOR_T4 #101086","lastModifiedDate":"2023-10-24"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR #9D0012","lastModifiedDate":"2023-10-24"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T1 #F97181","lastModifiedDate":"2023-10-24"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T2 #E41F36","lastModifiedDate":"2023-10-24"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T3 #7B000E","lastModifiedDate":"2023-10-24"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":"!define STORAGE_COLOR_T4 #51000A","lastModifiedDate":"2023-10-24"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR #A38300","lastModifiedDate":"2023-10-24"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_COLOR_T1 #FFE374","lastModifiedDate":"2023-10-24"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T2 #EDC520","lastModifiedDate":"2023-10-24"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T3 #806600","lastModifiedDate":"2023-10-24"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":"!define COMMAND_COLOR_T2 #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":"!define DATA_COLOR #544400","lastModifiedDate":"2023-10-24"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"!define USER_COLOR #000000","lastModifiedDate":"2023-10-24"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"skinparam Package {","lastModifiedDate":"2023-10-24"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" BackgroundColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" FontSize 16","lastModifiedDate":"2023-10-24"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"skinparam Class {","lastModifiedDate":"2023-10-24"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" FontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":" FontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" BorderThickness 1","lastModifiedDate":"2023-10-24"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" BorderColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" StereotypeFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"skinparam Actor {","lastModifiedDate":"2023-10-24"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" BorderColor USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" Color USER_COLOR","lastModifiedDate":"2023-10-24"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"skinparam Sequence {","lastModifiedDate":"2023-10-24"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" MessageAlign center","lastModifiedDate":"2023-10-24"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":" BoxFontSize 15","lastModifiedDate":"2023-10-24"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" BoxPadding 0","lastModifiedDate":"2023-10-24"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" BoxFontColor #FFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" FontName Arial","lastModifiedDate":"2023-10-24"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":"skinparam Participant {","lastModifiedDate":"2023-10-24"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" FontColor #FFFFFFF","lastModifiedDate":"2023-10-24"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" Padding 20","lastModifiedDate":"2023-10-24"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-24"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"skinparam ArrowFontStyle bold","lastModifiedDate":"2023-10-24"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":"skinparam MinClassWidth 50","lastModifiedDate":"2023-10-24"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"skinparam ParticipantPadding 10","lastModifiedDate":"2023-10-24"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":"skinparam Shadowing false","lastModifiedDate":"2023-10-24"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":"skinparam DefaultTextAlignment center","lastModifiedDate":"2023-10-24"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":"skinparam packageStyle Rectangle","lastModifiedDate":"2023-10-24"},{"lineNumber":80,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-24"},{"lineNumber":81,"author":{"gitId":"yingx9"},"content":"hide footbox","lastModifiedDate":"2023-10-24"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":"hide members","lastModifiedDate":"2023-10-24"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":"hide circle","lastModifiedDate":"2023-10-24"}],"authorContributionMap":{"JoanneJo":2,"yingx9":81}},{"path":"docs/team/BenjaminNg.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"# Benjamin Ng - Project Portfolio Page","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"## Overview","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"bnjm2000":6}},{"path":"docs/team/JoanneAng.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"# Joanne Ang - Project Portfolio Page","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"## Overview","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"JoanneJo":6}},{"path":"docs/team/WuXingyu.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"# Wu Xingyu - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"DavinciDelta":6}},{"path":"docs/team/YingXia.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"# Loke Ying Xia - Project Portfolio Page","lastModifiedDate":"2023-10-05"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"## Overview","lastModifiedDate":"2023-10-05"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-05"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-05"}],"authorContributionMap":{"yingx9":6}},{"path":"docs/team/ashokbalaji.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"# Ashok Balaji - Project Portfolio Page","lastModifiedDate":"2023-10-06"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"## Overview","lastModifiedDate":"2023-10-06"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-06"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"### Summary of Contributions","lastModifiedDate":"2023-10-06"}],"authorContributionMap":{"000verflow":6}},{"path":"src/main/java/seedu/commands/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"public class AddCommand extends Command{","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":" public AddCommand(){","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":" args \u003d new String[]{\"id\", \"t\", \"a\", \"tag\", \"i\", \"g\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":" aliasArgs \u003d new String[]{\"id\", \"title\", \"author\", \"tag\", \"isbn\", \"genre\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" required \u003d new boolean[]{true, true, true, true, true, false};","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":" @Override","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" public void execute(String statement, Parser parser) throws","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" IllegalStateException, NumberFormatException, SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" String[] values \u003d parseArgument(statement);","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":" validate(statement, values);","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":" String title \u003d values[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":" String tag \u003d values[3];","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":" if (tag.equalsIgnoreCase(\"b\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":" parser.resourceList.add(Parser.createBook(values));","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":" System.out.println(\"This book is added: \" + title);","lastModifiedDate":"2023-10-15"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" throw new SysLibException(\"Please enter a valid tag.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"bnjm2000":3,"JoanneJo":12,"DavinciDelta":13}},{"path":"src/main/java/seedu/commands/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-18"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-18"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" protected String[] args;","lastModifiedDate":"2023-10-18"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" protected String[] aliasArgs;","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" protected boolean[] required;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" public abstract void execute(String statement, Parser parser) throws","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" IllegalArgumentException, IllegalStateException, SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" /*","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" validate will include str","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" */","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" public void validate(String statement, String[] value) throws IllegalArgumentException{","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" statement \u003d statement.toLowerCase();","lastModifiedDate":"2023-10-18"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" for(int pointer \u003d 0; pointer \u003c args.length; pointer ++) {","lastModifiedDate":"2023-10-18"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" if(value[pointer] !\u003d null){","lastModifiedDate":"2023-10-18"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" String arg \u003d validateArg(statement, pointer);","lastModifiedDate":"2023-10-18"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" statement \u003d statement.replaceAll(arg+ \"\\\\s*\" + Pattern.quote(value[pointer].toLowerCase()), \"\");","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" if (!statement.isBlank()){","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Unknown variable/command: \" + statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":32,"author":{"gitId":"DavinciDelta"},"content":" public String validateArg(String statement, int pointer){","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" String arg \u003d \"/\" + args[pointer] + \" \";","lastModifiedDate":"2023-10-18"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":" int firstindex \u003d statement.indexOf(arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" if (firstindex \u003d\u003d -1){","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"DavinciDelta"},"content":" arg \u003d \"/\" + aliasArgs[pointer] + \" \";","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"DavinciDelta"},"content":" firstindex \u003d statement.indexOf(arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":38,"author":{"gitId":"DavinciDelta"},"content":" } else if (!aliasArgs[pointer].equals(args[pointer])){","lastModifiedDate":"2023-10-18"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" if (statement.contains(\"/\" + aliasArgs[pointer] + \" \")){","lastModifiedDate":"2023-10-18"},{"lineNumber":40,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Duplicate instances of\" + arg","lastModifiedDate":"2023-10-18"},{"lineNumber":41,"author":{"gitId":"DavinciDelta"},"content":" + \", \" + arg + \" and /\" + aliasArgs[pointer] + \" mean the same\");","lastModifiedDate":"2023-10-18"},{"lineNumber":42,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":43,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":44,"author":{"gitId":"DavinciDelta"},"content":" int secondIndex \u003d statement.indexOf(arg, firstindex + arg.length());","lastModifiedDate":"2023-10-18"},{"lineNumber":45,"author":{"gitId":"DavinciDelta"},"content":" if(secondIndex !\u003d -1){","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(\"Duplicate instances of \" + arg);","lastModifiedDate":"2023-10-18"},{"lineNumber":47,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":48,"author":{"gitId":"DavinciDelta"},"content":" return arg;","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"DavinciDelta"},"content":" public String[] parseArgument(String statement) throws IllegalArgumentException, IllegalStateException {","lastModifiedDate":"2023-10-18"},{"lineNumber":51,"author":{"gitId":"DavinciDelta"},"content":" String[] orderedArgs \u003d new String[args.length];","lastModifiedDate":"2023-10-18"},{"lineNumber":52,"author":{"gitId":"DavinciDelta"},"content":" for(int pointer \u003d 0; pointer \u003c args.length; pointer ++) {","lastModifiedDate":"2023-10-18"},{"lineNumber":53,"author":{"gitId":"DavinciDelta"},"content":" orderedArgs[pointer] \u003d getMatch(statement, pointer);","lastModifiedDate":"2023-10-18"},{"lineNumber":54,"author":{"gitId":"DavinciDelta"},"content":" if(orderedArgs[pointer] \u003d\u003d null \u0026\u0026 required[pointer]){","lastModifiedDate":"2023-10-18"},{"lineNumber":55,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException(args[pointer] + \" is missing in the argument!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":57,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":58,"author":{"gitId":"DavinciDelta"},"content":" return orderedArgs;","lastModifiedDate":"2023-10-18"},{"lineNumber":59,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":60,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":61,"author":{"gitId":"DavinciDelta"},"content":" public String getMatch(String statement, int pointer){","lastModifiedDate":"2023-10-18"},{"lineNumber":62,"author":{"gitId":"DavinciDelta"},"content":" String key \u003d args[pointer];","lastModifiedDate":"2023-10-18"},{"lineNumber":63,"author":{"gitId":"DavinciDelta"},"content":" Pattern pattern \u003d Pattern.compile(\"/\" + key + \" (.+?)(?\u003d\\\\s?/|$)\", Pattern.CASE_INSENSITIVE);","lastModifiedDate":"2023-10-18"},{"lineNumber":64,"author":{"gitId":"DavinciDelta"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":65,"author":{"gitId":"DavinciDelta"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":66,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":67,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"DavinciDelta"},"content":" if (aliasArgs[pointer] !\u003d null) {","lastModifiedDate":"2023-10-18"},{"lineNumber":69,"author":{"gitId":"DavinciDelta"},"content":" pattern \u003d Pattern.compile(\"/\" + aliasArgs[pointer] + \" (.+?)(?\u003d\\\\s?/|$)\", Pattern.CASE_INSENSITIVE);","lastModifiedDate":"2023-10-18"},{"lineNumber":70,"author":{"gitId":"DavinciDelta"},"content":" matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-18"},{"lineNumber":71,"author":{"gitId":"DavinciDelta"},"content":" if (matcher.find()) {","lastModifiedDate":"2023-10-18"},{"lineNumber":72,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-18"},{"lineNumber":73,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":75,"author":{"gitId":"DavinciDelta"},"content":" return null;","lastModifiedDate":"2023-10-18"},{"lineNumber":76,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-18"},{"lineNumber":77,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"DavinciDelta"},"content":" public int parseInt(String value){","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":" try {","lastModifiedDate":"2023-10-14"},{"lineNumber":80,"author":{"gitId":"DavinciDelta"},"content":" int num \u003d Integer.parseInt(value);","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"DavinciDelta"},"content":" if (0 \u003c num){","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":" return num;","lastModifiedDate":"2023-10-14"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":84,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException (\"The argument for id is not a valid number!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":85,"author":{"gitId":"yingx9"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-14"},{"lineNumber":86,"author":{"gitId":"DavinciDelta"},"content":" throw new IllegalArgumentException (\"The argument for id is not a number!\");","lastModifiedDate":"2023-10-18"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":89,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":90,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":91,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":3,"JoanneJo":2,"DavinciDelta":73,"yingx9":13}},{"path":"src/main/java/seedu/commands/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" public DeleteCommand(){","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" args \u003d new String[]{\"id\"};","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" required \u003d new boolean[]{true};","lastModifiedDate":"2023-10-18"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-18"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" public void execute(String statement, Parser parser) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" int id \u003d parseInt(parseArgument(statement)[0]);","lastModifiedDate":"2023-10-18"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" assert id \u003e 0;","lastModifiedDate":"2023-10-24"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" ArrayList\u003cResource\u003e toRemove \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" System.out.println(\"Looking for ID: \" + id + \"...\");","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" for (Resource r: parser.resourceList){","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" Book b \u003d (Book) r;","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" if (b.getId() \u003d\u003d id){","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":" System.out.println(\"This resource is removed: \");","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" System.out.println(b);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" toRemove.add(r);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" if(toRemove.isEmpty()){","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"No resources with id matching \" + id + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\");","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":" parser.resourceList.removeAll(toRemove);","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":3,"JoanneJo":1,"DavinciDelta":25,"yingx9":7}},{"path":"src/main/java/seedu/commands/ExitCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"public class ExitCommand extends Command{","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException {","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" assert statement !\u003d null : \"Statement to execute cannot be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" assert parser !\u003d null : \"Parser must not be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.INFO, \"Executing ExitCommand...\");","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" UI ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" ui.showExitMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"bnjm2000":42}},{"path":"src/main/java/seedu/commands/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":" private static final String INVALID_ARGUMENT_MESSAGE \u003d \"Please use the format \u0027find [/t TITLE OR \"","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":" + \"/i ISBN OR /a AUTHOR OR /id ID]\u0027\\n\" + \"____________________________________________________________\";","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" private static final String NO_RESOURCE_FOUND_MESSAGE \u003d \"There are no resources found matching the given filters.\";","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" private static final String RESOURCE_FOUND_MESSAGE \u003d \"Here are resources that matched the given filters:\";","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"000verflow"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"000verflow"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"000verflow"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"000verflow"},"content":" protected String title;","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":" protected String author;","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"000verflow"},"content":" protected String isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":" protected String id;","lastModifiedDate":"2023-10-15"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":" protected UI ui;","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":" public FindCommand(){","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":" args \u003d new String[]{\"id\", \"i\", \"a\", \"t\"};","lastModifiedDate":"2023-10-26"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":" aliasArgs \u003d new String[]{\"id\", \"isbn\", \"author\", \"title\"};","lastModifiedDate":"2023-10-26"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":" required \u003d new boolean[]{false, false, false, false};","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" LOGGER.info(\"FindCommand instance created.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" public void setTitle(String title){","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":" this.title \u003d title;","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":" public String getTitle(){","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" return this.title;","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":" public void setAuthor(String author){","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":" this.author \u003d author;","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":" public String getAuthor(){","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":" return this.author;","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":" public void setISBN(String isbn){","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":" this.isbn \u003d isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":" public String getISBN(){","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":" return this.isbn;","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":" public void setID(String id){","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":" this.id \u003d id;","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":" public String getID(){","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":" return this.id;","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException, SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" assert statement !\u003d null \u0026\u0026 !statement.trim().isEmpty() : \"Statement to execute cannot be null or empty!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":" assert parser !\u003d null : \"Parser cannot be null!\";","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" String[] value \u003d parseArgument(statement);","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":" validate(statement, value);","lastModifiedDate":"2023-10-26"},{"lineNumber":93,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" if (value[3]\u003d\u003dnull \u0026\u0026 value[2]\u003d\u003dnull \u0026\u0026 value[1]\u003d\u003dnull \u0026\u0026 value[0]\u003d\u003dnull) {","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":" throw new IllegalArgumentException(INVALID_ARGUMENT_MESSAGE + System.lineSeparator());","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":" ArrayList\u003cResource\u003e matchedResources \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" for (Resource r: parser.resourceList){","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":" Book b \u003d (Book) r;","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" if (b.getTitle().equals(value[3]) || b.getISBN().equals(value[1]) || b.getAuthor().equals(value[2])){","lastModifiedDate":"2023-10-26"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":" matchedResources.add(b);","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" if (matchedResources.isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":" LOGGER.warning(\"No resources matched the given filters.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":" System.out.println(NO_RESOURCE_FOUND_MESSAGE);","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":" ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"000verflow"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"000verflow"},"content":" LOGGER.info(\"Resources matched the given filters.\");","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"000verflow"},"content":" System.out.println(RESOURCE_FOUND_MESSAGE);","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"000verflow"},"content":" for (Resource r : matchedResources) {","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"000verflow"},"content":" System.out.println(r);","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"000verflow"},"content":" ui.showLine();","lastModifiedDate":"2023-10-17"},{"lineNumber":117,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":113,"yingx9":7}},{"path":"src/main/java/seedu/commands/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" private static final Logger logger \u003d Logger.getLogger(HelpCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(FindCommand.class.getName());","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" static {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" // remove logs from showing in stdout","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" try {","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" for (java.util.logging.Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" if (handler instanceof java.util.logging.ConsoleHandler) {","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" FileHandler fileHandler \u003d new FileHandler(\"logs/findCommandLogs.log\", true);","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" fileHandler.setFormatter(new SimpleFormatter());","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" LOGGER.addHandler(fileHandler);","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" LOGGER.setLevel(Level.INFO);","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" } catch (IOException e) {","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" LOGGER.log(Level.SEVERE, \"Failed to set up log file handler\", e);","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" public void execute(String statement, Parser parser) throws IllegalArgumentException {","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" assert statement !\u003d null : \"Statement to execute cannot be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" assert parser !\u003d null : \"Parser must not be null\";","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" UI ui \u003d new UI();","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" logger.log(Level.INFO, \"Executing HelpCommand\");","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":" ui.showHelpMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":35,"yingx9":7}},{"path":"src/main/java/seedu/commands/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatLineSeparator;","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatLastLineDivider;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"import static seedu.common.Messages.formatFirstLine;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":" public static final String FILTER_MESSAGE \u003d formatFirstLine(\"Listing resources matching given filters: \");","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":" public static final String GENERIC_MESSAGE \u003d formatFirstLine(\"Listing all resources in the Library:\");","lastModifiedDate":"2023-10-26"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":" public static final String ZERO_RESOURCES_MESSAGE \u003d formatLastLineDivider(\"There are currently 0 resources.\");","lastModifiedDate":"2023-10-26"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":" private static String tagKeyword;","lastModifiedDate":"2023-10-19"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":" private static String genreKeyword;","lastModifiedDate":"2023-10-19"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":" private static String feedbackToUser;","lastModifiedDate":"2023-10-26"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":" public ListCommand(){","lastModifiedDate":"2023-10-19"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" args \u003d new String[]{\"tag\", \"g\"};","lastModifiedDate":"2023-10-19"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" aliasArgs \u003d new String[]{\"tag\", \"genre\"};","lastModifiedDate":"2023-10-19"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" required \u003d new boolean[]{false, false};","lastModifiedDate":"2023-10-19"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-19"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" public void execute(String statement, Parser parser) throws SysLibException, IllegalArgumentException {","lastModifiedDate":"2023-10-19"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" feedbackToUser \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" String[] values \u003d parseArgument(statement);","lastModifiedDate":"2023-10-19"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" validate(statement, values);","lastModifiedDate":"2023-10-19"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" filterResources(values, parser.resourceList);","lastModifiedDate":"2023-10-26"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" System.out.println(feedbackToUser);","lastModifiedDate":"2023-10-26"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" public void filterResources(String[] values, List\u003cResource\u003e resourceList) throws SysLibException{","lastModifiedDate":"2023-10-26"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" boolean hasFilters \u003d hasFilters((values));","lastModifiedDate":"2023-10-26"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" List\u003cResource\u003e matchedResources \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-19"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" if(hasFilters){","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" boolean isTagEqualToKeyword \u003d true;","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" boolean isGenreEqualToKeyword \u003d true;","lastModifiedDate":"2023-10-19"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" for (int i\u003d0; i \u003cresourceList.size(); i++){","lastModifiedDate":"2023-10-19"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" Resource resource \u003d resourceList.get(i);","lastModifiedDate":"2023-10-19"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" if(tagKeyword !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" String resourceTag \u003d resource.getTag();","lastModifiedDate":"2023-10-19"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":" isTagEqualToKeyword \u003d resourceTag.equals(tagKeyword);","lastModifiedDate":"2023-10-19"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" if(genreKeyword !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" isGenreEqualToKeyword \u003d Resource.hasGenre(resource, genreKeyword);","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":" if (isTagEqualToKeyword \u0026\u0026 isGenreEqualToKeyword){","lastModifiedDate":"2023-10-19"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" matchedResources.add(resource);","lastModifiedDate":"2023-10-19"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":" displayResourcesDetails(matchedResources);","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":" } else{","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"yingx9"},"content":" displayResourcesDetails(resourceList);","lastModifiedDate":"2023-10-26"},{"lineNumber":81,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":83,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":84,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"yingx9"},"content":" public String displayResourcesDetails(List\u003cResource\u003e resourcesList) {","lastModifiedDate":"2023-10-26"},{"lineNumber":90,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"yingx9"},"content":" String messageToDisplay \u003d \"\";","lastModifiedDate":"2023-10-26"},{"lineNumber":92,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"yingx9"},"content":" if (resourcesList.isEmpty()){","lastModifiedDate":"2023-10-19"},{"lineNumber":94,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d ZERO_RESOURCES_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":95,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":96,"author":{"gitId":"yingx9"},"content":" } else {","lastModifiedDate":"2023-10-19"},{"lineNumber":97,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":98,"author":{"gitId":"yingx9"},"content":" for (int i \u003d 0; i \u003c resourcesList.size(); i +\u003d 1) {","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"yingx9"},"content":" String resourceDetails \u003d resourcesList.get(i).toString();","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d formatLineSeparator(i+1 + \". \" + resourceDetails);","lastModifiedDate":"2023-10-26"},{"lineNumber":101,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":102,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":103,"author":{"gitId":"yingx9"},"content":" messageToDisplay +\u003d formatLastLineDivider(\"There are currently \" + resourcesList.size() +","lastModifiedDate":"2023-10-26"},{"lineNumber":104,"author":{"gitId":"yingx9"},"content":" \" resource(s).\");","lastModifiedDate":"2023-10-26"},{"lineNumber":105,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":106,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":107,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":108,"author":{"gitId":"yingx9"},"content":" feedbackToUser +\u003d messageToDisplay;","lastModifiedDate":"2023-10-26"},{"lineNumber":109,"author":{"gitId":"yingx9"},"content":" return messageToDisplay;","lastModifiedDate":"2023-10-26"},{"lineNumber":110,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":111,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":112,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":113,"author":{"gitId":"yingx9"},"content":" public static boolean hasFilters(String[] values) throws SysLibException {","lastModifiedDate":"2023-10-26"},{"lineNumber":114,"author":{"gitId":"yingx9"},"content":" tagKeyword \u003d null;","lastModifiedDate":"2023-10-26"},{"lineNumber":115,"author":{"gitId":"yingx9"},"content":" genreKeyword \u003d null;","lastModifiedDate":"2023-10-26"},{"lineNumber":116,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":117,"author":{"gitId":"yingx9"},"content":" boolean hasFilters \u003d true;","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"yingx9"},"content":" if (values[0] \u003d\u003d null \u0026\u0026 values[1] \u003d\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":119,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":120,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":121,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":122,"author":{"gitId":"yingx9"},"content":" if (values[0] !\u003d null) {","lastModifiedDate":"2023-10-26"},{"lineNumber":123,"author":{"gitId":"yingx9"},"content":" tagKeyword \u003d values[0];","lastModifiedDate":"2023-10-26"},{"lineNumber":124,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":126,"author":{"gitId":"yingx9"},"content":" if (values[1] !\u003d null){","lastModifiedDate":"2023-10-26"},{"lineNumber":127,"author":{"gitId":"yingx9"},"content":" genreKeyword \u003d values[1];","lastModifiedDate":"2023-10-26"},{"lineNumber":128,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-19"},{"lineNumber":129,"author":{"gitId":"yingx9"},"content":" return hasFilters;","lastModifiedDate":"2023-10-26"},{"lineNumber":130,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":131,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":132,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":133,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":2,"bnjm2000":1,"yingx9":130}},{"path":"src/main/java/seedu/common/Messages.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"package seedu.common;","lastModifiedDate":"2023-10-26"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"public class Messages {","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":" public static String formatFirstLine(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":" return LINESEPARATOR + message + LINESEPARATOR + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":" public static String formatLineSeparator(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":" return message + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":" public static String formatLastLineDivider(String message){","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" return LINESEPARATOR + message + SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-26"}],"authorContributionMap":{"yingx9":17}},{"path":"src/main/java/seedu/data/Book.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"public class Book extends Resource {","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":" private String author;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":" //private String synopsis;","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":" private String[] genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":" private int id;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":" public Book(String title, String isbn, String author, String[] genres, int id) {","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" super(title, isbn);","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" setTag(\"B\");","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" setAuthor(author);","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":" //setSynopsis(synopsis);","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":" setGenre(genres);","lastModifiedDate":"2023-10-15"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" setId(id);","lastModifiedDate":"2023-10-15"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" public String getAuthor() {","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" return author;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" public void setAuthor(String author) {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" this.author \u003d author;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":" /*public String getSynopsis() {","lastModifiedDate":"2023-10-15"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" return synopsis;","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" public void setSynopsis(String synopsis) {","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" this.synopsis \u003d synopsis;","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" }*/","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" public String[] getGenre() {","lastModifiedDate":"2023-10-15"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" return genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":" public void setGenre(String[] genres) {","lastModifiedDate":"2023-10-15"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":" this.genres \u003d genres;","lastModifiedDate":"2023-10-15"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":" public String getGenreString() {","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" return String.join(\", \", genres);","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":" public int getId() {","lastModifiedDate":"2023-10-15"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":" return id;","lastModifiedDate":"2023-10-15"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" public void setId(int id) {","lastModifiedDate":"2023-10-15"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" this.id \u003d id;","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" @Override","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":" StringBuilder genreString \u003d new StringBuilder();","lastModifiedDate":"2023-10-15"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":" if (getGenre()[0] \u003d\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":" genreString.append(\"-\");","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":" genreString.append(java.util.Arrays.toString(getGenre()).replace(\"[\", \"\").replace(\"]\", \"\"));","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":61,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":62,"author":{"gitId":"JoanneJo"},"content":" return \"[\" + getTag() + \"] \" + \" ID: \" + getId() + \" Title: \" + getTitle() + \" ISBN: \" + getISBN() + \" Author: \"","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"bnjm2000"},"content":" + getAuthor() + \" Genre: \" + genreString;","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":65,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"},{"lineNumber":66,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"bnjm2000":1,"JoanneJo":37,"DavinciDelta":23,"yingx9":4}},{"path":"src/main/java/seedu/data/Resource.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"public class Resource {","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":" private String title;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":" private boolean isBorrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":" private Integer copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":" private String tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":" private String isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" public Resource(String title, String isbn){","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" setTitle(title);","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" setBorrowed(false);","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" setISBN(isbn);","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" setCopies(1);","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":" setTag(\"\");","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" public String getTitle() {","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" return title;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" public void setTitle(String title) {","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" this.title \u003d title;","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" public boolean isBorrowed() {","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" return isBorrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" public void setBorrowed(boolean borrowed) {","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":" isBorrowed \u003d borrowed;","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":" public Integer getCopies() {","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"DavinciDelta"},"content":" return copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"DavinciDelta"},"content":" public void setCopies(Integer copies) {","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"DavinciDelta"},"content":" this.copies \u003d copies;","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"DavinciDelta"},"content":" public String getTag() {","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"DavinciDelta"},"content":" return tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"DavinciDelta"},"content":" public void setTag(String tag) {","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"DavinciDelta"},"content":" this.tag \u003d tag;","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"DavinciDelta"},"content":" public String getISBN() {","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"DavinciDelta"},"content":" return isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"DavinciDelta"},"content":" public void setISBN(String isbn) {","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"DavinciDelta"},"content":" this.isbn \u003d isbn;","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" public String toString() {","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" return \"[\" + tag + \"] \" + title;","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" public static boolean hasGenre(Resource resource, String genre){","lastModifiedDate":"2023-10-26"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" Book bookResource;","lastModifiedDate":"2023-10-26"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" if (resource instanceof Book) {","lastModifiedDate":"2023-10-26"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":" bookResource \u003d (Book) resource;","lastModifiedDate":"2023-10-26"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" String[] genres \u003d bookResource.getGenre();","lastModifiedDate":"2023-10-26"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" if (genres[0] \u003d\u003d null ){","lastModifiedDate":"2023-10-26"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" for(int j \u003d0; j \u003c genres.length; j ++){","lastModifiedDate":"2023-10-26"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":" if (genres[j].equals(genre)){","lastModifiedDate":"2023-10-26"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" return true;","lastModifiedDate":"2023-10-26"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":73,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":75,"author":{"gitId":"yingx9"},"content":" return false;","lastModifiedDate":"2023-10-26"},{"lineNumber":76,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":77,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":1,"DavinciDelta":53,"yingx9":25}},{"path":"src/main/java/seedu/data/SysLibException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.data;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"public class SysLibException extends Exception {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":" public SysLibException(String message) {","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":" super(message);","lastModifiedDate":"2023-10-15"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"000verflow":1,"JoanneJo":6}},{"path":"src/main/java/seedu/duke/Duke.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.duke;","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.ui.UI;","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Duke {","lastModifiedDate":"2019-07-29"},{"lineNumber":7,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Main entry-point for the java.duke.Duke application.","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" private static UI ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" private static Parser parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":" public Duke(){","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":" ui \u003d new UI();","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" new Duke().run();","lastModifiedDate":"2023-10-14"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" public void run(){","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":" ui.showWelcomeMessage();","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" while (true) {","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" String response \u003d ui.readCommand();","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" parser.process(response);","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" if (response.equalsIgnoreCase(\"exit\")){","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" break;","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"000verflow":19,"bnjm2000":2,"-":11,"yingx9":2}},{"path":"src/main/java/seedu/parser/DeleteParser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"public class DeleteParser {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":" public static String parseDelete(String statement) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":" String inputPattern \u003d \"/id (\\\\d+)\";","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"DavinciDelta"},"content":" if (matchFound){","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":" return matcher.group(1).trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" \"\u0027delete /id ID\");","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":" } catch (IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":" \"\u0027delete /id ID\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"DavinciDelta":26}},{"path":"src/main/java/seedu/parser/Parser.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-15"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-15"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.Command;","lastModifiedDate":"2023-10-15"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.AddCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.DeleteCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.FindCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.ListCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.HelpCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"import seedu.commands.ExitCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.SEPARATOR_LINEDIVIDER;","lastModifiedDate":"2023-10-19"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-14"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-15"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-15"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"public class Parser {","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":" public List\u003cResource\u003e resourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-15"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" public HashMap\u003cString, Command\u003e commandProcessor \u003d new HashMap\u003c\u003e() {","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" {","lastModifiedDate":"2023-10-14"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" put(\"list\", new ListCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" put(\"delete\", new DeleteCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":" put(\"find\", new FindCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" put(\"help\", new HelpCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" put(\"exit\", new ExitCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"DavinciDelta"},"content":" put(\"add\", new AddCommand());","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" };","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" public void process(String response) {","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" String command \u003d response.split(\" \")[0];","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" if (commandProcessor.containsKey(command)) {","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" String statement \u003d removeFirstWord(response);","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" try {","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" commandProcessor.get(command).execute(statement, this);","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" } catch (IllegalArgumentException | IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" System.out.println(e.getMessage());","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" } else {","lastModifiedDate":"2023-10-14"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" System.out.println(\"no commands found. Enter \\\"help\\\" for a list of commands.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" public static String removeFirstWord(String response) {","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" int index \u003d response.indexOf(\" \");","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" return \"\";","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":" return response.substring(index + 1);","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":" public List\u003cResource\u003e getResourceList() {","lastModifiedDate":"2023-10-23"},{"lineNumber":59,"author":{"gitId":"JoanneJo"},"content":" return resourceList;","lastModifiedDate":"2023-10-23"},{"lineNumber":60,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":61,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":62,"author":{"gitId":"JoanneJo"},"content":" public static String[] parseAddCommand(String statement) throws SysLibException {","lastModifiedDate":"2023-10-15"},{"lineNumber":63,"author":{"gitId":"JoanneJo"},"content":" String inputPattern \u003d \"(.+?) /tag (.)(.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":64,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":65,"author":{"gitId":"JoanneJo"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":66,"author":{"gitId":"JoanneJo"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"JoanneJo"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":69,"author":{"gitId":"JoanneJo"},"content":" if (matchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":70,"author":{"gitId":"JoanneJo"},"content":" if (matcher.group(2).equalsIgnoreCase(\"b\")) {","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"JoanneJo"},"content":" return parseAddBook(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":73,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":74,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":75,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":76,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":77,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":79,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":80,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":81,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":82,"author":{"gitId":"JoanneJo"},"content":" public static String[] parseAddBook(String statement) throws SysLibException, IllegalStateException {","lastModifiedDate":"2023-10-15"},{"lineNumber":83,"author":{"gitId":"JoanneJo"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"JoanneJo"},"content":" String inputPattern \u003d \"/id (.+?) /t (.+?) /a (.+?) /tag (.+?) /i (.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"JoanneJo"},"content":" String genrePattern \u003d \"(.+) /g (.+)\";","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":87,"author":{"gitId":"JoanneJo"},"content":" Pattern pattern \u003d Pattern.compile(inputPattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":88,"author":{"gitId":"JoanneJo"},"content":" Matcher matcher \u003d pattern.matcher(statement);","lastModifiedDate":"2023-10-15"},{"lineNumber":89,"author":{"gitId":"JoanneJo"},"content":" boolean matchFound \u003d matcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":90,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":91,"author":{"gitId":"JoanneJo"},"content":" Pattern gPattern \u003d Pattern.compile(genrePattern);","lastModifiedDate":"2023-10-15"},{"lineNumber":92,"author":{"gitId":"JoanneJo"},"content":" Matcher gMatcher \u003d gPattern.matcher(matcher.group(5));","lastModifiedDate":"2023-10-15"},{"lineNumber":93,"author":{"gitId":"JoanneJo"},"content":" boolean gMatchFound \u003d gMatcher.find();","lastModifiedDate":"2023-10-15"},{"lineNumber":94,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":95,"author":{"gitId":"JoanneJo"},"content":" String[] args \u003d new String[6];","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":97,"author":{"gitId":"JoanneJo"},"content":" if (matchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":98,"author":{"gitId":"JoanneJo"},"content":" args[0] \u003d matcher.group(1).trim(); // id","lastModifiedDate":"2023-10-15"},{"lineNumber":99,"author":{"gitId":"JoanneJo"},"content":" args[1] \u003d matcher.group(2).trim(); // title","lastModifiedDate":"2023-10-15"},{"lineNumber":100,"author":{"gitId":"JoanneJo"},"content":" args[2] \u003d matcher.group(3).trim(); // author","lastModifiedDate":"2023-10-15"},{"lineNumber":101,"author":{"gitId":"JoanneJo"},"content":" args[3] \u003d matcher.group(4).trim(); // tag","lastModifiedDate":"2023-10-15"},{"lineNumber":102,"author":{"gitId":"JoanneJo"},"content":" if (gMatchFound) {","lastModifiedDate":"2023-10-15"},{"lineNumber":103,"author":{"gitId":"JoanneJo"},"content":" args[4] \u003d gMatcher.group(1).trim(); // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":104,"author":{"gitId":"JoanneJo"},"content":" args[5] \u003d gMatcher.group(2).trim(); // genre","lastModifiedDate":"2023-10-15"},{"lineNumber":105,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":106,"author":{"gitId":"JoanneJo"},"content":" args[4] \u003d matcher.group(5).trim(); // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":107,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":108,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":109,"author":{"gitId":"JoanneJo"},"content":" if (args[0].isEmpty() || args[1].isEmpty() || args[2].isEmpty() || args[3].isEmpty()","lastModifiedDate":"2023-10-15"},{"lineNumber":110,"author":{"gitId":"JoanneJo"},"content":" || args[4].isEmpty()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":111,"author":{"gitId":"bnjm2000"},"content":" throw new SysLibException(\"Please state the id, title, author, tag, and ISBN.\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"yingx9"},"content":" SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":113,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":114,"author":{"gitId":"JoanneJo"},"content":" } else {","lastModifiedDate":"2023-10-15"},{"lineNumber":115,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":116,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":117,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":118,"author":{"gitId":"JoanneJo"},"content":" return args;","lastModifiedDate":"2023-10-15"},{"lineNumber":119,"author":{"gitId":"JoanneJo"},"content":" } catch (IllegalStateException | SysLibException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":120,"author":{"gitId":"JoanneJo"},"content":" throw new SysLibException(\"Please use the format \" +","lastModifiedDate":"2023-10-15"},{"lineNumber":121,"author":{"gitId":"yingx9"},"content":" \"\u0027add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE]\u0027.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":122,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":123,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":124,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":125,"author":{"gitId":"JoanneJo"},"content":" public static Book createBook(String[] args) throws IllegalStateException, NumberFormatException {","lastModifiedDate":"2023-10-15"},{"lineNumber":126,"author":{"gitId":"JoanneJo"},"content":" int id;","lastModifiedDate":"2023-10-15"},{"lineNumber":127,"author":{"gitId":"JoanneJo"},"content":" try {","lastModifiedDate":"2023-10-15"},{"lineNumber":128,"author":{"gitId":"JoanneJo"},"content":" id \u003d Integer.parseInt(args[0]); // id","lastModifiedDate":"2023-10-15"},{"lineNumber":129,"author":{"gitId":"JoanneJo"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2023-10-15"},{"lineNumber":130,"author":{"gitId":"yingx9"},"content":" throw new NumberFormatException(\"Please enter a valid id.\" + SEPARATOR_LINEDIVIDER);","lastModifiedDate":"2023-10-19"},{"lineNumber":131,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":132,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":133,"author":{"gitId":"JoanneJo"},"content":" String title \u003d args[1]; // title","lastModifiedDate":"2023-10-15"},{"lineNumber":134,"author":{"gitId":"JoanneJo"},"content":" String author \u003d args[2]; // author","lastModifiedDate":"2023-10-15"},{"lineNumber":135,"author":{"gitId":"JoanneJo"},"content":" String isbn \u003d args[4]; // isbn","lastModifiedDate":"2023-10-15"},{"lineNumber":136,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":137,"author":{"gitId":"JoanneJo"},"content":" String genre;","lastModifiedDate":"2023-10-15"},{"lineNumber":138,"author":{"gitId":"JoanneJo"},"content":" String[] genres \u003d new String[1];","lastModifiedDate":"2023-10-15"},{"lineNumber":139,"author":{"gitId":"JoanneJo"},"content":" if (args[5] !\u003d null) {","lastModifiedDate":"2023-10-15"},{"lineNumber":140,"author":{"gitId":"JoanneJo"},"content":" genre \u003d args[5]; // genre","lastModifiedDate":"2023-10-15"},{"lineNumber":141,"author":{"gitId":"JoanneJo"},"content":" genres \u003d genre.split(\", \");","lastModifiedDate":"2023-10-15"},{"lineNumber":142,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":143,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":144,"author":{"gitId":"JoanneJo"},"content":" return new Book(title, isbn, author, genres, id);","lastModifiedDate":"2023-10-15"},{"lineNumber":145,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":146,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":147,"author":{"gitId":"000verflow"},"content":" public Matcher parseFindCommand(String command) throws SysLibException{","lastModifiedDate":"2023-10-15"},{"lineNumber":148,"author":{"gitId":"000verflow"},"content":" // Define a regular expression pattern to match optional flags and their values","lastModifiedDate":"2023-10-15"},{"lineNumber":149,"author":{"gitId":"000verflow"},"content":" Pattern pattern \u003d Pattern.compile(\"/(t|a|i|id)\\\\s+([^/]+)\");","lastModifiedDate":"2023-10-15"},{"lineNumber":150,"author":{"gitId":"000verflow"},"content":" return pattern.matcher(command);","lastModifiedDate":"2023-10-15"},{"lineNumber":151,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":152,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":153,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":154,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":155,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":12,"bnjm2000":2,"JoanneJo":93,"DavinciDelta":1,"yingx9":47}},{"path":"src/main/java/seedu/ui/UI.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.ui;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-14"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"public class UI {","lastModifiedDate":"2023-10-14"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":" public static final String LINESEPARATOR \u003d System.lineSeparator();","lastModifiedDate":"2023-10-26"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":" public static final String LINEDIVIDER \u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-19"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":" public static final String SEPARATOR_LINEDIVIDER \u003d LINESEPARATOR + LINEDIVIDER;","lastModifiedDate":"2023-10-26"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":" protected static String logo \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":" \" ____ _ _ _ ____ _ ___ \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":" \"/ ___| _ _ ___| | (_) |__ / ___| | |_ _|\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":" \"\\\\___ \\\\| | | / __| | | | \u0027_ \\\\ | | | | | | \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":" \" ___) | |_| \\\\__ \\\\ |___| | |_) | | |___| |___ | | \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":" \"|____/ \\\\__, |___/_____|_|_.__/ \\\\____|_____|___|\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":" \" |___/ \";","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":" protected Scanner myScanner;","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-19"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" public UI(){","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" this.myScanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" public void showWelcomeMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" System.out.println(logo);","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"What would you like to do?\");","lastModifiedDate":"2023-10-28"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" public void showExitMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"Bye, hope to see you again soon!\");","lastModifiedDate":"2023-10-14"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" public void showHelpMessage(){","lastModifiedDate":"2023-10-14"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"Commands available:\");","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"add: adds a new resource to the library inventory.\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN [/g GENRE])\");","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"list: list all resources OR filter by certain tags or genre.\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" \"(e.g. list /tag B /g Fiction\");","lastModifiedDate":"2023-10-19"},{"lineNumber":44,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"exit: displays a farewell message and exits the program (e.g. exit)\");","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"bnjm2000"},"content":" System.out.println(\"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\");","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"bnjm2000"},"content":" showLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":49,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":50,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" public void showError(Exception e){","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" System.out.println(e);","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" public String readCommand(){","lastModifiedDate":"2023-10-14"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":" System.out.print(\"\u003e \");","lastModifiedDate":"2023-10-14"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" return myScanner.nextLine();","lastModifiedDate":"2023-10-14"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" public void showLine(){","lastModifiedDate":"2023-10-14"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" System.out.println(LINEDIVIDER);","lastModifiedDate":"2023-10-14"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-14"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":"}","lastModifiedDate":"2023-10-14"}],"authorContributionMap":{"000verflow":40,"bnjm2000":16,"yingx9":7}},{"path":"src/test/java/seedu/DukeTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu;","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"class DukeTest {","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public void sampleTest() {","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"000verflow":1,"-":11}},{"path":"src/test/java/seedu/commands/AddCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"JoanneJo"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-23"},{"lineNumber":2,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":3,"author":{"gitId":"JoanneJo"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-23"},{"lineNumber":4,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-23"},{"lineNumber":5,"author":{"gitId":"JoanneJo"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-23"},{"lineNumber":6,"author":{"gitId":"JoanneJo"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-23"},{"lineNumber":7,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":8,"author":{"gitId":"JoanneJo"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":9,"author":{"gitId":"JoanneJo"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-23"},{"lineNumber":10,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":11,"author":{"gitId":"JoanneJo"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-23"},{"lineNumber":12,"author":{"gitId":"JoanneJo"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-23"},{"lineNumber":13,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":14,"author":{"gitId":"JoanneJo"},"content":"public class AddCommandTest {","lastModifiedDate":"2023-10-23"},{"lineNumber":15,"author":{"gitId":"JoanneJo"},"content":" private final Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-23"},{"lineNumber":16,"author":{"gitId":"JoanneJo"},"content":" private final AddCommand addCommand \u003d new AddCommand();","lastModifiedDate":"2023-10-23"},{"lineNumber":17,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":18,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":19,"author":{"gitId":"JoanneJo"},"content":" public void addCommandValidData() throws SysLibException {","lastModifiedDate":"2023-10-23"},{"lineNumber":20,"author":{"gitId":"JoanneJo"},"content":" addCommand.execute(\"/id 123456789 /t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321 \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":21,"author":{"gitId":"JoanneJo"},"content":" \"/g Non-Fiction, Biography\", parser);","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"JoanneJo"},"content":" Book newBook \u003d (Book) parser.getResourceList().get(0);","lastModifiedDate":"2023-10-23"},{"lineNumber":24,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":25,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getId(), 123456789);","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getTitle(), \"The Minds of Billy Milligan\");","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getAuthor(), \"Daniel Keyes\");","lastModifiedDate":"2023-10-23"},{"lineNumber":28,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getTag(), \"B\");","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getISBN(), \"987654321\");","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"JoanneJo"},"content":" assertEquals(newBook.getGenreString(), \"Non-Fiction, Biography\");","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":32,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":34,"author":{"gitId":"JoanneJo"},"content":" public void addCommandOutput() throws SysLibException {","lastModifiedDate":"2023-10-23"},{"lineNumber":35,"author":{"gitId":"JoanneJo"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"JoanneJo"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"JoanneJo"},"content":" addCommand.execute(\"/id 123456789 /t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321 \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"JoanneJo"},"content":" \"/g Non-Fiction, Biography\", parser);","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"JoanneJo"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-23"},{"lineNumber":41,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":42,"author":{"gitId":"JoanneJo"},"content":" String expectedOutput \u003d \"This book is added: The Minds of Billy Milligan\" + System.lineSeparator() +","lastModifiedDate":"2023-10-23"},{"lineNumber":43,"author":{"gitId":"JoanneJo"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-23"},{"lineNumber":44,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":45,"author":{"gitId":"JoanneJo"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":47,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":48,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":49,"author":{"gitId":"JoanneJo"},"content":" public void addCommandInvalidId() {","lastModifiedDate":"2023-10-23"},{"lineNumber":50,"author":{"gitId":"JoanneJo"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003eaddCommand.execute(\"/id abcd \" +","lastModifiedDate":"2023-10-23"},{"lineNumber":51,"author":{"gitId":"JoanneJo"},"content":" \"/t The Minds of Billy Milligan /a Daniel Keyes /tag B /i 987654321\", parser));","lastModifiedDate":"2023-10-23"},{"lineNumber":52,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":53,"author":{"gitId":"JoanneJo"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":54,"author":{"gitId":"JoanneJo"},"content":" @Test","lastModifiedDate":"2023-10-23"},{"lineNumber":55,"author":{"gitId":"JoanneJo"},"content":" public void addCommandInsufficientData() {","lastModifiedDate":"2023-10-23"},{"lineNumber":56,"author":{"gitId":"JoanneJo"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003eaddCommand.execute(\"/id \", parser));","lastModifiedDate":"2023-10-23"},{"lineNumber":57,"author":{"gitId":"JoanneJo"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":58,"author":{"gitId":"JoanneJo"},"content":"}","lastModifiedDate":"2023-10-23"}],"authorContributionMap":{"JoanneJo":58}},{"path":"src/test/java/seedu/commands/DeleteCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"DavinciDelta"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"DavinciDelta"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"DavinciDelta"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"DavinciDelta"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"DavinciDelta"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"DavinciDelta"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"DavinciDelta"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"DavinciDelta"},"content":"public class DeleteCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"DavinciDelta"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"DavinciDelta"},"content":" void execute() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"DavinciDelta"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"DavinciDelta"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"DavinciDelta"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"DavinciDelta"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"DavinciDelta"},"content":" deleteCommand.execute(\"/id 1111\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"DavinciDelta"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"DavinciDelta"},"content":" String expectedOutput \u003d \"Looking for ID: 1111...\" + System.lineSeparator()+","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"DavinciDelta"},"content":" \"No resources with id matching 1111\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"DavinciDelta"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"DavinciDelta"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"DavinciDelta"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"DavinciDelta"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"DavinciDelta"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"DavinciDelta":31}},{"path":"src/test/java/seedu/commands/ExitCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"class ExitCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" ExitCommand exitCommand \u003d new ExitCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" exitCommand.execute(\"\", parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Bye, hope to see you again soon!\" + System.lineSeparator()+","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":28}},{"path":"src/test/java/seedu/commands/FindCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"000verflow"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-17"},{"lineNumber":2,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":3,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":4,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-17"},{"lineNumber":5,"author":{"gitId":"000verflow"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-17"},{"lineNumber":6,"author":{"gitId":"000verflow"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-17"},{"lineNumber":7,"author":{"gitId":"000verflow"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-17"},{"lineNumber":8,"author":{"gitId":"000verflow"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":9,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":10,"author":{"gitId":"000verflow"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":11,"author":{"gitId":"000verflow"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-17"},{"lineNumber":12,"author":{"gitId":"000verflow"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-17"},{"lineNumber":13,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":14,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-17"},{"lineNumber":15,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-17"},{"lineNumber":16,"author":{"gitId":"000verflow"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-17"},{"lineNumber":17,"author":{"gitId":"000verflow"},"content":"public class FindCommandTest {","lastModifiedDate":"2023-10-17"},{"lineNumber":18,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":19,"author":{"gitId":"000verflow"},"content":" private FindCommand findCommand;","lastModifiedDate":"2023-10-17"},{"lineNumber":20,"author":{"gitId":"000verflow"},"content":" private Parser parser;","lastModifiedDate":"2023-10-17"},{"lineNumber":21,"author":{"gitId":"000verflow"},"content":" private final ByteArrayOutputStream outContent \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-17"},{"lineNumber":22,"author":{"gitId":"000verflow"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-17"},{"lineNumber":23,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":24,"author":{"gitId":"000verflow"},"content":" @BeforeEach","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"000verflow"},"content":" void setUp() {","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"000verflow"},"content":" findCommand \u003d new FindCommand();","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"000verflow"},"content":" parser \u003d new Parser();","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":30,"author":{"gitId":"000verflow"},"content":" // Mock resourceList for Parser","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"000verflow"},"content":" parser.resourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"000verflow"},"content":" String[] genreTest1 \u003d {\"horror\"};","lastModifiedDate":"2023-10-17"},{"lineNumber":33,"author":{"gitId":"000verflow"},"content":" String[] genreTest2 \u003d {\"comedy\"};","lastModifiedDate":"2023-10-17"},{"lineNumber":34,"author":{"gitId":"000verflow"},"content":" parser.resourceList.add(new Book(\"Title1\", \"ISBN1\", \"Author1\", genreTest1, 1234));","lastModifiedDate":"2023-10-17"},{"lineNumber":35,"author":{"gitId":"000verflow"},"content":" parser.resourceList.add(new Book(\"Title2\", \"ISBN2\", \"Author2\", genreTest2, 5678));","lastModifiedDate":"2023-10-17"},{"lineNumber":36,"author":{"gitId":"000verflow"},"content":" outContent.reset(); // Clearing any old content","lastModifiedDate":"2023-10-17"},{"lineNumber":37,"author":{"gitId":"000verflow"},"content":" System.setOut(new PrintStream(outContent)); // Redirect System.out","lastModifiedDate":"2023-10-17"},{"lineNumber":38,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":40,"author":{"gitId":"000verflow"},"content":" @AfterEach","lastModifiedDate":"2023-10-17"},{"lineNumber":41,"author":{"gitId":"000verflow"},"content":" void tearDown() {","lastModifiedDate":"2023-10-17"},{"lineNumber":42,"author":{"gitId":"000verflow"},"content":" System.setOut(originalOut); // Reset System.out after each test","lastModifiedDate":"2023-10-17"},{"lineNumber":43,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":45,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":46,"author":{"gitId":"000verflow"},"content":" void testSetAndGetTitle() {","lastModifiedDate":"2023-10-17"},{"lineNumber":47,"author":{"gitId":"000verflow"},"content":" findCommand.setTitle(\"TitleTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"000verflow"},"content":" assertEquals(\"TitleTest\", findCommand.getTitle());","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"000verflow"},"content":" void testSetAndGetAuthor() {","lastModifiedDate":"2023-10-17"},{"lineNumber":53,"author":{"gitId":"000verflow"},"content":" findCommand.setAuthor(\"AuthorTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"000verflow"},"content":" assertEquals(\"AuthorTest\", findCommand.getAuthor());","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":56,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":57,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":58,"author":{"gitId":"000verflow"},"content":" void testSetAndGetISBN() {","lastModifiedDate":"2023-10-17"},{"lineNumber":59,"author":{"gitId":"000verflow"},"content":" findCommand.setISBN(\"ISBNTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":60,"author":{"gitId":"000verflow"},"content":" assertEquals(\"ISBNTest\", findCommand.getISBN());","lastModifiedDate":"2023-10-17"},{"lineNumber":61,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":62,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":63,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":64,"author":{"gitId":"000verflow"},"content":" void testSetAndGetID() {","lastModifiedDate":"2023-10-17"},{"lineNumber":65,"author":{"gitId":"000verflow"},"content":" findCommand.setID(\"IDTest\");","lastModifiedDate":"2023-10-17"},{"lineNumber":66,"author":{"gitId":"000verflow"},"content":" assertEquals(\"IDTest\", findCommand.getID());","lastModifiedDate":"2023-10-17"},{"lineNumber":67,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":68,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":69,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":70,"author":{"gitId":"000verflow"},"content":" void testExecuteWithInvalidFlag() {","lastModifiedDate":"2023-10-17"},{"lineNumber":71,"author":{"gitId":"000verflow"},"content":" assertThrows(IllegalArgumentException.class, () -\u003e findCommand.execute(\"/x InvalidFlag\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":72,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":73,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":74,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":75,"author":{"gitId":"000verflow"},"content":" void testExecuteWithNoFilter() {","lastModifiedDate":"2023-10-17"},{"lineNumber":76,"author":{"gitId":"000verflow"},"content":" assertThrows(AssertionError.class, () -\u003e findCommand.execute(\"\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":77,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":78,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":79,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":80,"author":{"gitId":"000verflow"},"content":" void testExecuteFindTitleMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":81,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":82,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Title1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":83,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":84,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":85,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":86,"author":{"gitId":"000verflow"},"content":" void testExecuteFindAuthorMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":87,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/a Author1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":88,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Author1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":89,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":90,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":91,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":92,"author":{"gitId":"000verflow"},"content":" void testExecuteFindISBNMatch() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":93,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/i ISBN1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":94,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"ISBN1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":95,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":96,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":97,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":98,"author":{"gitId":"000verflow"},"content":" void testExecuteNoMatchesFound() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":99,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title3\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":100,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"There are no resources found matching the given filters.\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":101,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":102,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":103,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":104,"author":{"gitId":"000verflow"},"content":" void testExecuteMultipleFilters() throws SysLibException {","lastModifiedDate":"2023-10-17"},{"lineNumber":105,"author":{"gitId":"000verflow"},"content":" findCommand.execute(\"/t Title1 /a Author1\", parser);","lastModifiedDate":"2023-10-17"},{"lineNumber":106,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Title1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":107,"author":{"gitId":"000verflow"},"content":" assertTrue(outContent.toString().contains(\"Author1\"));","lastModifiedDate":"2023-10-17"},{"lineNumber":108,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":109,"author":{"gitId":"000verflow"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":110,"author":{"gitId":"000verflow"},"content":" @Test","lastModifiedDate":"2023-10-17"},{"lineNumber":111,"author":{"gitId":"000verflow"},"content":" void testExecuteInvalidFormat() {","lastModifiedDate":"2023-10-17"},{"lineNumber":112,"author":{"gitId":"000verflow"},"content":" assertThrows(IllegalArgumentException.class, () -\u003e findCommand.execute(\"find /z Invalid\", parser));","lastModifiedDate":"2023-10-17"},{"lineNumber":113,"author":{"gitId":"000verflow"},"content":" }","lastModifiedDate":"2023-10-17"},{"lineNumber":114,"author":{"gitId":"000verflow"},"content":"}","lastModifiedDate":"2023-10-17"}],"authorContributionMap":{"000verflow":114}},{"path":"src/test/java/seedu/commands/HelpCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"class HelpCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" void execute() {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" HelpCommand helpCommand \u003d new HelpCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" helpCommand.execute(\"\", parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Commands available:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":" \"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" \"/tag TAG /i ISBN [/g GENRE])\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" \"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" \"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" \"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() + \"exit: displays a farewell message and exits the program (e.g. exit)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":" \"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":38,"yingx9":1}},{"path":"src/test/java/seedu/commands/ListCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"yingx9"},"content":"package seedu.commands;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"yingx9"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"yingx9"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"yingx9"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"yingx9"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"yingx9"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"yingx9"},"content":"import seedu.util.TestUtil;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":12,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":13,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":14,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"yingx9"},"content":"import static seedu.commands.ListCommand.ZERO_RESOURCES_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":16,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":17,"author":{"gitId":"yingx9"},"content":"import static seedu.ui.UI.LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":19,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"yingx9"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"yingx9"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"yingx9"},"content":"public class ListCommandTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"yingx9"},"content":" private Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"yingx9"},"content":" private List\u003cResource\u003e emptyResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"yingx9"},"content":" private List\u003cResource\u003e testResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"yingx9"},"content":" private TestUtil testUtil \u003d new TestUtil();","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"yingx9"},"content":" private Command listCommand \u003d new ListCommand();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" void execute() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" testResourceList \u003d TestUtil.fillTestList();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" assertEmptyListMessage();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" assertListByTagBehavior();","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":" assertListByGenreBehavior();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" assertNoFilteredListDisplay();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" private void assertEmptyListMessage() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" String outputMessage \u003d testUtil.getOutputMessage(listCommand, \"\", emptyResourceList);","lastModifiedDate":"2023-10-19"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" String expectedMessage \u003d GENERIC_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" expectedMessage +\u003d ZERO_RESOURCES_MESSAGE + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" assertEquals(expectedMessage, outputMessage);","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" private void assertListByTagBehavior() {","lastModifiedDate":"2023-10-16"},{"lineNumber":53,"author":{"gitId":"yingx9"},"content":" parser.resourceList \u003d testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":54,"author":{"gitId":"yingx9"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003elistCommand.execute(\"/tag\", parser));","lastModifiedDate":"2023-10-19"},{"lineNumber":55,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"yingx9"},"content":" private void assertListByGenreBehavior() {","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"yingx9"},"content":" parser.resourceList \u003d testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"yingx9"},"content":" assertThrows(IllegalArgumentException.class, ()-\u003elistCommand.execute(\"/g\", parser));","lastModifiedDate":"2023-10-19"},{"lineNumber":61,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"yingx9"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"yingx9"},"content":" private void assertNoFilteredListDisplay() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"yingx9"},"content":" String outputMessage \u003d testUtil.getOutputMessage(listCommand, \"/g Thriller\", testResourceList);","lastModifiedDate":"2023-10-19"},{"lineNumber":67,"author":{"gitId":"yingx9"},"content":" String expectedMessage \u003d FILTER_MESSAGE;","lastModifiedDate":"2023-10-26"},{"lineNumber":68,"author":{"gitId":"yingx9"},"content":" expectedMessage +\u003d ZERO_RESOURCES_MESSAGE + LINESEPARATOR;","lastModifiedDate":"2023-10-26"},{"lineNumber":69,"author":{"gitId":"yingx9"},"content":" assertEquals(expectedMessage, outputMessage);","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"yingx9"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"yingx9":72}},{"path":"src/test/java/seedu/parser/DeleteParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"class DeleteParserTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":" public void testParseDeleteWithValidInput() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":" String statement \u003d \"delete /id 1\";","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":" String result \u003d DeleteParser.parseDelete(statement);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":" assertEquals(\"1\", result);","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" public void testParseDeleteWithInvalidInput() {","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" String statement \u003d \"delete /t hello\";","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" assertThrows(SysLibException.class, () -\u003e DeleteParser.parseDelete(statement));","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":23}},{"path":"src/test/java/seedu/parser/ParserTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertArrayEquals;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"import static org.junit.jupiter.api.Assertions.assertThrows;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"class ParserTest {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" public void testProcessExitCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"exit\";","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Bye, hope to see you again soon!\";","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"bnjm2000"},"content":" public void testProcessHelpCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"Commands available:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"bnjm2000"},"content":" \"add: adds a new resource to the library inventory.(e.g. add /id ID /t TITLE /a AUTHOR \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"bnjm2000"},"content":" \"/tag TAG /i ISBN [/g GENRE])\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"bnjm2000"},"content":" \"delete: deletes the resource with the specified ID from the library inventory. \" +","lastModifiedDate":"2023-10-17"},{"lineNumber":50,"author":{"gitId":"bnjm2000"},"content":" \"(e.g. delete /id 123456789)\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":51,"author":{"gitId":"bnjm2000"},"content":" \"list: list all resources OR filter by certain tags or genre.(e.g. list /tag B /g Fiction\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":52,"author":{"gitId":"yingx9"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-19"},{"lineNumber":53,"author":{"gitId":"bnjm2000"},"content":" \"find: find a resource by title, author, ISBN or given id. (e.g. find /i 9780763630188)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":54,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() + \"exit: displays a farewell message and exits the program (e.g. exit)\" +","lastModifiedDate":"2023-10-17"},{"lineNumber":55,"author":{"gitId":"bnjm2000"},"content":" System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"bnjm2000"},"content":" \"For more information, please refer to our user guide at:\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"bnjm2000"},"content":" \"https://ay2324s1-cs2113t-w11-1.github.io/tp/UserGuide.html\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":64,"author":{"gitId":"bnjm2000"},"content":" public void testProcessUnknownCommand() {","lastModifiedDate":"2023-10-16"},{"lineNumber":65,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":66,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"bye\";","lastModifiedDate":"2023-10-16"},{"lineNumber":67,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":68,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":69,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":70,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":71,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":72,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":73,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":74,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":76,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"no commands found. Enter \\\"help\\\" for a list of commands.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":77,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":78,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"____________________________________________________________\";","lastModifiedDate":"2023-10-16"},{"lineNumber":79,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":80,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":81,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":82,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":83,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":84,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":85,"author":{"gitId":"bnjm2000"},"content":" public void testProcessCommands() {","lastModifiedDate":"2023-10-16"},{"lineNumber":86,"author":{"gitId":"bnjm2000"},"content":" //Test add","lastModifiedDate":"2023-10-16"},{"lineNumber":87,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":88,"author":{"gitId":"bnjm2000"},"content":" String validResponse \u003d \"add /id 1 /t Surrounded by Idiots /a Thomas Erikson \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":89,"author":{"gitId":"bnjm2000"},"content":" \"/tag B /i 9781250255174 /g Self-help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":90,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":91,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":92,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":93,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":94,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":95,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":96,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":97,"author":{"gitId":"bnjm2000"},"content":" String output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":98,"author":{"gitId":"bnjm2000"},"content":" String expectedOutput \u003d \"This book is added: Surrounded by Idiots\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":99,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":100,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":101,"author":{"gitId":"bnjm2000"},"content":" //Add second book","lastModifiedDate":"2023-10-16"},{"lineNumber":102,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"add /id 2 /t The Subtle Art of Not Giving a F*ck /a Mark Manson \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":103,"author":{"gitId":"bnjm2000"},"content":" \"/tag B /i 9780062457714 /g Self-help\";","lastModifiedDate":"2023-10-16"},{"lineNumber":104,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":105,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"This book is added: The Subtle Art of Not Giving a F*ck\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":106,"author":{"gitId":"yingx9"},"content":" \"____________________________________________________________\" + System.lineSeparator()","lastModifiedDate":"2023-10-26"},{"lineNumber":107,"author":{"gitId":"yingx9"},"content":" + System.lineSeparator();;","lastModifiedDate":"2023-10-26"},{"lineNumber":108,"author":{"gitId":"bnjm2000"},"content":" //Test list","lastModifiedDate":"2023-10-16"},{"lineNumber":109,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"list\";","lastModifiedDate":"2023-10-16"},{"lineNumber":110,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":111,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Listing all resources in the Library:\" + System.lineSeparator() + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":112,"author":{"gitId":"bnjm2000"},"content":" \"1. [B] ID: 1 Title: Surrounded by Idiots ISBN: 9781250255174 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":113,"author":{"gitId":"bnjm2000"},"content":" \"Author: Thomas Erikson Genre: Self-help\" + System.lineSeparator()+","lastModifiedDate":"2023-10-16"},{"lineNumber":114,"author":{"gitId":"bnjm2000"},"content":" \"2. [B] ID: 2 Title: The Subtle Art of Not Giving a F*ck ISBN: 9780062457714 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":115,"author":{"gitId":"bnjm2000"},"content":" \"Author: Mark Manson Genre: Self-help\" + System.lineSeparator() + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":116,"author":{"gitId":"bnjm2000"},"content":" \"There are currently 2 resource(s).\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"bnjm2000"},"content":" System.setOut(System.out);","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":121,"author":{"gitId":"bnjm2000"},"content":" //Test find","lastModifiedDate":"2023-10-16"},{"lineNumber":122,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"find /t The Subtle Art of Not Giving a F*ck\";","lastModifiedDate":"2023-10-16"},{"lineNumber":123,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":124,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Here are resources that matched the given filters:\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":125,"author":{"gitId":"bnjm2000"},"content":" \"[B] ID: 2 Title: The Subtle Art of Not Giving a F*ck ISBN: 9780062457714 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":126,"author":{"gitId":"bnjm2000"},"content":" \"Author: Mark Manson Genre: Self-help\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":127,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":128,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":129,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"bnjm2000"},"content":" //Negative find test","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"find /t No Such Book\";","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"000verflow"},"content":" expectedOutput +\u003d \"There are no resources found matching the given filters.\" + System.lineSeparator() +","lastModifiedDate":"2023-10-17"},{"lineNumber":134,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();;","lastModifiedDate":"2023-10-16"},{"lineNumber":135,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":136,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":137,"author":{"gitId":"bnjm2000"},"content":" //Test delete","lastModifiedDate":"2023-10-16"},{"lineNumber":138,"author":{"gitId":"bnjm2000"},"content":" validResponse \u003d \"delete /id 1\";","lastModifiedDate":"2023-10-16"},{"lineNumber":139,"author":{"gitId":"bnjm2000"},"content":" parser.process(validResponse);","lastModifiedDate":"2023-10-16"},{"lineNumber":140,"author":{"gitId":"bnjm2000"},"content":" output \u003d outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":141,"author":{"gitId":"bnjm2000"},"content":" expectedOutput +\u003d \"Looking for ID: 1...\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":142,"author":{"gitId":"bnjm2000"},"content":" \"This resource is removed: \" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":143,"author":{"gitId":"bnjm2000"},"content":" \"[B] ID: 1 Title: Surrounded by Idiots ISBN: 9781250255174 \" +","lastModifiedDate":"2023-10-16"},{"lineNumber":144,"author":{"gitId":"bnjm2000"},"content":" \"Author: Thomas Erikson Genre: Self-help\" + System.lineSeparator() +","lastModifiedDate":"2023-10-16"},{"lineNumber":145,"author":{"gitId":"bnjm2000"},"content":" \"____________________________________________________________\" + System.lineSeparator();","lastModifiedDate":"2023-10-16"},{"lineNumber":146,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedOutput, output);","lastModifiedDate":"2023-10-16"},{"lineNumber":147,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":148,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"bnjm2000"},"content":" public void testParseAddCommand() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":151,"author":{"gitId":"bnjm2000"},"content":" // Test case 1: Valid input with /tag b","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"bnjm2000"},"content":" String statement1 \u003d \"add /id ID /t TITLE /a AUTHOR /tag b /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":153,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs1 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", \"GENRE\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":154,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs1, Parser.parseAddCommand(statement1));","lastModifiedDate":"2023-10-16"},{"lineNumber":155,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":156,"author":{"gitId":"bnjm2000"},"content":" // Test case 2: Invalid input (missing /tag b)","lastModifiedDate":"2023-10-16"},{"lineNumber":157,"author":{"gitId":"bnjm2000"},"content":" String statement2 \u003d \"add /id ID /t TITLE /a AUTHOR /tag TAG /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":158,"author":{"gitId":"bnjm2000"},"content":" assertThrows(SysLibException.class, () -\u003e Parser.parseAddCommand(statement2));","lastModifiedDate":"2023-10-16"},{"lineNumber":159,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":160,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":161,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":162,"author":{"gitId":"bnjm2000"},"content":" public void testParseAddBook() throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":163,"author":{"gitId":"bnjm2000"},"content":" // Test case 1: Valid input with /g GENRE","lastModifiedDate":"2023-10-16"},{"lineNumber":164,"author":{"gitId":"bnjm2000"},"content":" String statement1 \u003d \"/id ID /t TITLE /a AUTHOR /tag b /i ISBN /g GENRE\";","lastModifiedDate":"2023-10-16"},{"lineNumber":165,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs1 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", \"GENRE\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":166,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs1, Parser.parseAddBook(statement1));","lastModifiedDate":"2023-10-16"},{"lineNumber":167,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":168,"author":{"gitId":"bnjm2000"},"content":" // Test case 2: Valid input without /g GENRE","lastModifiedDate":"2023-10-16"},{"lineNumber":169,"author":{"gitId":"bnjm2000"},"content":" String statement2 \u003d \"/id ID /t TITLE /a AUTHOR /tag b /i ISBN\";","lastModifiedDate":"2023-10-16"},{"lineNumber":170,"author":{"gitId":"bnjm2000"},"content":" String[] expectedArgs2 \u003d {\"ID\", \"TITLE\", \"AUTHOR\", \"b\", \"ISBN\", null};","lastModifiedDate":"2023-10-16"},{"lineNumber":171,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedArgs2, Parser.parseAddBook(statement2));","lastModifiedDate":"2023-10-16"},{"lineNumber":172,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":173,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":174,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":175,"author":{"gitId":"bnjm2000"},"content":" public void testCreateBook() {","lastModifiedDate":"2023-10-16"},{"lineNumber":176,"author":{"gitId":"bnjm2000"},"content":" String[] args \u003d {\"123\", \"CS2113T\", \"W11\", \"B\", \"1234\", \"Horror\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":177,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":178,"author":{"gitId":"bnjm2000"},"content":" Book book \u003d null;","lastModifiedDate":"2023-10-16"},{"lineNumber":179,"author":{"gitId":"bnjm2000"},"content":" book \u003d Parser.createBook(args);","lastModifiedDate":"2023-10-16"},{"lineNumber":180,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":181,"author":{"gitId":"bnjm2000"},"content":" int expectedId \u003d 123;","lastModifiedDate":"2023-10-16"},{"lineNumber":182,"author":{"gitId":"bnjm2000"},"content":" String expectedTitle \u003d \"CS2113T\";","lastModifiedDate":"2023-10-16"},{"lineNumber":183,"author":{"gitId":"bnjm2000"},"content":" String expectedAuthor \u003d \"W11\";","lastModifiedDate":"2023-10-16"},{"lineNumber":184,"author":{"gitId":"bnjm2000"},"content":" String expectedIsbn \u003d \"1234\";","lastModifiedDate":"2023-10-16"},{"lineNumber":185,"author":{"gitId":"bnjm2000"},"content":" String[] expectedGenres \u003d { \"Horror\" };","lastModifiedDate":"2023-10-16"},{"lineNumber":186,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":187,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedId, book.getId());","lastModifiedDate":"2023-10-16"},{"lineNumber":188,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedTitle, book.getTitle());","lastModifiedDate":"2023-10-16"},{"lineNumber":189,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedAuthor, book.getAuthor());","lastModifiedDate":"2023-10-16"},{"lineNumber":190,"author":{"gitId":"bnjm2000"},"content":" assertEquals(expectedIsbn, book.getISBN());","lastModifiedDate":"2023-10-16"},{"lineNumber":191,"author":{"gitId":"bnjm2000"},"content":" assertArrayEquals(expectedGenres, book.getGenre());","lastModifiedDate":"2023-10-16"},{"lineNumber":192,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":193,"author":{"gitId":"bnjm2000"},"content":" @Test","lastModifiedDate":"2023-10-16"},{"lineNumber":194,"author":{"gitId":"bnjm2000"},"content":" public void testCreateBookInvalidId() {","lastModifiedDate":"2023-10-16"},{"lineNumber":195,"author":{"gitId":"bnjm2000"},"content":" String[] args \u003d {\"not_a_number\", \"Sample Title\", \"Sample Author\", \"\", \"Sample ISBN\", \"Sample Genre\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":196,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":197,"author":{"gitId":"bnjm2000"},"content":" assertThrows(NumberFormatException.class, () -\u003e Parser.createBook(args));","lastModifiedDate":"2023-10-16"},{"lineNumber":198,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":199,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"000verflow":1,"bnjm2000":195,"yingx9":3}},{"path":"src/test/java/seedu/util/TestUtil.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"bnjm2000"},"content":"package seedu.util;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"bnjm2000"},"content":"import seedu.commands.Command;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"yingx9"},"content":"import seedu.data.Book;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.Resource;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"bnjm2000"},"content":"import seedu.data.SysLibException;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"bnjm2000"},"content":"import seedu.parser.Parser;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"bnjm2000"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"bnjm2000"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"yingx9"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"bnjm2000"},"content":"import java.util.List;","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"bnjm2000"},"content":"public class TestUtil {","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"bnjm2000"},"content":" public String getOutputMessage(Command c, String m) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"bnjm2000"},"content":" c.execute(m, parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"bnjm2000"},"content":" return outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"bnjm2000"},"content":" public String getOutputMessage(Command c, String m, List\u003cResource\u003e resourceList) throws SysLibException {","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"bnjm2000"},"content":" Parser parser \u003d new Parser();","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"bnjm2000"},"content":" parser.resourceList \u003d resourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"bnjm2000"},"content":" ByteArrayOutputStream outputStream \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"bnjm2000"},"content":" System.setOut(new PrintStream(outputStream));","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"bnjm2000"},"content":" c.execute(m, parser);","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"bnjm2000"},"content":" return outputStream.toString();","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"bnjm2000"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"bnjm2000"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"yingx9"},"content":" public static List\u003cResource\u003e fillTestList() {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"yingx9"},"content":" List\u003cResource\u003e testResourceList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"yingx9"},"content":" String[] genres \u003d {\"Horror\", \"Fiction\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"yingx9"},"content":" String[] genresAdventure \u003d {\"Adventure\"};","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"yingx9"},"content":" String[] genresNull \u003d {null};","lastModifiedDate":"2023-10-17"},{"lineNumber":39,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"yingx9"},"content":" Resource test1 \u003d new Resource(\"title1\", \"123123\");","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"yingx9"},"content":" Book testBook \u003d new Book(\"title2\", \"123123\", \"author\", genres, 123123);","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"yingx9"},"content":" Book testBook2 \u003d new Book(\"title3\", \"123123\", \"author\", genresAdventure, 123123);","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"yingx9"},"content":" Book testBook3 \u003d new Book(\"title3\", \"123123\", \"author\", genresNull, 123123);","lastModifiedDate":"2023-10-17"},{"lineNumber":44,"author":{"gitId":"yingx9"},"content":" testResourceList.add(test1);","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook);","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook2);","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"yingx9"},"content":" testResourceList.add(testBook3);","lastModifiedDate":"2023-10-17"},{"lineNumber":48,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-17"},{"lineNumber":49,"author":{"gitId":"yingx9"},"content":" return testResourceList;","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"yingx9"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":51,"author":{"gitId":"yingx9"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"bnjm2000"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"bnjm2000":32,"yingx9":20}}] diff --git a/AY2324S1-CS2113T-W11-1_tp_master/commits.json b/AY2324S1-CS2113T-W11-1_tp_master/commits.json index c9b235d..9295b0d 100644 --- a/AY2324S1-CS2113T-W11-1_tp_master/commits.json +++ b/AY2324S1-CS2113T-W11-1_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"000verflow":[{"date":"2023-10-06","commitResults":[{"hash":"40c098fcf74b1c2282447f9113b643a766c328d3","isMergeCommit":false,"messageTitle":"Add ashokbalaji-aboutus","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":1}}},{"hash":"ba10e507f38769c43a032bf8f9367a09dce03291","isMergeCommit":false,"messageTitle":"Add userguide draft","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":99,"deletions":23}}}]},{"date":"2023-10-11","commitResults":[{"hash":"d051634250466c7164160a7fddeb56f1762e79a3","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into YingXia-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7b3caa8286c5e5afd39596c9d37aaa83da139f3e","isMergeCommit":true,"messageTitle":"Merge pull request #2 from yingx9/YingXia-AboutUs","messageBody":"Update AboutUs.md and add Portfolio Page","fileTypesAndContributionMap":{}},{"hash":"ce04bd2fd92aa288fc50505baa20550cef504563","isMergeCommit":true,"messageTitle":"Merge pull request #5 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-userguide","messageBody":"Add userguide draft","fileTypesAndContributionMap":{}},{"hash":"bd25c10208589cf71225db3fa2e85eb80cf14e72","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2eb93ed11019095c9d83522d710cff1951ff90ee","isMergeCommit":true,"messageTitle":"Merge pull request #3 from DavinciDelta/WuXingyu-AboutUs","messageBody":"Add WuXingyu-AboutUs","fileTypesAndContributionMap":{}},{"hash":"da93b03bf043240cb13cd891d3f7d5ba034f221d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-AshokBalaji-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"751016df50864854566f9a6f330cc416719f3f8c","isMergeCommit":true,"messageTitle":"Merge pull request #4 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-AboutUs","messageBody":"Add ashokbalaji-aboutus","fileTypesAndContributionMap":{}},{"hash":"fbcd9e994f8f6d371570e0837d0b9df5d55e0a65","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"6e0c5086aa5ce4c4ef524b1109975395f85b10ec","isMergeCommit":true,"messageTitle":"Merge pull request #6 from bnjm2000/master","messageBody":"Add Benjamin-AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"7ac4de161937c8f68caedf661d33ac2743bce93f","isMergeCommit":false,"messageTitle":"Revert \"Add code from AddressBook\"","messageBody":"This reverts commit 24a54a13e9bff5754c97196f670acb1db3f9c3fe.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1937}}},{"hash":"15df575857850f9910d1277c039fd733830fde91","isMergeCommit":false,"messageTitle":"Add UI Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":61,"deletions":11}}},{"hash":"9598cd960fd0593f0decb94a2ad3150e18b70383","isMergeCommit":false,"messageTitle":"Update UI package","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":12}}},{"hash":"cbd5935ccf882033ad0b08db364596550f560f60","isMergeCommit":false,"messageTitle":"Rename Ui.java to UI.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"dbd0e6f0e289653a11048a5d9c19c7a444448864","isMergeCommit":false,"messageTitle":"Update UI package bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":11}}},{"hash":"9a1adb0d5f9728d7fd6ddf0eb857fe41242adf24","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-AshokBalaji-UI-class\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into branch-AshokBalaji-UI-class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"61cfb3cce6305613102703e161b14a648269c2a3","isMergeCommit":false,"messageTitle":"Update UI package bug","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"7e4f3fe7f71a7459f1bd36c678648852307f3437","isMergeCommit":false,"messageTitle":"Update tests and fix package structure","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":14},"other":{"insertions":22,"deletions":22}}},{"hash":"234d4f7e45be31af96739a72dbc38e756ac6e307","isMergeCommit":true,"messageTitle":"Merge pull request #22 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-UI-class","messageBody":"Add UI Class","fileTypesAndContributionMap":{}},{"hash":"11762124503a2c817f64b4270a43e8aacf3f413d","isMergeCommit":true,"messageTitle":"Merge pull request #23 from bnjm2000/add_portfolio","messageBody":"Add portfolio and updated README.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"53cf6f5c45786d68a96b75e355f9b23f4e85d942","isMergeCommit":false,"messageTitle":"Add FindCommand class","messageBody":"Refactored structure as well\n","fileTypesAndContributionMap":{"functional-code":{"insertions":107,"deletions":7},"other":{"insertions":3,"deletions":4}}},{"hash":"e47758599f53faae99cd80ef54ce1645c93bd29e","isMergeCommit":true,"messageTitle":"Merge pull request #33 from JoanneJo/JoanneAng-TagResource","messageBody":"Add Tag Function","fileTypesAndContributionMap":{}},{"hash":"8bfd4312374db9102e7007cac4eb3d716c3533b4","isMergeCommit":true,"messageTitle":"Merge pull request #34 from yingx9/YingXia-ListBySpecificArguments","messageBody":"Update Listing by specific filters for ListCommand.Java","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"c506bdc66a04030dcab18d1d8558dfe23fec32c2","isMergeCommit":false,"messageTitle":"Add Junit tests for FindCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":19},"test-code":{"insertions":126,"deletions":1}}},{"hash":"ecdbae3f3a74ddc3de8d01da6cc64fe1a557ff7b","isMergeCommit":false,"messageTitle":"Add logging and java assertions to FindCommand class, updated FindCommandTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":3},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-26","commitResults":[{"hash":"0643b459f813d1557ce46b3d1f313e42921a2afe","isMergeCommit":false,"messageTitle":"Update FindCommand with new parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":29},"test-code":{"insertions":0,"deletions":11}}},{"hash":"f2321f49afd6722491ed22ce65cf805c4856bf35","isMergeCommit":true,"messageTitle":"Merge pull request #72 from 000verflow/branch-AshokBalaji-UpdateFindCommand","messageBody":"Update FindCommand with new parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"3669b239dc0f2e56b1ac7d0fec9418ab1ef9e5bd","isMergeCommit":false,"messageTitle":"Add find command details on DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":69,"deletions":4}}}]}],"bnjm2000":[{"date":"2023-10-09","commitResults":[{"hash":"efad7d965c627a182d0c515fbcf8bd652d5f7b75","isMergeCommit":false,"messageTitle":"Add Benjamin-AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}}]},{"date":"2023-10-11","commitResults":[{"hash":"11fbaf7ff4a1c16bd6e857e1bfd19094d43fbfb9","isMergeCommit":false,"messageTitle":"Add portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":0}}},{"hash":"f98ad3ecdb9bf4a008479b664430633fe6aee154","isMergeCommit":false,"messageTitle":"Fix portfolio link","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-14","commitResults":[{"hash":"ff6ecc4e701b239a826fcd503989cca981a38809","isMergeCommit":false,"messageTitle":"Add portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":10,"deletions":9}}},{"hash":"c5bb57406ed0171f9b20242b11d01e4955ec7839","isMergeCommit":true,"messageTitle":"Merge pull request #25 from AY2324S1-CS2113T-W11-1/WuXingyu-Resource","messageBody":"Add Resource class","fileTypesAndContributionMap":{}},{"hash":"fee0f659873ca0be326386c791db3e379df73714","isMergeCommit":false,"messageTitle":"Add HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":1}}},{"hash":"a01128ec5feae99924bb3c327d94bba7e5d9a31d","isMergeCommit":false,"messageTitle":"Fix ExitCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":3}}},{"hash":"243fa1457017b73e4edbd1929fadadd779e2de01","isMergeCommit":false,"messageTitle":"Changed unknown command message.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3806b18ebb2a19a8bb7a2012027cda0f2f705459","isMergeCommit":false,"messageTitle":"Moved help message to UI class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":8}}},{"hash":"4f172b206ce42c544432438b8384906a12d5dc98","isMergeCommit":true,"messageTitle":"Merge pull request #29 from yingx9/YingXia-UpdateListCommand","messageBody":"Update ListCommand and edit Resource and Book","fileTypesAndContributionMap":{}},{"hash":"8d3ec47b216a8ecce72971e1286cd5c7816e3e0d","isMergeCommit":false,"messageTitle":"Changed syntax to \"exit\" and updated test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-15","commitResults":[{"hash":"41e96d180eea8819810b89f4972503658bc58533","isMergeCommit":true,"messageTitle":"Merge pull request #31 from JoanneJo/JoanneAng-AddCommand","messageBody":"Update AddCommand.java and Add SysLibException.java","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"7ff86171a0fd13c77b3cf121db7fe6884d0b3d86","isMergeCommit":false,"messageTitle":"Add Junit testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":183,"deletions":0}}},{"hash":"b567bf5aa32fe02c4fd1dfb89a7015f775c830c5","isMergeCommit":false,"messageTitle":"Add more Junit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":75,"deletions":2}}},{"hash":"307dadb3f1cadb6f4656b5a341d45ea46c7e249a","isMergeCommit":false,"messageTitle":"Fix checkstye","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":26,"deletions":17}}},{"hash":"86cf0bf0f325391532da1bcc682d06a7ad6362d6","isMergeCommit":false,"messageTitle":"Fix checks not working on Windows","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":35,"deletions":33}}},{"hash":"d6f62f5ccc65e022901ad84f3267897d80378000","isMergeCommit":true,"messageTitle":"Merge pull request #39 from yingx9/YingXia-UpdateUserGuide","messageBody":"Update UserGuide.md for List and minor change to ListCommand","fileTypesAndContributionMap":{}},{"hash":"bae7e026d74680fe4a0047fa954ce271f2bffaba","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into add_Junit","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Update UserGuide.md for List and minor change to ListCommand\n","fileTypesAndContributionMap":{}},{"hash":"3e910fc9d53b77f127940bc75640b25da44f6808","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":13}}},{"hash":"db5883414825e7a5e441ce1878551dd7d555d7d2","isMergeCommit":false,"messageTitle":"Fix comment indentation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":11,"deletions":11}}},{"hash":"83d05e7e51521c14924622be0f8d0597145b6eb5","isMergeCommit":false,"messageTitle":"Fix Try #1","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":11,"deletions":11}}},{"hash":"a81d766d11a375879c1f602842828531a8604d25","isMergeCommit":false,"messageTitle":"Add TestUtil and corrected Junit","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":40,"deletions":3}}},{"hash":"48875226e1bf55b48404da72ad34eab3eec785d4","isMergeCommit":true,"messageTitle":"Merge pull request #40 from yingx9/YingXia-UpdateListPrinting","messageBody":"Update ListCommand to use lineSeparator() and add more checks","fileTypesAndContributionMap":{}},{"hash":"affd9379953ddff889923ab527eedcb8736d6536","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":6}}},{"hash":"08a718177bfc3197280e2e6a5f1b74c34478186e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into add_Junit","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Fix lines to not exceed 120 characters for coding standard\n Update ListCommand to use lineSeparator() and add more checks\n","fileTypesAndContributionMap":{}},{"hash":"dda3ca33533312deceb333e38d5eb526948abdb1","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":2}}},{"hash":"e47ca19cf52aedb1ee571f7ae8ac7cae8fe4717d","isMergeCommit":false,"messageTitle":"Fix Windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":1}}},{"hash":"04906e63ebf2b3be29a4f8cd076683ee9d5777f6","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"test-code":{"insertions":1,"deletions":1}}},{"hash":"09ad6907d3798658b4b35994f88bd432abb995b9","isMergeCommit":false,"messageTitle":"Fix failed test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"a378b1122c47e5682c500f7615e125ef6e580665","isMergeCommit":false,"messageTitle":"Fix code to have better consistency","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":20},"test-code":{"insertions":30,"deletions":16}}},{"hash":"4586311a7acee699ecf66d65ab4402c569af92f3","isMergeCommit":true,"messageTitle":"Merge pull request #41 from yingx9/YingXia-AddListCommandTest","messageBody":"Add jUnit tests for ListCommand","fileTypesAndContributionMap":{}},{"hash":"0d98a06f824e5fa388728e538a12933f4cb95efb","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into BenjaminNg_consistency","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Update EXPECTED.TXT and input.txt for testing\n Fix windows error\n Fix check style error\n Add jUnit tests for ListCommand\n","fileTypesAndContributionMap":{}},{"hash":"816feeda7fb4686d2872e332338372a28eb35064","isMergeCommit":false,"messageTitle":"Fix checks after merge","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3},"test-code":{"insertions":21,"deletions":5}}},{"hash":"2d31c5b83d50f5c0c1cca48f588661ac6a44e6d0","isMergeCommit":false,"messageTitle":"Fix failed test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"1171880f0dfcbe51c57f3c8c2ed253170606ea19","isMergeCommit":false,"messageTitle":"Fix failed checks","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-17","commitResults":[{"hash":"97bad5aea57f5f451ee8ca636e72807e15defeb3","isMergeCommit":false,"messageTitle":"Fix helpCommand to be consistent with UG","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":5},"docs":{"insertions":1,"deletions":1},"test-code":{"insertions":19,"deletions":13}}},{"hash":"969c6d2ed053ae8345ad0b5367f9ff113879b550","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into BenjaminNg_FixHelpCommand","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Fix failed checks\n Fix failed test\n Fix checks after merge\n Fix code to have better consistency\n\n# Conflicts:\n#\tsrc/main/java/seedu/ui/UI.java\n#\tsrc/test/java/seedu/commands/HelpCommandTest.java\n#\tsrc/test/java/seedu/parser/ParserTest.java\n#\ttext-ui-test/EXPECTED.TXT\n","fileTypesAndContributionMap":{}},{"hash":"7f270f77a3b68d595ddb92c68f1aa96dc0e3c1f8","isMergeCommit":false,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":10},"test-code":{"insertions":0,"deletions":24}}},{"hash":"b44806541a1a31074bc32d9a7f54bc3b3daa2ff1","isMergeCommit":true,"messageTitle":"Merge pull request #45 from yingx9/YingXia-FixNullGenreBug","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"256dfd39999328567020cbfe6bbcff0b4730de0b","isMergeCommit":true,"messageTitle":"Merge pull request #46 from yingx9/YingXia-UpdateListGenre","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"effcd9da28de13988cba3b1caab69dd2f2e5b1bd","isMergeCommit":true,"messageTitle":"Merge pull request #51 from yingx9/YingXia-AddListCommandAssertion","messageBody":"Add assertion to ensure ListCommand works as intended","fileTypesAndContributionMap":{}},{"hash":"1e6825dff3c2f6d0aae77ec5048dac06227f015e","isMergeCommit":true,"messageTitle":"Merge pull request #53 from 000verflow/Add-Assertions-Logging-FindCommand","messageBody":"Add logging and java assertions to FindCommand class","fileTypesAndContributionMap":{}},{"hash":"3733b72dc6d2b395228ddd7a872b80f5686f534c","isMergeCommit":false,"messageTitle":"Add assert and logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":64,"deletions":4}}}]},{"date":"2023-10-26","commitResults":[{"hash":"5016c2e6074261fc5964ddfff0f7eb27d96cd571","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":56,"deletions":12}}},{"hash":"fe18b54784d8ad6cefddd54f43b9dfc4d95e44bd","isMergeCommit":false,"messageTitle":"Add help and bye manual testing","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":1}}},{"hash":"226408b08990865f86550c15a9c1128e24490679","isMergeCommit":true,"messageTitle":"Merge pull request #75 from yingx9/YingXia-UpdateListDG","messageBody":"Update ListCommand and List Implementation of DG","fileTypesAndContributionMap":{}}]}],"JoanneJo":[{"date":"2023-10-04","commitResults":[{"hash":"d4b23856f14360e5e02b8b48f1fa8d867104aa99","isMergeCommit":false,"messageTitle":"Add personal details to AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-05","commitResults":[{"hash":"74ce9366bfeba2e78b22b08db06017a574898712","isMergeCommit":false,"messageTitle":"Update AboutUs.md and Add JoanneAng.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-15","commitResults":[{"hash":"6642630870c3a7e6899d35768f20336136f8ba75","isMergeCommit":false,"messageTitle":"Update AddCommand.java and Add SysLibException.java","messageBody":"Updated UserGuide.md so that all commands are\nusing the same tags for the same type of data.\nUI.java is therefore edited to standardize the\nhelp message.\n\nModified Book.java to remove synopsis from the\nobject and add genres. toString() is modified to\ndisplay genres.\n\nImplemented the add command to add books to the\nresource list. Validated user input for add command.\n\nChanged the naming of taskList to resourceList and\nadded SysLibException.java. Hence, edited\nCommand.java, DeleteCommand.java, ListCommand.java,\nand Parser.java.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":102,"deletions":39},"docs":{"insertions":33,"deletions":26}}},{"hash":"97f427ecac516acd184a6a24eb9aa5a62c8bd731","isMergeCommit":false,"messageTitle":"Update Book.java, AddCommand.java, and Parser.java","messageBody":"Updated to pass the checks.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":9}}},{"hash":"a6eb7919209e44ae45ed5fdab02d2447a377ddcd","isMergeCommit":false,"messageTitle":"Add Tag Function","messageBody":"Added tag function to identify and specify the\ntype of resources added.\n\nModified parseAddCommand method to be more generic.\nAdded parsing and validation methods for adding\nbooks.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":105,"deletions":59},"docs":{"insertions":2,"deletions":2}}},{"hash":"eb76d7512bd86add4df324bc90fb72ccb28a838c","isMergeCommit":false,"messageTitle":"Update AddCommand.java and Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":6}}},{"hash":"0d7af8aebc811a4ff9b851c0e322996edf43dc96","isMergeCommit":false,"messageTitle":"Update UserGuide.md and Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-16","commitResults":[{"hash":"834fcdd733a92644b85cc8a507de7bbfd736d321","isMergeCommit":true,"messageTitle":"Merge pull request #35 from DavinciDelta/WuXingyu-DeleteCommand","messageBody":"Add Delete Command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"38a8d4706b95c1b71e8ed427ef64e64b0448d972","isMergeCommit":true,"messageTitle":"Merge pull request #49 from 000verflow/Add-FindCommandTest","messageBody":"Add Junit tests for FindCommand","fileTypesAndContributionMap":{}},{"hash":"3dc4400af9db7c3713fa071647fb9d32baf5181d","isMergeCommit":true,"messageTitle":"Merge pull request #50 from DavinciDelta/WuXingyu-DeleteTesting","messageBody":"Add DeleteCommand Testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"dd157775f08701fc6a2945c72d7ddd4eccb29665","isMergeCommit":true,"messageTitle":"Merge pull request #55 from yingx9/YingXia-UpdateListCommandParsing","messageBody":"Update logic and code quality of ListCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"ed7a3cc3a2b98b526a8b2901e6eac90a58555271","isMergeCommit":false,"messageTitle":"Add AddCommand JUnit Tests","messageBody":"Added addCommand JUnit tests to AddCommandTest.java.\nUpdated Book.java and Parser.java.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0},"test-code":{"insertions":58,"deletions":0}}},{"hash":"2c2e658a363c148a823aa30b74af030c1015aace","isMergeCommit":false,"messageTitle":"Update Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":3}}}]},{"date":"2023-10-26","commitResults":[{"hash":"68271b08f8aa57213e668aef11dd07b64b33fb19","isMergeCommit":true,"messageTitle":"Merge pull request #71 from yingx9/YingXia-DGPlantUml","messageBody":"Repurpose style, architecture.puml from Addressbook","fileTypesAndContributionMap":{}},{"hash":"c83c8d24dbe24a1d92dfa2a5cc07c32ce8ea3e53","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"Added on to the developer guide and included parts\nfor the add feature.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5},"docs":{"insertions":172,"deletions":3}}}]}],"DavinciDelta":[{"date":"2023-10-05","commitResults":[{"hash":"20d84b8a2deaed74e86d4c49ff90766db2fd1d7d","isMergeCommit":false,"messageTitle":"Add AboutUs","messageBody":"Included my own about us\n","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":1}}}]},{"date":"2023-10-13","commitResults":[{"hash":"f816d329501fbc059fac7bc29b8449c0aa6d39ff","isMergeCommit":false,"messageTitle":"Basic abstract Command","messageBody":"Included the basic abstract command for reference, with delete code implemented\n","fileTypesAndContributionMap":{"functional-code":{"insertions":117,"deletions":0}}},{"hash":"c97d2cec899d51e82fa979133c029d496a59bb91","isMergeCommit":false,"messageTitle":"Revert \"Basic abstract Command\"","messageBody":"This reverts commit f816d329501fbc059fac7bc29b8449c0aa6d39ff.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":117}}}]},{"date":"2023-10-14","commitResults":[{"hash":"66cb8f164903cc7b8dd1c4e2f37449f49b783a53","isMergeCommit":true,"messageTitle":"Merge pull request #19 from yingx9/WuXingYu-BasicStructure","messageBody":"Add XingYu\u0027s Command and Parser from iP project","fileTypesAndContributionMap":{}},{"hash":"fae2e8bde57a2bcdca664f910751520047b3cb86","isMergeCommit":false,"messageTitle":"Add resource","messageBody":"Include resource class with book class.\n\nInclude basic add and list commands for testing\n","fileTypesAndContributionMap":{"functional-code":{"insertions":115,"deletions":3}}},{"hash":"d168a5972836ae6563d2c2ff0f4dc4500e17bfb8","isMergeCommit":true,"messageTitle":"Merge from master","messageBody":"Include changes from master\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"18ae4568148b6a244a6954b2d645a6396383d92e","isMergeCommit":false,"messageTitle":"Add Delete Command","messageBody":"Added the delete command with it\u0027s parser\n","fileTypesAndContributionMap":{"functional-code":{"insertions":52,"deletions":8}}}]},{"date":"2023-10-17","commitResults":[{"hash":"4b21bf920d2abd9b8d5ca763b6cb16a40a87e5ff","isMergeCommit":false,"messageTitle":"Add general validate and parse function","messageBody":"Include a validate and parse function that can be used for all command to decrease complexity of code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":3}}},{"hash":"460604675bb122c09dd57d41481aad943423a7d2","isMergeCommit":false,"messageTitle":"Remove print statements","messageBody":"Remove debugging print statements\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"9c24aadd4353ff76d44e33afc61d3d758704f474","isMergeCommit":false,"messageTitle":"Update Command","messageBody":"Remove redundant code and improve style\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"4d4e242a5a8b83bfae05457a81c2ae027d999c3b","isMergeCommit":false,"messageTitle":"Add DeleteCommand Testing","messageBody":"Included J unit testing for DeleteComand\n","fileTypesAndContributionMap":{"test-code":{"insertions":46,"deletions":0}}},{"hash":"862395cfe14800213003b307dcf087084245681f","isMergeCommit":false,"messageTitle":"Update DeleteCommandTest.java","messageBody":"Updated DeleteCommandTest\n","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":17}}},{"hash":"92e2f73b5371af344b6816b12e4013c4800300e6","isMergeCommit":false,"messageTitle":"Remove redundant imports","messageBody":"Removed redundant imports to improve clarity\n","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}},{"hash":"360606f9d100648710f69f6c9b8ed59e9da91041","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-ParsingAbstraction","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"dae3e42c416444c4b6515a99bdb72c4b35e06356","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-ParsingAbstraction","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"29d5789812c41805fbd1bab9a073d8baa2881793","isMergeCommit":false,"messageTitle":"Update validate and parsing","messageBody":"Update parsing into abstract Command class\n","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":27}}},{"hash":"7b07b79090bec34138f9cd269e9a17594cd4994c","isMergeCommit":false,"messageTitle":"Update style","messageBody":"Remove redundant imports\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"e2f835aeff05274f1bc1177563fd2ab439494762","isMergeCommit":false,"messageTitle":"Update AddCommand","messageBody":"Changed AddCommand isbn to i\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"bd37b380149d2f2f85f500c4d6da73dbe40e3fc3","isMergeCommit":false,"messageTitle":"Update genre","messageBody":"Change genre for add command\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2240d9c6cdeaa91c620056f02f8f3af007701523","isMergeCommit":false,"messageTitle":"Improve validation","messageBody":"Included more validation checks for duplicate arguments\n\nAllow for aliasing for arguments\n","fileTypesAndContributionMap":{"functional-code":{"insertions":62,"deletions":15}}},{"hash":"da37d39f6e07a7a4d0171c5109158a737e7e91b0","isMergeCommit":false,"messageTitle":"Fix validator","messageBody":"Prevent clash of metacharacters in strings and capital letters with validator\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-23","commitResults":[{"hash":"9ca77c1f5398f3ee3e36892e95d939757a18b035","isMergeCommit":true,"messageTitle":"Merge pull request #65 from JoanneJo/JoanneAng-AddCommandJUnit","messageBody":"Add AddCommand JUnit Tests","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"f1c67d44a0c3306c28b454edfa5cc578ae3b17d9","isMergeCommit":true,"messageTitle":"Merge pull request #66 from yingx9/YingXia-EnableAssertion","messageBody":"Enable assertions in Gradle","fileTypesAndContributionMap":{}},{"hash":"fcbdbe6b9e56b76f011dd1383e5ebf1fd8d11eb6","isMergeCommit":false,"messageTitle":"Include assertion in DeleteCommand","messageBody":"Include a generic assertion for deleteCommand\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"c90927f278161ceb6bd90171ff4431ab5a81ddb7","isMergeCommit":true,"messageTitle":"Merge branch \u0027AddAssertion\u0027 into UpdateDeveloperGuide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"85745dae00595ea292ea6bbc4b30c74c43f49ba0","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"Update the developer guide with the basic information\n","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":6}}}]}],"yingx9":[{"date":"2023-10-04","commitResults":[{"hash":"d2a39c983b779d162587aa54cdcc043d19acb42b","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-05","commitResults":[{"hash":"b1a23ae973590faec4fa49548e661798cddc354c","isMergeCommit":false,"messageTitle":"Update AboutUs.md and add Portfolio Page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}}]},{"date":"2023-10-11","commitResults":[{"hash":"34113bf6369cf3e72c81bad632b546565825c15e","isMergeCommit":true,"messageTitle":"Merge pull request #1 from JoanneJo/JoanneAng-AboutUs","messageBody":"Add personal details to AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"24a54a13e9bff5754c97196f670acb1db3f9c3fe","isMergeCommit":false,"messageTitle":"Add code from AddressBook","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1937,"deletions":0}}},{"hash":"4c73795256c18d337edb3cd0d8fd6e5e95854417","isMergeCommit":true,"messageTitle":"Merge pull request #16 from yingx9/YingXia-AddressBook","messageBody":"Add code from AddressBook","fileTypesAndContributionMap":{}},{"hash":"8fdb83fc66cf61cec1707849a12140f63547934c","isMergeCommit":false,"messageTitle":"Add XingYu\u0027s Command and Parser from iP project","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":125,"deletions":0}}},{"hash":"bffe4d35fbfddbd14885722e201bf230cd6a9453","isMergeCommit":false,"messageTitle":"Update ListCommand and edit Resource and Book","messageBody":"As Resource is a generic class, Book can inherit and override\ntoString to print its own specific details\n\nHence,\nResource.java: Add toString method to be overridden by Book\nBook.java: Override parent toString method\n","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":5},"docs":{"insertions":1,"deletions":1}}},{"hash":"6dcad7eeea645efabb2c7991d22053542764e697","isMergeCommit":true,"messageTitle":"Merge pull request #27 from bnjm2000/add_HelpCommand","messageBody":"Add HelpCommand","fileTypesAndContributionMap":{}},{"hash":"8ebfcaf95769d42cdf6ff8effed30582b2abbf09","isMergeCommit":true,"messageTitle":"Merge pull request #28 from bnjm2000/add_ExitCommand","messageBody":"Add ExitCommand","fileTypesAndContributionMap":{}},{"hash":"8336568d113cb4e16f4c7936c6d8254bc5d4ec2f","isMergeCommit":true,"messageTitle":"Merge pull request #30 from bnjm2000/add_ExitCommand","messageBody":"Change syntax to \"exit\" and updated test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"8365f041ce1578f5258123ae6f612456b752747f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from 000verflow/Add-FindCommand","messageBody":"Add FindCommand class","fileTypesAndContributionMap":{}},{"hash":"e961ad179fefc5fe022232e8efaf73bbb1065a45","isMergeCommit":false,"messageTitle":"Update Listing by specific filters for ListCommand.Java","messageBody":"Librarians may want an overview of resources by categories such\nas tag and genre\n\nHence, add filter methods to ListCommand to filter by Tag, Genre,\nor Both\n","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":8}}}]},{"date":"2023-10-16","commitResults":[{"hash":"ce80c867361f341512178783328995160bb24ca5","isMergeCommit":false,"messageTitle":"Update UserGuide.md for List and minor change to ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4},"docs":{"insertions":11,"deletions":8}}},{"hash":"8c30d1ef8dbba12f7d7807c9c6c3809726b2e1d4","isMergeCommit":false,"messageTitle":"Update ListCommand to use lineSeparator() and add more checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":11}}},{"hash":"ed23a422c3bc47ee6e56abb377be77f13c27e4bc","isMergeCommit":false,"messageTitle":"Fix lines to not exceed 120 characters for coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"69362cc4634c29603bcee3690e6ac5cf11f530c8","isMergeCommit":true,"messageTitle":"Merge pull request #38 from bnjm2000/add_Junit","messageBody":"Add Junit","fileTypesAndContributionMap":{}},{"hash":"4e21bd1fc5c7dcf2ef84b90dd6e05e481e5b48f3","isMergeCommit":false,"messageTitle":"Add jUnit tests for ListCommand","messageBody":"To ensure ListCommand is works as intended, add tests such as:\n1. Ensure list does not crash SysLib if executed when there are no\nresources\n2. Ensure missing values for tag and genre filter throws exception\n3. Ensure listing with filters does not crash SysLib if there are\nno found resources matching filters\n","fileTypesAndContributionMap":{"test-code":{"insertions":101,"deletions":0}}},{"hash":"b62afec7114450326fdb9237456383a9845f62dd","isMergeCommit":false,"messageTitle":"Fix check style error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":13}}},{"hash":"871ae927c0777d5e302d720cf8a377459bac1304","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"446c9c1b9d6b76ce5b9b366d67eba021b3075894","isMergeCommit":true,"messageTitle":"Merge pull request #42 from bnjm2000/BenjaminNg_consistency","messageBody":"Fix consistency","fileTypesAndContributionMap":{}},{"hash":"61bca2d384d09bf9fce54fd2e5a13fa913fb028b","isMergeCommit":false,"messageTitle":"Fix bug where listing by genre crashes SysLib","messageBody":"When a book is added without a genre, SysLib crashes when listing\nby genre\n\nHence add a check to hasGenre method to return false when a book has\nno genre\n\nNote in future developments, if createBook changes its method of\ncreating genres array, this fix has to be updated\n","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0},"test-code":{"insertions":4,"deletions":1}}},{"hash":"8efd8319a62d5e716070bf29aadaa27690a176de","isMergeCommit":true,"messageTitle":"Merge pull request #44 from bnjm2000/BenjaminNg_FixHelpCommand","messageBody":"Fix HelpCommand","fileTypesAndContributionMap":{}},{"hash":"94f1c1b220672138c830e6ab79721ce84c1eb3da","isMergeCommit":false,"messageTitle":"Fix bug where multiple genres causes list filter to not work","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":7}}},{"hash":"7277e0d587c97e762d22c5a1e829b859b648b9b8","isMergeCommit":false,"messageTitle":"Update method of checking genre again for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":4}}},{"hash":"ea49ab338b61b8cf5cdb56c7e4b3679a1b1a91b7","isMergeCommit":false,"messageTitle":"Add assertion to ensure ListCommand works as intended","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"5eb00e5f0f4e350a35924a1cb0fe5faa6d6201e6","isMergeCommit":true,"messageTitle":"Merge pull request #54 from bnjm2000/BenjaminNg_addAssertandLogging","messageBody":"Add assert and logging for HelpCommand and ExitCommand","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"d25c9b66e18042f05cf523e9875bdd7eba9be49d","isMergeCommit":true,"messageTitle":"Merge pull request #47 from DavinciDelta/WuXingyu-ParsingAbstraction","messageBody":"Add general validate and parse function","fileTypesAndContributionMap":{}},{"hash":"8e0d91820deea617c37ecaf1dfc69fefade72c9a","isMergeCommit":false,"messageTitle":"Update logic and code quality of ListCommand","messageBody":"There are also many repeats of System.lineSeparator + \"------\" etc\n\nHence update constant LINEDIVIDER in UI class to be public, and add\nSEPARATOR_LINEDIVIDER constant for use to tidy up code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":107,"deletions":129},"test-code":{"insertions":14,"deletions":13}}}]},{"date":"2023-10-23","commitResults":[{"hash":"8507b3cd0107300ca6e7645b7ea6b0d311e5b9d2","isMergeCommit":false,"messageTitle":"Enable assertions in Gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-24","commitResults":[{"hash":"41ef8d4d05c823217fd470fd2b0d5ce75cc9b755","isMergeCommit":true,"messageTitle":"Merge pull request #68 from DavinciDelta/AddAssertion","messageBody":"Include assertion in DeleteCommand","fileTypesAndContributionMap":{}},{"hash":"b36525d5ee13cdc1f2ef8fb4a9472930658ca9b1","isMergeCommit":true,"messageTitle":"Merge pull request #69 from DavinciDelta/UpdateDeveloperGuide","messageBody":"Update developer guide","fileTypesAndContributionMap":{}},{"hash":"7b8ffa67e21258e44d6123138f6526cf6ec70478","isMergeCommit":false,"messageTitle":"Repurpose style, architecture.puml from Addressbook","messageBody":"Add a draft architecture diagram\n","fileTypesAndContributionMap":{"docs":{"insertions":110,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"0aea8979e3591fdba501ce8032615bd126a1555c","isMergeCommit":false,"messageTitle":"Add more structure to the Developer\u0027s Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":26,"deletions":0}}},{"hash":"b83bc4d4d00080b7f0ce0afc2896a051e7171889","isMergeCommit":false,"messageTitle":"Add Sequence Diagram for ListCommand","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":84,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"f09c1bf2895d25e06455027821024ce74864ead9","isMergeCommit":true,"messageTitle":"Merge pull request #74 from JoanneJo/JoanneAng-DeveloperGuide","messageBody":"Update DeveloperGuide.md","fileTypesAndContributionMap":{}},{"hash":"474936b9006df0c0a61054b29262af71487c4ffa","isMergeCommit":false,"messageTitle":"Update ListCommand and List Implementation of DG","messageBody":"Add a Messages class to format messages with frequently used\nline separators and dividers\n\nMove hasGenre to Resources class so it can be used for other purpose\n\nUpdate more details about ListCommand to DG\n","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":75},"docs":{"insertions":16,"deletions":6},"test-code":{"insertions":10,"deletions":11}}},{"hash":"59cae2daeb0fb11a82e05710e3f9f504f5748974","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"73265af04a474da052dbbe9cdda0066e4c0cf1a0","isMergeCommit":false,"messageTitle":"Fix ListCommandTest checkstyle error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":1}}},{"hash":"10159022ea4dc325910969bd62ba81407ec235cf","isMergeCommit":false,"messageTitle":"Update List DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":5}}},{"hash":"2d5ffa410ef7ee5a7a7dd822881d60585ac03a1e","isMergeCommit":true,"messageTitle":"Merge pull request #76 from bnjm2000/BenjaminNg-DG-Manual-Testing","messageBody":"Add more user stories as well as manual testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"e1ef61a3c639ad009ebfada3524d13be611ffb01","isMergeCommit":true,"messageTitle":"Merge pull request #77 from 000verflow/update-developer-guide","messageBody":"Add find command details on DG","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"000verflow":{"docs":155,"functional-code":198,"test-code":116},"bnjm2000":{"docs":83,"functional-code":104,"test-code":316},"JoanneJo":{"docs":187,"functional-code":151,"test-code":58},"DavinciDelta":{"docs":14,"functional-code":214,"test-code":31},"yingx9":{"docs":256,"functional-code":266,"test-code":96,"other":1}},"authorContributionVariance":{"000verflow":121518.336,"bnjm2000":12672.572,"JoanneJo":5522.0083,"DavinciDelta":2554.5056,"yingx9":119501.336},"authorDisplayNameMap":{"000verflow":"CS2113T-W11-1 VELU..LAJI","bnjm2000":"CS2113T-W11-1 BENJ..MING","JoanneJo":"CS2113T-W11-1 JOAN..LING","DavinciDelta":"CS2113T-W11-1 WU X..NGYU","yingx9":"CS2113T-W11-1 LOKE.. XIA"}} +{"authorDailyContributionsMap":{"000verflow":[{"date":"2023-10-06","commitResults":[{"hash":"40c098fcf74b1c2282447f9113b643a766c328d3","isMergeCommit":false,"messageTitle":"Add ashokbalaji-aboutus","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":1}}},{"hash":"ba10e507f38769c43a032bf8f9367a09dce03291","isMergeCommit":false,"messageTitle":"Add userguide draft","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":99,"deletions":23}}}]},{"date":"2023-10-11","commitResults":[{"hash":"d051634250466c7164160a7fddeb56f1762e79a3","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into YingXia-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"7b3caa8286c5e5afd39596c9d37aaa83da139f3e","isMergeCommit":true,"messageTitle":"Merge pull request #2 from yingx9/YingXia-AboutUs","messageBody":"Update AboutUs.md and add Portfolio Page","fileTypesAndContributionMap":{}},{"hash":"ce04bd2fd92aa288fc50505baa20550cef504563","isMergeCommit":true,"messageTitle":"Merge pull request #5 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-userguide","messageBody":"Add userguide draft","fileTypesAndContributionMap":{}},{"hash":"bd25c10208589cf71225db3fa2e85eb80cf14e72","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2eb93ed11019095c9d83522d710cff1951ff90ee","isMergeCommit":true,"messageTitle":"Merge pull request #3 from DavinciDelta/WuXingyu-AboutUs","messageBody":"Add WuXingyu-AboutUs","fileTypesAndContributionMap":{}},{"hash":"da93b03bf043240cb13cd891d3f7d5ba034f221d","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into branch-AshokBalaji-AboutUs","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"751016df50864854566f9a6f330cc416719f3f8c","isMergeCommit":true,"messageTitle":"Merge pull request #4 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-AboutUs","messageBody":"Add ashokbalaji-aboutus","fileTypesAndContributionMap":{}},{"hash":"fbcd9e994f8f6d371570e0837d0b9df5d55e0a65","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into master","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"6e0c5086aa5ce4c4ef524b1109975395f85b10ec","isMergeCommit":true,"messageTitle":"Merge pull request #6 from bnjm2000/master","messageBody":"Add Benjamin-AboutUs","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"7ac4de161937c8f68caedf661d33ac2743bce93f","isMergeCommit":false,"messageTitle":"Revert \"Add code from AddressBook\"","messageBody":"This reverts commit 24a54a13e9bff5754c97196f670acb1db3f9c3fe.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1937}}},{"hash":"15df575857850f9910d1277c039fd733830fde91","isMergeCommit":false,"messageTitle":"Add UI Class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":61,"deletions":11}}},{"hash":"9598cd960fd0593f0decb94a2ad3150e18b70383","isMergeCommit":false,"messageTitle":"Update UI package","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":12}}},{"hash":"cbd5935ccf882033ad0b08db364596550f560f60","isMergeCommit":false,"messageTitle":"Rename Ui.java to UI.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"dbd0e6f0e289653a11048a5d9c19c7a444448864","isMergeCommit":false,"messageTitle":"Update UI package bug","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":11}}},{"hash":"9a1adb0d5f9728d7fd6ddf0eb857fe41242adf24","isMergeCommit":true,"messageTitle":"Merge branch \u0027branch-AshokBalaji-UI-class\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into branch-AshokBalaji-UI-class","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"61cfb3cce6305613102703e161b14a648269c2a3","isMergeCommit":false,"messageTitle":"Update UI package bug","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":0,"deletions":0}}},{"hash":"7e4f3fe7f71a7459f1bd36c678648852307f3437","isMergeCommit":false,"messageTitle":"Update tests and fix package structure","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":14},"other":{"insertions":22,"deletions":22}}},{"hash":"234d4f7e45be31af96739a72dbc38e756ac6e307","isMergeCommit":true,"messageTitle":"Merge pull request #22 from AY2324S1-CS2113T-W11-1/branch-AshokBalaji-UI-class","messageBody":"Add UI Class","fileTypesAndContributionMap":{}},{"hash":"11762124503a2c817f64b4270a43e8aacf3f413d","isMergeCommit":true,"messageTitle":"Merge pull request #23 from bnjm2000/add_portfolio","messageBody":"Add portfolio and updated README.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"53cf6f5c45786d68a96b75e355f9b23f4e85d942","isMergeCommit":false,"messageTitle":"Add FindCommand class","messageBody":"Refactored structure as well\n","fileTypesAndContributionMap":{"functional-code":{"insertions":107,"deletions":7},"other":{"insertions":3,"deletions":4}}},{"hash":"e47758599f53faae99cd80ef54ce1645c93bd29e","isMergeCommit":true,"messageTitle":"Merge pull request #33 from JoanneJo/JoanneAng-TagResource","messageBody":"Add Tag Function","fileTypesAndContributionMap":{}},{"hash":"8bfd4312374db9102e7007cac4eb3d716c3533b4","isMergeCommit":true,"messageTitle":"Merge pull request #34 from yingx9/YingXia-ListBySpecificArguments","messageBody":"Update Listing by specific filters for ListCommand.Java","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"c506bdc66a04030dcab18d1d8558dfe23fec32c2","isMergeCommit":false,"messageTitle":"Add Junit tests for FindCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":19},"test-code":{"insertions":126,"deletions":1}}},{"hash":"ecdbae3f3a74ddc3de8d01da6cc64fe1a557ff7b","isMergeCommit":false,"messageTitle":"Add logging and java assertions to FindCommand class, updated FindCommandTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":34,"deletions":3},"test-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-26","commitResults":[{"hash":"0643b459f813d1557ce46b3d1f313e42921a2afe","isMergeCommit":false,"messageTitle":"Update FindCommand with new parser","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":29},"test-code":{"insertions":0,"deletions":11}}},{"hash":"f2321f49afd6722491ed22ce65cf805c4856bf35","isMergeCommit":true,"messageTitle":"Merge pull request #72 from 000verflow/branch-AshokBalaji-UpdateFindCommand","messageBody":"Update FindCommand with new parser","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"3669b239dc0f2e56b1ac7d0fec9418ab1ef9e5bd","isMergeCommit":false,"messageTitle":"Add find command details on DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":69,"deletions":4}}}]},{"date":"2023-10-29","commitResults":[{"hash":"66de33dd0fc52c63e97efd45452feb410fad335e","isMergeCommit":true,"messageTitle":"Merge pull request #84 from bnjm2000/BenjaminNg-UpdateUG","messageBody":"Add updates to UG","fileTypesAndContributionMap":{}}]}],"bnjm2000":[{"date":"2023-10-09","commitResults":[{"hash":"efad7d965c627a182d0c515fbcf8bd652d5f7b75","isMergeCommit":false,"messageTitle":"Add Benjamin-AboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}}]},{"date":"2023-10-11","commitResults":[{"hash":"11fbaf7ff4a1c16bd6e857e1bfd19094d43fbfb9","isMergeCommit":false,"messageTitle":"Add portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":0}}},{"hash":"f98ad3ecdb9bf4a008479b664430633fe6aee154","isMergeCommit":false,"messageTitle":"Fix portfolio link","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-14","commitResults":[{"hash":"ff6ecc4e701b239a826fcd503989cca981a38809","isMergeCommit":false,"messageTitle":"Add portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":10,"deletions":9}}},{"hash":"c5bb57406ed0171f9b20242b11d01e4955ec7839","isMergeCommit":true,"messageTitle":"Merge pull request #25 from AY2324S1-CS2113T-W11-1/WuXingyu-Resource","messageBody":"Add Resource class","fileTypesAndContributionMap":{}},{"hash":"fee0f659873ca0be326386c791db3e379df73714","isMergeCommit":false,"messageTitle":"Add HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":1}}},{"hash":"a01128ec5feae99924bb3c327d94bba7e5d9a31d","isMergeCommit":false,"messageTitle":"Fix ExitCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":17,"deletions":3}}},{"hash":"243fa1457017b73e4edbd1929fadadd779e2de01","isMergeCommit":false,"messageTitle":"Changed unknown command message.","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"3806b18ebb2a19a8bb7a2012027cda0f2f705459","isMergeCommit":false,"messageTitle":"Moved help message to UI class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":8}}},{"hash":"4f172b206ce42c544432438b8384906a12d5dc98","isMergeCommit":true,"messageTitle":"Merge pull request #29 from yingx9/YingXia-UpdateListCommand","messageBody":"Update ListCommand and edit Resource and Book","fileTypesAndContributionMap":{}},{"hash":"8d3ec47b216a8ecce72971e1286cd5c7816e3e0d","isMergeCommit":false,"messageTitle":"Changed syntax to \"exit\" and updated test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-15","commitResults":[{"hash":"41e96d180eea8819810b89f4972503658bc58533","isMergeCommit":true,"messageTitle":"Merge pull request #31 from JoanneJo/JoanneAng-AddCommand","messageBody":"Update AddCommand.java and Add SysLibException.java","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"7ff86171a0fd13c77b3cf121db7fe6884d0b3d86","isMergeCommit":false,"messageTitle":"Add Junit testing","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1},"test-code":{"insertions":183,"deletions":0}}},{"hash":"b567bf5aa32fe02c4fd1dfb89a7015f775c830c5","isMergeCommit":false,"messageTitle":"Add more Junit tests","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":75,"deletions":2}}},{"hash":"307dadb3f1cadb6f4656b5a341d45ea46c7e249a","isMergeCommit":false,"messageTitle":"Fix checkstye","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":26,"deletions":17}}},{"hash":"86cf0bf0f325391532da1bcc682d06a7ad6362d6","isMergeCommit":false,"messageTitle":"Fix checks not working on Windows","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":35,"deletions":33}}},{"hash":"d6f62f5ccc65e022901ad84f3267897d80378000","isMergeCommit":true,"messageTitle":"Merge pull request #39 from yingx9/YingXia-UpdateUserGuide","messageBody":"Update UserGuide.md for List and minor change to ListCommand","fileTypesAndContributionMap":{}},{"hash":"bae7e026d74680fe4a0047fa954ce271f2bffaba","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into add_Junit","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Update UserGuide.md for List and minor change to ListCommand\n","fileTypesAndContributionMap":{}},{"hash":"3e910fc9d53b77f127940bc75640b25da44f6808","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":13,"deletions":13}}},{"hash":"db5883414825e7a5e441ce1878551dd7d555d7d2","isMergeCommit":false,"messageTitle":"Fix comment indentation","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":11,"deletions":11}}},{"hash":"83d05e7e51521c14924622be0f8d0597145b6eb5","isMergeCommit":false,"messageTitle":"Fix Try #1","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":11,"deletions":11}}},{"hash":"a81d766d11a375879c1f602842828531a8604d25","isMergeCommit":false,"messageTitle":"Add TestUtil and corrected Junit","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":40,"deletions":3}}},{"hash":"48875226e1bf55b48404da72ad34eab3eec785d4","isMergeCommit":true,"messageTitle":"Merge pull request #40 from yingx9/YingXia-UpdateListPrinting","messageBody":"Update ListCommand to use lineSeparator() and add more checks","fileTypesAndContributionMap":{}},{"hash":"affd9379953ddff889923ab527eedcb8736d6536","isMergeCommit":false,"messageTitle":"Fix Checkstyle","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":6}}},{"hash":"08a718177bfc3197280e2e6a5f1b74c34478186e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into add_Junit","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Fix lines to not exceed 120 characters for coding standard\n Update ListCommand to use lineSeparator() and add more checks\n","fileTypesAndContributionMap":{}},{"hash":"dda3ca33533312deceb333e38d5eb526948abdb1","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":2}}},{"hash":"e47ca19cf52aedb1ee571f7ae8ac7cae8fe4717d","isMergeCommit":false,"messageTitle":"Fix Windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":1}}},{"hash":"04906e63ebf2b3be29a4f8cd076683ee9d5777f6","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"test-code":{"insertions":1,"deletions":1}}},{"hash":"09ad6907d3798658b4b35994f88bd432abb995b9","isMergeCommit":false,"messageTitle":"Fix failed test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"a378b1122c47e5682c500f7615e125ef6e580665","isMergeCommit":false,"messageTitle":"Fix code to have better consistency","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":20},"test-code":{"insertions":30,"deletions":16}}},{"hash":"4586311a7acee699ecf66d65ab4402c569af92f3","isMergeCommit":true,"messageTitle":"Merge pull request #41 from yingx9/YingXia-AddListCommandTest","messageBody":"Add jUnit tests for ListCommand","fileTypesAndContributionMap":{}},{"hash":"0d98a06f824e5fa388728e538a12933f4cb95efb","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into BenjaminNg_consistency","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Update EXPECTED.TXT and input.txt for testing\n Fix windows error\n Fix check style error\n Add jUnit tests for ListCommand\n","fileTypesAndContributionMap":{}},{"hash":"816feeda7fb4686d2872e332338372a28eb35064","isMergeCommit":false,"messageTitle":"Fix checks after merge","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":3},"test-code":{"insertions":21,"deletions":5}}},{"hash":"2d31c5b83d50f5c0c1cca48f588661ac6a44e6d0","isMergeCommit":false,"messageTitle":"Fix failed test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"1171880f0dfcbe51c57f3c8c2ed253170606ea19","isMergeCommit":false,"messageTitle":"Fix failed checks","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":3}}}]},{"date":"2023-10-17","commitResults":[{"hash":"97bad5aea57f5f451ee8ca636e72807e15defeb3","isMergeCommit":false,"messageTitle":"Fix helpCommand to be consistent with UG","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":5},"docs":{"insertions":1,"deletions":1},"test-code":{"insertions":19,"deletions":13}}},{"hash":"969c6d2ed053ae8345ad0b5367f9ff113879b550","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp into BenjaminNg_FixHelpCommand","messageBody":"* \u0027master\u0027 of https://github.com/AY2324S1-CS2113T-W11-1/tp:\n Fix failed checks\n Fix failed test\n Fix checks after merge\n Fix code to have better consistency\n\n# Conflicts:\n#\tsrc/main/java/seedu/ui/UI.java\n#\tsrc/test/java/seedu/commands/HelpCommandTest.java\n#\tsrc/test/java/seedu/parser/ParserTest.java\n#\ttext-ui-test/EXPECTED.TXT\n","fileTypesAndContributionMap":{}},{"hash":"7f270f77a3b68d595ddb92c68f1aa96dc0e3c1f8","isMergeCommit":false,"messageTitle":"Fix merge conflicts","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":10},"test-code":{"insertions":0,"deletions":24}}},{"hash":"b44806541a1a31074bc32d9a7f54bc3b3daa2ff1","isMergeCommit":true,"messageTitle":"Merge pull request #45 from yingx9/YingXia-FixNullGenreBug","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"256dfd39999328567020cbfe6bbcff0b4730de0b","isMergeCommit":true,"messageTitle":"Merge pull request #46 from yingx9/YingXia-UpdateListGenre","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"effcd9da28de13988cba3b1caab69dd2f2e5b1bd","isMergeCommit":true,"messageTitle":"Merge pull request #51 from yingx9/YingXia-AddListCommandAssertion","messageBody":"Add assertion to ensure ListCommand works as intended","fileTypesAndContributionMap":{}},{"hash":"1e6825dff3c2f6d0aae77ec5048dac06227f015e","isMergeCommit":true,"messageTitle":"Merge pull request #53 from 000verflow/Add-Assertions-Logging-FindCommand","messageBody":"Add logging and java assertions to FindCommand class","fileTypesAndContributionMap":{}},{"hash":"3733b72dc6d2b395228ddd7a872b80f5686f534c","isMergeCommit":false,"messageTitle":"Add assert and logging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":64,"deletions":4}}}]},{"date":"2023-10-26","commitResults":[{"hash":"5016c2e6074261fc5964ddfff0f7eb27d96cd571","isMergeCommit":false,"messageTitle":"no message","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":56,"deletions":12}}},{"hash":"fe18b54784d8ad6cefddd54f43b9dfc4d95e44bd","isMergeCommit":false,"messageTitle":"Add help and bye manual testing","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":1}}},{"hash":"226408b08990865f86550c15a9c1128e24490679","isMergeCommit":true,"messageTitle":"Merge pull request #75 from yingx9/YingXia-UpdateListDG","messageBody":"Update ListCommand and List Implementation of DG","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"14d7e50a5215ff6e3dfed92188ced624a631017c","isMergeCommit":false,"messageTitle":"Add updates to UG","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":96,"deletions":27}}},{"hash":"85830a26ef52ffe6b1b646cdad9d13b8fc6da1d5","isMergeCommit":false,"messageTitle":"Add update to UG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}}]}],"JoanneJo":[{"date":"2023-10-04","commitResults":[{"hash":"d4b23856f14360e5e02b8b48f1fa8d867104aa99","isMergeCommit":false,"messageTitle":"Add personal details to AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":7}}}]},{"date":"2023-10-05","commitResults":[{"hash":"74ce9366bfeba2e78b22b08db06017a574898712","isMergeCommit":false,"messageTitle":"Update AboutUs.md and Add JoanneAng.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-15","commitResults":[{"hash":"6642630870c3a7e6899d35768f20336136f8ba75","isMergeCommit":false,"messageTitle":"Update AddCommand.java and Add SysLibException.java","messageBody":"Updated UserGuide.md so that all commands are\nusing the same tags for the same type of data.\nUI.java is therefore edited to standardize the\nhelp message.\n\nModified Book.java to remove synopsis from the\nobject and add genres. toString() is modified to\ndisplay genres.\n\nImplemented the add command to add books to the\nresource list. Validated user input for add command.\n\nChanged the naming of taskList to resourceList and\nadded SysLibException.java. Hence, edited\nCommand.java, DeleteCommand.java, ListCommand.java,\nand Parser.java.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":102,"deletions":39},"docs":{"insertions":33,"deletions":26}}},{"hash":"97f427ecac516acd184a6a24eb9aa5a62c8bd731","isMergeCommit":false,"messageTitle":"Update Book.java, AddCommand.java, and Parser.java","messageBody":"Updated to pass the checks.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":9}}},{"hash":"a6eb7919209e44ae45ed5fdab02d2447a377ddcd","isMergeCommit":false,"messageTitle":"Add Tag Function","messageBody":"Added tag function to identify and specify the\ntype of resources added.\n\nModified parseAddCommand method to be more generic.\nAdded parsing and validation methods for adding\nbooks.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":105,"deletions":59},"docs":{"insertions":2,"deletions":2}}},{"hash":"eb76d7512bd86add4df324bc90fb72ccb28a838c","isMergeCommit":false,"messageTitle":"Update AddCommand.java and Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":6}}},{"hash":"0d7af8aebc811a4ff9b851c0e322996edf43dc96","isMergeCommit":false,"messageTitle":"Update UserGuide.md and Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":2,"deletions":2}}}]},{"date":"2023-10-16","commitResults":[{"hash":"834fcdd733a92644b85cc8a507de7bbfd736d321","isMergeCommit":true,"messageTitle":"Merge pull request #35 from DavinciDelta/WuXingyu-DeleteCommand","messageBody":"Add Delete Command","fileTypesAndContributionMap":{}}]},{"date":"2023-10-17","commitResults":[{"hash":"38a8d4706b95c1b71e8ed427ef64e64b0448d972","isMergeCommit":true,"messageTitle":"Merge pull request #49 from 000verflow/Add-FindCommandTest","messageBody":"Add Junit tests for FindCommand","fileTypesAndContributionMap":{}},{"hash":"3dc4400af9db7c3713fa071647fb9d32baf5181d","isMergeCommit":true,"messageTitle":"Merge pull request #50 from DavinciDelta/WuXingyu-DeleteTesting","messageBody":"Add DeleteCommand Testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-20","commitResults":[{"hash":"dd157775f08701fc6a2945c72d7ddd4eccb29665","isMergeCommit":true,"messageTitle":"Merge pull request #55 from yingx9/YingXia-UpdateListCommandParsing","messageBody":"Update logic and code quality of ListCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"ed7a3cc3a2b98b526a8b2901e6eac90a58555271","isMergeCommit":false,"messageTitle":"Add AddCommand JUnit Tests","messageBody":"Added addCommand JUnit tests to AddCommandTest.java.\nUpdated Book.java and Parser.java.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":0},"test-code":{"insertions":58,"deletions":0}}},{"hash":"2c2e658a363c148a823aa30b74af030c1015aace","isMergeCommit":false,"messageTitle":"Update Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":3}}}]},{"date":"2023-10-26","commitResults":[{"hash":"68271b08f8aa57213e668aef11dd07b64b33fb19","isMergeCommit":true,"messageTitle":"Merge pull request #71 from yingx9/YingXia-DGPlantUml","messageBody":"Repurpose style, architecture.puml from Addressbook","fileTypesAndContributionMap":{}},{"hash":"c83c8d24dbe24a1d92dfa2a5cc07c32ce8ea3e53","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"Added on to the developer guide and included parts\nfor the add feature.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5},"docs":{"insertions":172,"deletions":3}}}]}],"DavinciDelta":[{"date":"2023-10-05","commitResults":[{"hash":"20d84b8a2deaed74e86d4c49ff90766db2fd1d7d","isMergeCommit":false,"messageTitle":"Add AboutUs","messageBody":"Included my own about us\n","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":1}}}]},{"date":"2023-10-13","commitResults":[{"hash":"f816d329501fbc059fac7bc29b8449c0aa6d39ff","isMergeCommit":false,"messageTitle":"Basic abstract Command","messageBody":"Included the basic abstract command for reference, with delete code implemented\n","fileTypesAndContributionMap":{"functional-code":{"insertions":117,"deletions":0}}},{"hash":"c97d2cec899d51e82fa979133c029d496a59bb91","isMergeCommit":false,"messageTitle":"Revert \"Basic abstract Command\"","messageBody":"This reverts commit f816d329501fbc059fac7bc29b8449c0aa6d39ff.\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":117}}}]},{"date":"2023-10-14","commitResults":[{"hash":"66cb8f164903cc7b8dd1c4e2f37449f49b783a53","isMergeCommit":true,"messageTitle":"Merge pull request #19 from yingx9/WuXingYu-BasicStructure","messageBody":"Add XingYu\u0027s Command and Parser from iP project","fileTypesAndContributionMap":{}},{"hash":"fae2e8bde57a2bcdca664f910751520047b3cb86","isMergeCommit":false,"messageTitle":"Add resource","messageBody":"Include resource class with book class.\n\nInclude basic add and list commands for testing\n","fileTypesAndContributionMap":{"functional-code":{"insertions":115,"deletions":3}}},{"hash":"d168a5972836ae6563d2c2ff0f4dc4500e17bfb8","isMergeCommit":true,"messageTitle":"Merge from master","messageBody":"Include changes from master\n","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"18ae4568148b6a244a6954b2d645a6396383d92e","isMergeCommit":false,"messageTitle":"Add Delete Command","messageBody":"Added the delete command with it\u0027s parser\n","fileTypesAndContributionMap":{"functional-code":{"insertions":52,"deletions":8}}}]},{"date":"2023-10-17","commitResults":[{"hash":"4b21bf920d2abd9b8d5ca763b6cb16a40a87e5ff","isMergeCommit":false,"messageTitle":"Add general validate and parse function","messageBody":"Include a validate and parse function that can be used for all command to decrease complexity of code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":3}}},{"hash":"460604675bb122c09dd57d41481aad943423a7d2","isMergeCommit":false,"messageTitle":"Remove print statements","messageBody":"Remove debugging print statements\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":2}}},{"hash":"9c24aadd4353ff76d44e33afc61d3d758704f474","isMergeCommit":false,"messageTitle":"Update Command","messageBody":"Remove redundant code and improve style\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":3}}},{"hash":"4d4e242a5a8b83bfae05457a81c2ae027d999c3b","isMergeCommit":false,"messageTitle":"Add DeleteCommand Testing","messageBody":"Included J unit testing for DeleteComand\n","fileTypesAndContributionMap":{"test-code":{"insertions":46,"deletions":0}}},{"hash":"862395cfe14800213003b307dcf087084245681f","isMergeCommit":false,"messageTitle":"Update DeleteCommandTest.java","messageBody":"Updated DeleteCommandTest\n","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":17}}},{"hash":"92e2f73b5371af344b6816b12e4013c4800300e6","isMergeCommit":false,"messageTitle":"Remove redundant imports","messageBody":"Removed redundant imports to improve clarity\n","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}},{"hash":"360606f9d100648710f69f6c9b8ed59e9da91041","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-ParsingAbstraction","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-18","commitResults":[{"hash":"dae3e42c416444c4b6515a99bdb72c4b35e06356","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into WuXingyu-ParsingAbstraction","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"29d5789812c41805fbd1bab9a073d8baa2881793","isMergeCommit":false,"messageTitle":"Update validate and parsing","messageBody":"Update parsing into abstract Command class\n","fileTypesAndContributionMap":{"functional-code":{"insertions":29,"deletions":27}}},{"hash":"7b07b79090bec34138f9cd269e9a17594cd4994c","isMergeCommit":false,"messageTitle":"Update style","messageBody":"Remove redundant imports\n","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":1}}},{"hash":"e2f835aeff05274f1bc1177563fd2ab439494762","isMergeCommit":false,"messageTitle":"Update AddCommand","messageBody":"Changed AddCommand isbn to i\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"bd37b380149d2f2f85f500c4d6da73dbe40e3fc3","isMergeCommit":false,"messageTitle":"Update genre","messageBody":"Change genre for add command\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"2240d9c6cdeaa91c620056f02f8f3af007701523","isMergeCommit":false,"messageTitle":"Improve validation","messageBody":"Included more validation checks for duplicate arguments\n\nAllow for aliasing for arguments\n","fileTypesAndContributionMap":{"functional-code":{"insertions":62,"deletions":15}}},{"hash":"da37d39f6e07a7a4d0171c5109158a737e7e91b0","isMergeCommit":false,"messageTitle":"Fix validator","messageBody":"Prevent clash of metacharacters in strings and capital letters with validator\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-23","commitResults":[{"hash":"9ca77c1f5398f3ee3e36892e95d939757a18b035","isMergeCommit":true,"messageTitle":"Merge pull request #65 from JoanneJo/JoanneAng-AddCommandJUnit","messageBody":"Add AddCommand JUnit Tests","fileTypesAndContributionMap":{}}]},{"date":"2023-10-24","commitResults":[{"hash":"f1c67d44a0c3306c28b454edfa5cc578ae3b17d9","isMergeCommit":true,"messageTitle":"Merge pull request #66 from yingx9/YingXia-EnableAssertion","messageBody":"Enable assertions in Gradle","fileTypesAndContributionMap":{}},{"hash":"fcbdbe6b9e56b76f011dd1383e5ebf1fd8d11eb6","isMergeCommit":false,"messageTitle":"Include assertion in DeleteCommand","messageBody":"Include a generic assertion for deleteCommand\n","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":0}}},{"hash":"c90927f278161ceb6bd90171ff4431ab5a81ddb7","isMergeCommit":true,"messageTitle":"Merge branch \u0027AddAssertion\u0027 into UpdateDeveloperGuide","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"85745dae00595ea292ea6bbc4b30c74c43f49ba0","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"Update the developer guide with the basic information\n","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":6}}}]}],"yingx9":[{"date":"2023-10-04","commitResults":[{"hash":"d2a39c983b779d162587aa54cdcc043d19acb42b","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}}]},{"date":"2023-10-05","commitResults":[{"hash":"b1a23ae973590faec4fa49548e661798cddc354c","isMergeCommit":false,"messageTitle":"Update AboutUs.md and add Portfolio Page","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":7}}}]},{"date":"2023-10-11","commitResults":[{"hash":"34113bf6369cf3e72c81bad632b546565825c15e","isMergeCommit":true,"messageTitle":"Merge pull request #1 from JoanneJo/JoanneAng-AboutUs","messageBody":"Add personal details to AboutUs.md","fileTypesAndContributionMap":{}}]},{"date":"2023-10-14","commitResults":[{"hash":"24a54a13e9bff5754c97196f670acb1db3f9c3fe","isMergeCommit":false,"messageTitle":"Add code from AddressBook","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1937,"deletions":0}}},{"hash":"4c73795256c18d337edb3cd0d8fd6e5e95854417","isMergeCommit":true,"messageTitle":"Merge pull request #16 from yingx9/YingXia-AddressBook","messageBody":"Add code from AddressBook","fileTypesAndContributionMap":{}},{"hash":"8fdb83fc66cf61cec1707849a12140f63547934c","isMergeCommit":false,"messageTitle":"Add XingYu\u0027s Command and Parser from iP project","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":125,"deletions":0}}},{"hash":"bffe4d35fbfddbd14885722e201bf230cd6a9453","isMergeCommit":false,"messageTitle":"Update ListCommand and edit Resource and Book","messageBody":"As Resource is a generic class, Book can inherit and override\ntoString to print its own specific details\n\nHence,\nResource.java: Add toString method to be overridden by Book\nBook.java: Override parent toString method\n","fileTypesAndContributionMap":{"functional-code":{"insertions":24,"deletions":5},"docs":{"insertions":1,"deletions":1}}},{"hash":"6dcad7eeea645efabb2c7991d22053542764e697","isMergeCommit":true,"messageTitle":"Merge pull request #27 from bnjm2000/add_HelpCommand","messageBody":"Add HelpCommand","fileTypesAndContributionMap":{}},{"hash":"8ebfcaf95769d42cdf6ff8effed30582b2abbf09","isMergeCommit":true,"messageTitle":"Merge pull request #28 from bnjm2000/add_ExitCommand","messageBody":"Add ExitCommand","fileTypesAndContributionMap":{}},{"hash":"8336568d113cb4e16f4c7936c6d8254bc5d4ec2f","isMergeCommit":true,"messageTitle":"Merge pull request #30 from bnjm2000/add_ExitCommand","messageBody":"Change syntax to \"exit\" and updated test","fileTypesAndContributionMap":{}}]},{"date":"2023-10-15","commitResults":[{"hash":"8365f041ce1578f5258123ae6f612456b752747f","isMergeCommit":true,"messageTitle":"Merge pull request #32 from 000verflow/Add-FindCommand","messageBody":"Add FindCommand class","fileTypesAndContributionMap":{}},{"hash":"e961ad179fefc5fe022232e8efaf73bbb1065a45","isMergeCommit":false,"messageTitle":"Update Listing by specific filters for ListCommand.Java","messageBody":"Librarians may want an overview of resources by categories such\nas tag and genre\n\nHence, add filter methods to ListCommand to filter by Tag, Genre,\nor Both\n","fileTypesAndContributionMap":{"functional-code":{"insertions":139,"deletions":8}}}]},{"date":"2023-10-16","commitResults":[{"hash":"ce80c867361f341512178783328995160bb24ca5","isMergeCommit":false,"messageTitle":"Update UserGuide.md for List and minor change to ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":4},"docs":{"insertions":11,"deletions":8}}},{"hash":"8c30d1ef8dbba12f7d7807c9c6c3809726b2e1d4","isMergeCommit":false,"messageTitle":"Update ListCommand to use lineSeparator() and add more checks","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":11}}},{"hash":"ed23a422c3bc47ee6e56abb377be77f13c27e4bc","isMergeCommit":false,"messageTitle":"Fix lines to not exceed 120 characters for coding standard","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":5}}},{"hash":"69362cc4634c29603bcee3690e6ac5cf11f530c8","isMergeCommit":true,"messageTitle":"Merge pull request #38 from bnjm2000/add_Junit","messageBody":"Add Junit","fileTypesAndContributionMap":{}},{"hash":"4e21bd1fc5c7dcf2ef84b90dd6e05e481e5b48f3","isMergeCommit":false,"messageTitle":"Add jUnit tests for ListCommand","messageBody":"To ensure ListCommand is works as intended, add tests such as:\n1. Ensure list does not crash SysLib if executed when there are no\nresources\n2. Ensure missing values for tag and genre filter throws exception\n3. Ensure listing with filters does not crash SysLib if there are\nno found resources matching filters\n","fileTypesAndContributionMap":{"test-code":{"insertions":101,"deletions":0}}},{"hash":"b62afec7114450326fdb9237456383a9845f62dd","isMergeCommit":false,"messageTitle":"Fix check style error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":13}}},{"hash":"871ae927c0777d5e302d720cf8a377459bac1304","isMergeCommit":false,"messageTitle":"Fix windows error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}}]},{"date":"2023-10-17","commitResults":[{"hash":"446c9c1b9d6b76ce5b9b366d67eba021b3075894","isMergeCommit":true,"messageTitle":"Merge pull request #42 from bnjm2000/BenjaminNg_consistency","messageBody":"Fix consistency","fileTypesAndContributionMap":{}},{"hash":"61bca2d384d09bf9fce54fd2e5a13fa913fb028b","isMergeCommit":false,"messageTitle":"Fix bug where listing by genre crashes SysLib","messageBody":"When a book is added without a genre, SysLib crashes when listing\nby genre\n\nHence add a check to hasGenre method to return false when a book has\nno genre\n\nNote in future developments, if createBook changes its method of\ncreating genres array, this fix has to be updated\n","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0},"test-code":{"insertions":4,"deletions":1}}},{"hash":"8efd8319a62d5e716070bf29aadaa27690a176de","isMergeCommit":true,"messageTitle":"Merge pull request #44 from bnjm2000/BenjaminNg_FixHelpCommand","messageBody":"Fix HelpCommand","fileTypesAndContributionMap":{}},{"hash":"94f1c1b220672138c830e6ab79721ce84c1eb3da","isMergeCommit":false,"messageTitle":"Fix bug where multiple genres causes list filter to not work","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":7}}},{"hash":"7277e0d587c97e762d22c5a1e829b859b648b9b8","isMergeCommit":false,"messageTitle":"Update method of checking genre again for ListCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":6,"deletions":4}}},{"hash":"ea49ab338b61b8cf5cdb56c7e4b3679a1b1a91b7","isMergeCommit":false,"messageTitle":"Add assertion to ensure ListCommand works as intended","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2}}},{"hash":"5eb00e5f0f4e350a35924a1cb0fe5faa6d6201e6","isMergeCommit":true,"messageTitle":"Merge pull request #54 from bnjm2000/BenjaminNg_addAssertandLogging","messageBody":"Add assert and logging for HelpCommand and ExitCommand","tags":["v1.0"],"fileTypesAndContributionMap":{}}]},{"date":"2023-10-19","commitResults":[{"hash":"d25c9b66e18042f05cf523e9875bdd7eba9be49d","isMergeCommit":true,"messageTitle":"Merge pull request #47 from DavinciDelta/WuXingyu-ParsingAbstraction","messageBody":"Add general validate and parse function","fileTypesAndContributionMap":{}},{"hash":"8e0d91820deea617c37ecaf1dfc69fefade72c9a","isMergeCommit":false,"messageTitle":"Update logic and code quality of ListCommand","messageBody":"There are also many repeats of System.lineSeparator + \"------\" etc\n\nHence update constant LINEDIVIDER in UI class to be public, and add\nSEPARATOR_LINEDIVIDER constant for use to tidy up code\n","fileTypesAndContributionMap":{"functional-code":{"insertions":107,"deletions":129},"test-code":{"insertions":14,"deletions":13}}}]},{"date":"2023-10-23","commitResults":[{"hash":"8507b3cd0107300ca6e7645b7ea6b0d311e5b9d2","isMergeCommit":false,"messageTitle":"Enable assertions in Gradle","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-24","commitResults":[{"hash":"41ef8d4d05c823217fd470fd2b0d5ce75cc9b755","isMergeCommit":true,"messageTitle":"Merge pull request #68 from DavinciDelta/AddAssertion","messageBody":"Include assertion in DeleteCommand","fileTypesAndContributionMap":{}},{"hash":"b36525d5ee13cdc1f2ef8fb4a9472930658ca9b1","isMergeCommit":true,"messageTitle":"Merge pull request #69 from DavinciDelta/UpdateDeveloperGuide","messageBody":"Update developer guide","fileTypesAndContributionMap":{}},{"hash":"7b8ffa67e21258e44d6123138f6526cf6ec70478","isMergeCommit":false,"messageTitle":"Repurpose style, architecture.puml from Addressbook","messageBody":"Add a draft architecture diagram\n","fileTypesAndContributionMap":{"docs":{"insertions":110,"deletions":0}}}]},{"date":"2023-10-25","commitResults":[{"hash":"0aea8979e3591fdba501ce8032615bd126a1555c","isMergeCommit":false,"messageTitle":"Add more structure to the Developer\u0027s Guide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":26,"deletions":0}}},{"hash":"b83bc4d4d00080b7f0ce0afc2896a051e7171889","isMergeCommit":false,"messageTitle":"Add Sequence Diagram for ListCommand","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":84,"deletions":0}}}]},{"date":"2023-10-26","commitResults":[{"hash":"f09c1bf2895d25e06455027821024ce74864ead9","isMergeCommit":true,"messageTitle":"Merge pull request #74 from JoanneJo/JoanneAng-DeveloperGuide","messageBody":"Update DeveloperGuide.md","fileTypesAndContributionMap":{}},{"hash":"474936b9006df0c0a61054b29262af71487c4ffa","isMergeCommit":false,"messageTitle":"Update ListCommand and List Implementation of DG","messageBody":"Add a Messages class to format messages with frequently used\nline separators and dividers\n\nMove hasGenre to Resources class so it can be used for other purpose\n\nUpdate more details about ListCommand to DG\n","fileTypesAndContributionMap":{"functional-code":{"insertions":95,"deletions":75},"docs":{"insertions":16,"deletions":6},"test-code":{"insertions":10,"deletions":11}}},{"hash":"59cae2daeb0fb11a82e05710e3f9f504f5748974","isMergeCommit":false,"messageTitle":"Fix checkstyle error","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"73265af04a474da052dbbe9cdda0066e4c0cf1a0","isMergeCommit":false,"messageTitle":"Fix ListCommandTest checkstyle error","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":5,"deletions":1}}},{"hash":"10159022ea4dc325910969bd62ba81407ec235cf","isMergeCommit":false,"messageTitle":"Update List DG","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":13,"deletions":5}}},{"hash":"2d5ffa410ef7ee5a7a7dd822881d60585ac03a1e","isMergeCommit":true,"messageTitle":"Merge pull request #76 from bnjm2000/BenjaminNg-DG-Manual-Testing","messageBody":"Add more user stories as well as manual testing","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"e1ef61a3c639ad009ebfada3524d13be611ffb01","isMergeCommit":true,"messageTitle":"Merge pull request #77 from 000verflow/update-developer-guide","messageBody":"Add find command details on DG","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"000verflow":{"docs":133,"functional-code":197,"test-code":116},"bnjm2000":{"docs":180,"functional-code":105,"test-code":316},"JoanneJo":{"docs":187,"functional-code":151,"test-code":58},"DavinciDelta":{"docs":14,"functional-code":214,"test-code":31},"yingx9":{"docs":253,"functional-code":266,"test-code":96,"other":1}},"authorContributionVariance":{"000verflow":115403.09,"bnjm2000":12310.768,"JoanneJo":5249.639,"DavinciDelta":2438.4824,"yingx9":113608.96},"authorDisplayNameMap":{"000verflow":"CS2113T-W11-1 VELU..LAJI","bnjm2000":"CS2113T-W11-1 BENJ..MING","JoanneJo":"CS2113T-W11-1 JOAN..LING","DavinciDelta":"CS2113T-W11-1 WU X..NGYU","yingx9":"CS2113T-W11-1 LOKE.. XIA"}} diff --git a/AY2324S1-CS2113T-W11-2_tp_master/authorship.json b/AY2324S1-CS2113T-W11-2_tp_master/authorship.json index 872b93f..20fde25 100644 --- a/AY2324S1-CS2113T-W11-2_tp_master/authorship.json +++ b/AY2324S1-CS2113T-W11-2_tp_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Duke project template","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/wildwatch/WildWatch.java` file, right-click it, and choose `Run WildWatch.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" Hello there! Welcome to Wild Watch!","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":3,"-":56}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" mainClass.set(\"seedu.wildwatch.WildWatch\")","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" archiveBaseName.set(\"wildwatch\")","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"woodenclock":3,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"|-----------------------------------------------------------------------------------------|:-----------:|:----------------------------------------:|:------------------------------------:|","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"| ![](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/252865bb-811e-48b1-9777-6c01b98500b1) | Lee Sungmin | [Github](https://github.com/woodenclock) | [Portfolio](https://github.com/AY2324S1-CS2113T-W11-2/tp/blob/master/docs/team/leesungmin.md#lee-sungmin) |","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":6,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Developer Guide","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"- [Acknowledgements](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#acknowledgements)","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"- [Design \u0026 Implementation](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#design--implementation)","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"- [Product Scope](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#product-scope)","lastModifiedDate":"2023-10-21"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" - [Target User Profile](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#target-user-profile)","lastModifiedDate":"2023-10-21"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" - [Value Proposition](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#value-proposition)","lastModifiedDate":"2023-10-21"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"- [User Story](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#user-stories)","lastModifiedDate":"2023-10-21"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"- [Non-Funtional Requirements](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#non-functional-requirements)","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"- [Glossary](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#glossary)","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"- [Manual Testing](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#manual-testing)","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"- [Command Summary](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#command-summary)","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"-"},"content":"## Acknowledgements","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"Some code snippets were referenced from [here](https://github.com/woodenclock/ip.git).","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"## Design \u0026 Implementation","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"WildWatch is a CLI based software that helps zoos keep track of animal inhabitants.","lastModifiedDate":"2023-10-21"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":28,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"Target user profile are the clerks working in zoos.","lastModifiedDate":"2023-10-21"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":39,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":"|v1.0|new user|see help instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2023-10-21"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|add an animal entry|record the animals in the zoo, and refer to them afterwards|","lastModifiedDate":"2023-10-21"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|delete an animal entry|remove redundant or invalid animal entry|","lastModifiedDate":"2023-10-21"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|list all the entries|see what entries I have entered previously, and refer to them|","lastModifiedDate":"2023-10-21"},{"lineNumber":47,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":51,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":57,"author":{"gitId":"-"},"content":"## Glossary","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"* *glossary item* - Definition","lastModifiedDate":"2020-05-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":"## Manual Testing","lastModifiedDate":"2023-10-21"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":"## Command Summary","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"}],"authorContributionMap":{"woodenclock":36,"-":35}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# WildWatch","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for recording down individual wildlife in a wildlife reserve via a Command Line Interface (CLI).","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":2,"-":6}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# WildWatch User Guide 🐘","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for a clerk managing animal entries in a wildlife reserve via the Command Line Interface (CLI).","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"## Table of Contents ","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"- [Quick Start](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#quick-start-)","lastModifiedDate":"2023-10-26"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"- [Features](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#features-)","lastModifiedDate":"2023-10-26"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" - [Adding Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#2-adding-entries-add): `add`","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" - [Deleting Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#3-deleting-entries-delete): `delete`","lastModifiedDate":"2023-10-27"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" - [Listing Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#4-listing-entries-list): `list`","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":" - [Getting Help](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#1-getting-help--help): `help` ","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"- [FAQ](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#faq)","lastModifiedDate":"2023-10-26"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"- [Command Reference](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#command-reference-)","lastModifiedDate":"2023-10-27"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"## Quick Start 🐵","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"1. Ensure you have Java 11 or above installed in your Computer. (What is my [Java version](https://www.java.com/en/download/help/version_manual.html)?)","lastModifiedDate":"2023-10-28"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"2. Download the latest `WildWatch.jar` from [here](https://github.com/AY2324S1-CS2113T-W11-2/tp/releases).","lastModifiedDate":"2023-10-27"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":"3. Copy the file to the folder you want to use as the home folder for your WildWatch.","lastModifiedDate":"2023-10-27"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"4. Open a command terminal, `cd` into the folder you put the jar file in, and run the following command: `java -jar WildWatch.jar`.","lastModifiedDate":"2023-10-27"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":"You should see the welcome screen as follows.","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"5. Type commands below the horizontal line and press `Enter` to execute it. (e.g. typing `help` and pressing `Enter` will show the help page).","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"Some example commands you can try:","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":"- `list` : Lists all entries. ","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":"- `bye` : Exits the program. ","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":"## Features 🦊","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"\u003e ❗ IMPORTANT","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"\u003e * Capitalized words between angle brackets `\u003c \u003e` are information to be written appropriately by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":"\u003e * E.g., `delete \u003cINDEX\u003e` should be `delete 2`","lastModifiedDate":"2023-10-26"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"imaginarys96"},"content":"### 1. Adding Entries: `add`","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":"Adds a new entry to the system.","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":"Format: `add D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e`","lastModifiedDate":"2023-10-26"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":"`\u003cdate\u003e` should be in the format **DD-MM-YY**","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":"Example: ","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":"add D/02-03-23 S/Annam Leaf Turtle N/Ariel R/Injured left flipper","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":"The following entry has been added:","lastModifiedDate":"2023-10-25"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":"Date: [02-03-2023] | Species: [Annam Leaf Turtle] | Name: [Ariel] | Remark: [Injured left flipper]","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"Now you have 1 entries in the list.","lastModifiedDate":"2023-10-25"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":"---","lastModifiedDate":"2023-10-25"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":70,"author":{"gitId":"imaginarys96"},"content":"### 2. Deleting Entries: `delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":"Deletes an entry. ","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"Format: `delete INDEX`","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":"Deletes the entry at the specified INDEX. ","lastModifiedDate":"2023-10-25"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":"The index refers to the index number shown in the displayed entry list.","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":"\u003e ✏ Notes on `INDEX`","lastModifiedDate":"2023-10-25"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":"\u003e * Index must be a positive integer 1, 2, 3, ...","lastModifiedDate":"2023-10-25"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":"\u003e * Deleted items may not be recoverable","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":81,"author":{"gitId":"woodenclock"},"content":"Example:","lastModifiedDate":"2023-10-25"},{"lineNumber":82,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":"delete 1","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":"The entry has been removed.","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":"Now you have 0 entries in the list.","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"woodenclock"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":89,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":93,"author":{"gitId":"woodenclock"},"content":"--- ","lastModifiedDate":"2023-10-25"},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":95,"author":{"gitId":"imaginarys96"},"content":"### 3. Listing Entries: `list`","lastModifiedDate":"2023-10-28"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":"Shows a list of all entries of wildlife in the WildWatch so far.","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":"Shows useful information about each entry.","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":"Information such as the species, name, age, gender, size, remarks are shown together.","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":"Format: `list` ","lastModifiedDate":"2023-10-25"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":"Example: ","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":"________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":"list","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"woodenclock"},"content":"________________________________________","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":"There are 2 entries in the list:","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":109,"author":{"gitId":"woodenclock"},"content":"Species: Low land gorilla | Name: gorilla_01 | Age: | Gender: | Size: | Remarks:","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":"Species: African elephant | Name: strongOne | Age: 25 | Gender: M | Size: 5.5M | Remarks: Herd leader","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":"```","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":114,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":116,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":117,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":118,"author":{"gitId":"imaginarys96"},"content":"### 4. Getting Help : `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":119,"author":{"gitId":"imaginarys96"},"content":"Shows the user how to use all the commands.","lastModifiedDate":"2023-10-28"},{"lineNumber":120,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":121,"author":{"gitId":"imaginarys96"},"content":"Format: `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":122,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":123,"author":{"gitId":"imaginarys96"},"content":"Example:","lastModifiedDate":"2023-10-28"},{"lineNumber":124,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":125,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":126,"author":{"gitId":"imaginarys96"},"content":"help","lastModifiedDate":"2023-10-28"},{"lineNumber":127,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":128,"author":{"gitId":"imaginarys96"},"content":"No worries, I\u0027m here to help!","lastModifiedDate":"2023-10-28"},{"lineNumber":129,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":130,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":131,"author":{"gitId":"imaginarys96"},"content":"---------------------------HELP PAGE-----------------------------","lastModifiedDate":"2023-10-28"},{"lineNumber":132,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":133,"author":{"gitId":"imaginarys96"},"content":"_________________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":134,"author":{"gitId":"imaginarys96"},"content":"1. Get help - show the list of commands available for this app","lastModifiedDate":"2023-10-28"},{"lineNumber":135,"author":{"gitId":"imaginarys96"},"content":" Format: help","lastModifiedDate":"2023-10-28"},{"lineNumber":136,"author":{"gitId":"imaginarys96"},"content":" Examples: ","lastModifiedDate":"2023-10-28"},{"lineNumber":137,"author":{"gitId":"imaginarys96"},"content":" help","lastModifiedDate":"2023-10-28"},{"lineNumber":138,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":139,"author":{"gitId":"imaginarys96"},"content":"_________________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":140,"author":{"gitId":"imaginarys96"},"content":"2. To add a new wildlife","lastModifiedDate":"2023-10-28"},{"lineNumber":141,"author":{"gitId":"imaginarys96"},"content":" Format: add D/DATE S/SPECIES N/NAME R/REMARKS","lastModifiedDate":"2023-10-28"},{"lineNumber":142,"author":{"gitId":"imaginarys96"},"content":" DATE should be in the format DD-MM-YY","lastModifiedDate":"2023-10-28"},{"lineNumber":143,"author":{"gitId":"imaginarys96"},"content":" Examples: ","lastModifiedDate":"2023-10-28"},{"lineNumber":144,"author":{"gitId":"imaginarys96"},"content":" add D/02-03-23 S/Annam Leaf Turtle N/Ariel R/Injured left flipper","lastModifiedDate":"2023-10-28"},{"lineNumber":145,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":146,"author":{"gitId":"imaginarys96"},"content":"_________________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":147,"author":{"gitId":"imaginarys96"},"content":"3. To list all wildlife,","lastModifiedDate":"2023-10-28"},{"lineNumber":148,"author":{"gitId":"imaginarys96"},"content":" Format: list","lastModifiedDate":"2023-10-28"},{"lineNumber":149,"author":{"gitId":"imaginarys96"},"content":" Examples: ","lastModifiedDate":"2023-10-28"},{"lineNumber":150,"author":{"gitId":"imaginarys96"},"content":" list","lastModifiedDate":"2023-10-28"},{"lineNumber":151,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":152,"author":{"gitId":"imaginarys96"},"content":"_________________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":153,"author":{"gitId":"imaginarys96"},"content":"4. To delete a wildlife","lastModifiedDate":"2023-10-28"},{"lineNumber":154,"author":{"gitId":"imaginarys96"},"content":" Format: delete INDEX","lastModifiedDate":"2023-10-28"},{"lineNumber":155,"author":{"gitId":"imaginarys96"},"content":" The index refers to the index number shown in the displayed observation list.","lastModifiedDate":"2023-10-28"},{"lineNumber":156,"author":{"gitId":"imaginarys96"},"content":" Note:","lastModifiedDate":"2023-10-28"},{"lineNumber":157,"author":{"gitId":"imaginarys96"},"content":" - The index must be a positive integer:","lastModifiedDate":"2023-10-28"},{"lineNumber":158,"author":{"gitId":"imaginarys96"},"content":" - Deleted items may not be recoverable:","lastModifiedDate":"2023-10-28"},{"lineNumber":159,"author":{"gitId":"imaginarys96"},"content":" Examples: ","lastModifiedDate":"2023-10-28"},{"lineNumber":160,"author":{"gitId":"imaginarys96"},"content":" delete 1","lastModifiedDate":"2023-10-28"},{"lineNumber":161,"author":{"gitId":"imaginarys96"},"content":"_________________________________________________________________","lastModifiedDate":"2023-10-28"},{"lineNumber":162,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":163,"author":{"gitId":"imaginarys96"},"content":"-------------------------HELP PAGE END---------------------------","lastModifiedDate":"2023-10-28"},{"lineNumber":164,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-28"},{"lineNumber":165,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":166,"author":{"gitId":"imaginarys96"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":167,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":168,"author":{"gitId":"imaginarys96"},"content":"--- ","lastModifiedDate":"2023-10-28"},{"lineNumber":169,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":170,"author":{"gitId":"-"},"content":"## FAQ","lastModifiedDate":"2023-10-26"},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":172,"author":{"gitId":"woodenclock"},"content":"\u003e **Q**: Why do I get the `OOPS!!! Invalid Date input :-(` error? ","lastModifiedDate":"2023-10-26"},{"lineNumber":173,"author":{"gitId":"woodenclock"},"content":"\u003e **A**: Ensure the day, month, year is separated by `-` e.g., `23-05-23` in **DD-MM-YY** format. ","lastModifiedDate":"2023-10-26"},{"lineNumber":174,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":175,"author":{"gitId":"woodenclock"},"content":"\u003e **Q**: I found a bug! What do I do? ","lastModifiedDate":"2023-10-26"},{"lineNumber":176,"author":{"gitId":"woodenclock"},"content":"\u003e **A**: Great! Please contact [Min](https://github.com/woodenclock), your help is greatly appreciated!","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":178,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-27"},{"lineNumber":179,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":180,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":182,"author":{"gitId":"woodenclock"},"content":"## Command Reference 🐱","lastModifiedDate":"2023-10-25"},{"lineNumber":183,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":184,"author":{"gitId":"woodenclock"},"content":"| Action | Format |","lastModifiedDate":"2023-10-25"},{"lineNumber":185,"author":{"gitId":"woodenclock"},"content":"| -------------- | ------ |","lastModifiedDate":"2023-10-25"},{"lineNumber":186,"author":{"gitId":"woodenclock"},"content":"| Getting Help | `help` |","lastModifiedDate":"2023-10-25"},{"lineNumber":187,"author":{"gitId":"woodenclock"},"content":"| Add Entries | `add D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e` |","lastModifiedDate":"2023-10-26"},{"lineNumber":188,"author":{"gitId":"woodenclock"},"content":"| Delete Entries | `delete \u003cINDEX\u003e` |","lastModifiedDate":"2023-10-26"},{"lineNumber":189,"author":{"gitId":"woodenclock"},"content":"| List Entries | `list` |","lastModifiedDate":"2023-10-25"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":191,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"imaginarys96":55,"woodenclock":106,"-":30}},{"path":"docs/team/leesungmin.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# Lee Sungmin","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"Hi there! Hope you are doing great!","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":3}},{"path":"src/main/java/seedu/wildwatch/WildWatch.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.LogHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.BootUp;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.FileHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.InputHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"public class WildWatch {","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" * Main entry-point for the java.wildwatch.WildWatch application.","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" LogHandler.configure(); //Configure Log","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" BootUp.bootUpOne();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" FileHandler.handleFile(); //FileHandler takes on","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" InputHandler.handleManualInput();","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":19,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"woodenclock":12,"-":7}},{"path":"src/main/java/seedu/wildwatch/command/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" * Command class for adding entry to EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":" public static final Pattern ADD_ENTRY_COMMAND_FORMAT \u003d","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" Pattern.compile(\"add\"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" + \" D/(?\u003cdate\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" + \" S/(?\u003cspecies\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" + \" N/(?\u003cname\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" + \"(?: R/(?\u003cremark\u003e[^/]+))?\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" //TODO[PARSER]: TEMPORARY. REMOVE LATER.","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" public AddCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" public void execute() throws IncorrectInputException {","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"lctxct"},"content":" final Matcher matcher \u003d ADD_ENTRY_COMMAND_FORMAT.matcher(inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"lctxct"},"content":" if (!matcher.matches()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"lctxct"},"content":" throw new IncorrectInputException();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"lctxct"},"content":" final String date \u003d matcher.group(\"date\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"lctxct"},"content":" final String species \u003d matcher.group(\"species\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" final String name \u003d matcher.group(\"name\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"lctxct"},"content":" final String remark \u003d matcher.group(\"remark\");","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" EntryList.addEntry(new Entry(date, species, name, remark));","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" Ui.entryAddedMessagePrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.printEntry(EntryList.getArraySize() - 1);","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":12,"lctxct":40}},{"path":"src/main/java/seedu/wildwatch/command/ByeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.EntryHandler;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.ShutDown;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"public class ByeCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"bye\";","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(EntryHandler.class.getName());","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" public static void exitProgram() {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Initiating shutdown procedures.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" ShutDown.shutDown();","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" //TODO: figure out a way to get rid of this","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"woodenclock":15,"lctxct":8}},{"path":"src/main/java/seedu/wildwatch/command/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" * Command class for manipulating EntryList","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public Command() {}","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public abstract void execute() throws IncorrectInputException;","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":8,"lctxct":4}},{"path":"src/main/java/seedu/wildwatch/command/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" * Command class for deleting entry in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"lctxct"},"content":" private final int numberInput;","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":" public DeleteCommand(int numberInput) {","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":" this.numberInput \u003d numberInput;","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"tangzhenen"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" * Deletes entry in the EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"tangzhenen"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"tangzhenen"},"content":" Ui.entryRemovedMessagePrinter();","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" EntryList.deleteEntry(numberInput);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"tangzhenen"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-13"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":10,"tangzhenen":7,"lctxct":10}},{"path":"src/main/java/seedu/wildwatch/command/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" * Handles the \"find\" command to search for tasks that contain a specific keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" //TODO[PARSER]: SHOULD BE REMOVED AFTER IMPLEMENTING PARSER","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" public FindCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" * Searches for tasks that contain the specified keyword and prints them.","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" boolean hasMatch \u003d false;","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" String matchingWord \u003d inputBuffer.substring(inputBuffer.indexOf(\"find\") + 5).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" ArrayList\u003cEntry\u003e entries \u003d EntryList.getArray();","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" ArrayList\u003cInteger\u003e matchingEntries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" LocalDate inputDate \u003d null;","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" inputDate \u003d LocalDate.parse(matchingWord, DateTimeFormatter.ofPattern(\"dd-MM-yy\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" } catch (DateTimeParseException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" // matchingWord is not a date","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" for (Entry entry: entries) {","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" boolean isInputADate \u003d (inputDate !\u003d null \u0026\u0026 entry.getDate().equals(inputDate));","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" if (entry.getSpecies().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" || entry.getSpecies().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" || entry.getName().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" || entry.getName().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" || entry.getRemark().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" || entry.getRemark().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" || isInputADate) {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" hasMatch \u003d true;","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" matchingEntries.add(entries.indexOf(entry));","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" Ui.findTaskMessagePrinter(hasMatch, matchingEntries);","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":47,"lctxct":12}},{"path":"src/main/java/seedu/wildwatch/command/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"help\";","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" * Requires UPDATE","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":" private static final String helpCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":" \"1. Get help - show the list of commands available for this app\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":" \" Format: help\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" \" help\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"imaginarys96"},"content":" private static final String addCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"imaginarys96"},"content":" \"2. To add a new wildlife\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"imaginarys96"},"content":" \" Format: add D/DATE S/SPECIES N/NAME R/REMARKS\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"imaginarys96"},"content":" \" DATE should be in the format DD-MM-YY\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" \" add D/02-03-23 S/Annam Leaf Turtle N/Ariel R/Injured left flipper\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"imaginarys96"},"content":" private static final String listCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"imaginarys96"},"content":" \"3. To list all wildlife,\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"imaginarys96"},"content":" \" Format: list\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" \" list\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" private static final String deleteCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" \"4. To delete a wildlife\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" \" Format: delete INDEX\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" \" The index refers to the index number shown in the displayed observation list.\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" \" Note:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" \" - The index must be a positive integer:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" \" - Deleted items may not be recoverable:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" \" delete 1\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" private static final String helpPage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" \"---------------------------HELP PAGE-----------------------------\\n\"+","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"imaginarys96"},"content":" helpCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"imaginarys96"},"content":" addCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"imaginarys96"},"content":" listCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"imaginarys96"},"content":" deleteCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" \"-------------------------HELP PAGE END---------------------------\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" private static final String needHelpPage \u003d","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" \"Please type \\\"help\\\" if you need help\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" \"\\n\";","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" public static void printNeedHelpMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" System.out.println(needHelpPage);","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" * Prints out help page","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"lctxct"},"content":" System.out.println(\"No worries, I\u0027m here to help!\");","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" System.out.println(helpPage);","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"imaginarys96":30,"woodenclock":40,"lctxct":5}},{"path":"src/main/java/seedu/wildwatch/command/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" * Command class for listing all entries in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" * Lists out all entry in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":" public static void listEntry() {","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" int arraySize \u003d EntryList.getArraySize();","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c arraySize; i++) {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" System.out.print(i + 1 + \".\");","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" Ui.printEntry(i);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" Ui.listMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":21,"lctxct":9}},{"path":"src/main/java/seedu/wildwatch/command/SummaryCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"imaginarys96"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"imaginarys96"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"imaginarys96"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"imaginarys96"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"imaginarys96"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":" * Command class for `summary`","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"imaginarys96"},"content":"public class SummaryCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"summary\";","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" //TODO[PARSER]: REMOVE L8ER","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" public SummaryCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" private static Map\u003cString, List\u003cEntry\u003e\u003e groupEntriesBySpecies(List\u003cEntry\u003e entries) {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e map \u003d new HashMap\u003cString, List\u003cEntry\u003e\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"imaginarys96"},"content":" for (Entry entry : entries) {","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"imaginarys96"},"content":" String key \u003d entry.getSpecies();","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"imaginarys96"},"content":" if(map.containsKey(key)){","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d map.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"imaginarys96"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d new ArrayList\u003cEntry\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" map.put(key, list);","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" return map;","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"lctxct"},"content":" private static Map\u003cString, List\u003cEntry\u003e\u003e groupSpecieByName(List\u003cEntry\u003e filteredEntries) {","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e filteredMap \u003d new HashMap\u003cString, List\u003cEntry\u003e\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":" for (Entry entry : filteredEntries) {","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" String key \u003d entry.getName();","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"imaginarys96"},"content":" if(filteredMap.containsKey(key)){","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d filteredMap.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":51,"author":{"gitId":"imaginarys96"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d new ArrayList\u003cEntry\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"imaginarys96"},"content":" filteredMap.put(key, list);","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"imaginarys96"},"content":" return filteredMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"lctxct"},"content":" public void execute() throws IncorrectInputException {","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"imaginarys96"},"content":" String argument \u003d inputBuffer.replace(\"summary\",\"\").trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"imaginarys96"},"content":" String speciesName \u003d argument;","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"imaginarys96"},"content":" boolean hasArgument \u003d !argument.isEmpty();","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"imaginarys96"},"content":" ArrayList\u003cEntry\u003e entries \u003d EntryList.getArray();","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"imaginarys96"},"content":" // Group entries by .species attribute","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e map \u003d groupEntriesBySpecies(entries);","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"imaginarys96"},"content":" // change message based on whether `summary` or `summary \u003cspecies\u003e`","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"imaginarys96"},"content":" if( hasArgument ) {","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"imaginarys96"},"content":" Ui.printSummaryNameMessage(speciesName);","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e filteredEntries \u003d map.get(speciesName);","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e filteredMap \u003d groupSpecieByName(filteredEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"imaginarys96"},"content":" filteredMap.forEach((key, value) -\u003e System.out.println(key + \" - (\" + value.size() + \")\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"imaginarys96"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"imaginarys96"},"content":" Ui.printSummarySpecieMessage();","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"imaginarys96"},"content":" map.forEach((key, value) -\u003e System.out.println(key + \" - (\" + value.size() + \")\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"imaginarys96"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"imaginarys96":65,"lctxct":13}},{"path":"src/main/java/seedu/wildwatch/entry/Entry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.entry;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"public class Entry {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" private LocalDate date;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" private String species;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" private String name;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" private String remark;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" public Entry(String date, String species, String name, String remark) {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" DateTimeFormatter inputFormat \u003d DateTimeFormatter.ofPattern(\"dd-MM-yy\");","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" this.date \u003d LocalDate.parse(date, inputFormat);","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" this.species \u003d species;","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" this.remark \u003d remark;","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" public LocalDate getDate() {","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" return date;","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" public String getSpecies() {","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" return species;","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" public String getName() {","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" return name;","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" public String getRemark() {","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" return remark;","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":35}},{"path":"src/main/java/seedu/wildwatch/entry/EntryList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.entry;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.FileHandler;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class EntryList {","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" private static ArrayList\u003cEntry\u003e entries \u003d new ArrayList\u003c\u003e(); //Keeps track of all Entry instances made","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" public static ArrayList\u003cEntry\u003e getArray() {","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" return entries;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" public static int getArraySize() {","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" return entries.size();","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" public static void addEntry(Entry newEntry) {","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" entries.add(newEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" public static void deleteEntry(int numberInput){","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" entries.remove(numberInput - 1);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" public static Entry getEntry(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" return entries.get(nthEntry);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" public static LocalDate getEntryDate(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getDate();","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" public static String getEntrySpecies(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getSpecies();","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" public static String getEntryName(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getName();","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" public static String getEntryRemark(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getRemark();","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" public static boolean isArrayEmpty() {","lastModifiedDate":"2023-10-11"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" return entries.isEmpty();","lastModifiedDate":"2023-10-11"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" public static void saveEntry() {","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" FileHandler.saver(entries);","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":52,"lctxct":2}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyAddException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyAddException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyDeleteException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyDeleteException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyFindException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyFindException extends Exception {","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyInputException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyListException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyListException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EntryNotFoundException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EntryNotFoundException extends Exception {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/IncorrectInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lctxct"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"public class IncorrectInputException extends Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"lctxct":4}},{"path":"src/main/java/seedu/wildwatch/exception/UnknownDateFormatException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class UnknownDateFormatException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/UnknownInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class UnknownInputException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/operation/BootUp.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class BootUp {","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":" public static final String WELCOME_MESSAGE_1 \u003d","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" \"Hello there! Welcome to WildWatch!\\n\";","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" public static final String WELCOME_MESSAGE_2 \u003d","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" \"What would you like to do?\\n\";","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" public static final String LOGO \u003d","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" \"____ __ ____ __ __ _______\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" \"\\\\ \\\\ / \\\\ / / | | | | | \\\\\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" \" \\\\ \\\\/ \\\\/ / | | | | | .--. |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" \" \\\\ / | | | | | | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" \" \\\\ /\\\\ / | | | `----.| \u0027--\u0027 |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" \" \\\\__/ \\\\__/ |__| |_______||_______/\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" \"____ __ ____ ___ .___________. ______ __ __\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" \"\\\\ \\\\ / \\\\ / / / \\\\ | | / || | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" \" \\\\ \\\\/ \\\\/ / / ^ \\\\ `---| |----`| ,----\u0027| |__| |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" \" \\\\ / / /_\\\\ \\\\ | | | | | __ |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" \" \\\\ /\\\\ / / _____ \\\\ | | | `----.| | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" \" \\\\__/ \\\\__/ /__/ \\\\__\\\\ |__| \\\\______||__| |__|\\n\";","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" public static void bootUpOne() {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.LOGO);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.WELCOME_MESSAGE_1);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" public static void bootUpTwo() {","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.WELCOME_MESSAGE_2);","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":35}},{"path":"src/main/java/seedu/wildwatch/operation/DateHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"public class DateHandler {","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" private static final Pattern DATE_PATTERN \u003d Pattern.compile(","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" \"(0[1-9]|[1-2][0-9]|3[0-1])-(0[1-9]|1[0-2])-\\\\d{2}\" // dd-mm-yy","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" );","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public static boolean isDateValid(String inputBuffer) {","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" //Trims off everything except date","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" CharSequence date \u003d inputBuffer.substring(inputBuffer.indexOf(\"D/\") + 2, inputBuffer.indexOf(\"S/\")).trim();","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" if (DATE_PATTERN.matcher(date).matches()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" return true;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" } catch (StringIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":21}},{"path":"src/main/java/seedu/wildwatch/operation/EntryHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.Command;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.HelpCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.SummaryCommand;","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ByeCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"public class EntryHandler {","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" private static final int DEFAULT_NUMBER_INPUT \u003d -3710; //Number that can never be input in normal use of WildWatch","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(EntryHandler.class.getName());","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" public static Command handleEntry(String inputBuffer)","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" throws UnknownInputException, IncorrectInputException {","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Managing entry for input: {0}\", inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" Scanner bufferScanner \u003d new Scanner(inputBuffer); //Scanner for the buffer","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" String firstWord \u003d bufferScanner.next(); //Stores first word in the input","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" assert firstWord !\u003d null \u0026\u0026 !firstWord.isEmpty() : \"First word shouldn\u0027t be null or empty\";","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"lctxct"},"content":" //TODO: weird place to put this","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" boolean hasInputInteger \u003d bufferScanner.hasNextInt(); //Indicates that some integer was input","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" int numberInput \u003d DEFAULT_NUMBER_INPUT; //Stores the number input","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" if (hasInputInteger) {","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" numberInput \u003d bufferScanner.nextInt();","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" assert numberInput !\u003d DEFAULT_NUMBER_INPUT : \"Number input wasn\u0027t parsed correctly\";","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" //Functionalities","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"lctxct"},"content":" if (firstWord.equals(AddCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"lctxct"},"content":" return new AddCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026 hasInputInteger \u0026\u0026 !bufferScanner.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" assert numberInput \u003e 0 : \"Entry number to delete should be positive\";","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"lctxct"},"content":" return new DeleteCommand(numberInput);","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(FindCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"lctxct"},"content":" return new FindCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" } else if (inputBuffer.equals(ListCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"lctxct"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(SummaryCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"lctxct"},"content":" return new SummaryCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(HelpCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"lctxct"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(ByeCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"lctxct"},"content":" return new ByeCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.WARNING, \"Unknown input received: {0}. Throwing exception.\", inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" throw new UnknownInputException(); //Unrecognizable by Parser","lastModifiedDate":"2023-10-16"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":33,"lctxct":27}},{"path":"src/main/java/seedu/wildwatch/operation/ErrorHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.command.HelpCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyAddException;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyDeleteException;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyListException;","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyFindException;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EntryNotFoundException;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownDateFormatException;","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":"//TODO: this file should not exist","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"public class ErrorHandler {","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" private static final int DEFAULT_NUMBER_INPUT \u003d -3710; //Number never input during normal use of WildWatch","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(ErrorHandler.class.getName());","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" public static void handleError(String inputBuffer) {","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" boolean validInput \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" checkError(inputBuffer);","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" EntryHandler.handleEntry(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyInputException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" Ui.emptyDescriptionMessagePrinter(null);","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyAddException exception){","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty add input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(AddCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyDeleteException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty delete input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(DeleteCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyFindException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty find input.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(FindCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyListException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" LOGGER.info(\"List is empty.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.emptyListMessagePrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" } catch (EntryNotFoundException exception) {","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Queried entry not found.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" Ui.entryNotFoundMessagePrinter();","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownInputException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Unknown input received.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" Ui.unknownInputMessagePrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownDateFormatException | DateTimeParseException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Date is invalid.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" Ui.invalidDateMessagePrinter();","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"lctxct"},"content":" } catch (IncorrectInputException exception) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Command is invalid.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"lctxct"},"content":" Ui.incorrectInputMessagePrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" } finally {","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" if (!validInput) {","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" HelpCommand.printNeedHelpMessage();","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" public static void checkError(String inputBuffer) throws EmptyInputException, EmptyAddException,","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":" EmptyListException, EmptyDeleteException, EntryNotFoundException, UnknownDateFormatException,","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":" EmptyFindException {","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":" assert inputBuffer !\u003d null : \"Input buffer should not be null.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":" Scanner bufferScanner \u003d new Scanner(inputBuffer); //Scanner for the buffer","lastModifiedDate":"2023-10-11"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":" String firstWord; //First word of input","lastModifiedDate":"2023-10-11"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":" int numberInput \u003d DEFAULT_NUMBER_INPUT;","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":" if (!bufferScanner.hasNext()) { //Checks for the case when there is no input","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":" throw new EmptyInputException();","lastModifiedDate":"2023-10-11"},{"lineNumber":80,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":81,"author":{"gitId":"woodenclock"},"content":" firstWord \u003d bufferScanner.next();","lastModifiedDate":"2023-10-11"},{"lineNumber":82,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":" if (bufferScanner.hasNextInt()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":" numberInput \u003d bufferScanner.nextInt();","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"lctxct"},"content":" if (firstWord.equals(AddCommand.COMMAND_WORD) \u0026\u0026 !bufferScanner.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":" throw new EmptyAddException();","lastModifiedDate":"2023-10-11"},{"lineNumber":89,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(AddCommand.COMMAND_WORD) \u0026\u0026 !(DateHandler.isDateValid(inputBuffer))) {","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" throw new UnknownDateFormatException();","lastModifiedDate":"2023-10-11"},{"lineNumber":91,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026 numberInput \u003d\u003d DEFAULT_NUMBER_INPUT) {","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" throw new EmptyDeleteException();","lastModifiedDate":"2023-10-11"},{"lineNumber":93,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"lctxct"},"content":" (numberInput \u003c 1 || numberInput \u003e EntryList.getArraySize())) {","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":" throw new EntryNotFoundException();","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(FindCommand.COMMAND_WORD) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"lctxct"},"content":" !bufferScanner.hasNext() \u0026\u0026 !bufferScanner.hasNextInt()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" throw new EmptyFindException();","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(ListCommand.COMMAND_WORD) \u0026\u0026 EntryList.isArrayEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" throw new EmptyListException();","lastModifiedDate":"2023-10-11"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":83,"lctxct":20}},{"path":"src/main/java/seedu/wildwatch/operation/FileHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.io.File;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"public class FileHandler {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" private static final String FILE_PATH \u003d \"./WildWatch.txt\";","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" private static final DateTimeFormatter STD_FORMAT \u003d DateTimeFormatter.ofPattern(\"dd-MM-yy\");","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" private static File openedFile; //File to save the entries","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" public static void handleFile() {","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" if (checkFileExistence()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" Ui.fileExistMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" loadFile();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" Ui.taskLoadedMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" // Lists entries loaded from file","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" ListCommand.listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" } else { // File does not exist","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" Ui.noFileMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"lctxct"},"content":" createFile();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" BootUp.bootUpTwo(); //Welcome prompt message","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lctxct"},"content":" * Checks if file exists. Opens file if the file exists.","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"lctxct"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":" * @return true if file exists; false if not","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" public static boolean checkFileExistence() {","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" Ui.checkingIfFileExistsMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" File file \u003d new File(FILE_PATH);","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" if (!file.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" openedFile \u003d file; //File used to save tasks","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" return true;","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" * Loads tasks from file into the TaskList","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" public static void loadFile() {","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" Scanner fileReader \u003d new Scanner(openedFile); // create a Scanner using the File as the source","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" while (fileReader.hasNext()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" String lineOfFile \u003d fileReader.nextLine();","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"lctxct"},"content":" // Creates new entry from line in file","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"lctxct"},"content":" String[] entryDetails \u003d lineOfFile.split(\" \\\\| \");","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"lctxct"},"content":" Entry newEntry \u003d new Entry(entryDetails[0], entryDetails[1], entryDetails[2], entryDetails[3]);","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"lctxct"},"content":" EntryList.addEntry(newEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" } catch (FileNotFoundException exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":" Ui.fileNotFoundMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"lctxct"},"content":" * Creates new file with filename specified by {@code FILE_PATH}.","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"lctxct"},"content":" public static void createFile() {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"lctxct"},"content":" File file \u003d new File(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"lctxct"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"lctxct"},"content":" if (file.createNewFile()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"lctxct"},"content":" openedFile \u003d file;","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"lctxct"},"content":" Ui.createNewFileMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"lctxct"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"lctxct"},"content":" Ui.fileCreationFailMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"lctxct"},"content":" } catch (IOException exception) {","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"lctxct"},"content":" Ui.errorMessagePrinter(exception);","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":" * Manages the storage of tasks in a file.","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" * Write each task in the desired format to the file","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"woodenclock"},"content":" public static void saver(ArrayList\u003cEntry\u003e entries) {","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":" FileWriter writer \u003d new FileWriter(FILE_PATH);","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":" for (Entry entry : entries) {","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" writer.write(toFileString(entry) + \"\\n\");","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" writer.close();","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" } catch (IOException exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":" Ui.errorMessagePrinter(exception);","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":" * Returns String that is in the format to be written to file","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"woodenclock"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":109,"author":{"gitId":"woodenclock"},"content":" * @param entry","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"woodenclock"},"content":" * @return String","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":" * @throws IOException when there is problem with formatting the task","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":113,"author":{"gitId":"woodenclock"},"content":" public static String toFileString(Entry entry) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"woodenclock"},"content":" String date \u003d entry.getDate().format(STD_FORMAT);","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":" String species \u003d entry.getSpecies();","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"woodenclock"},"content":" String name \u003d entry.getName();","lastModifiedDate":"2023-10-22"},{"lineNumber":117,"author":{"gitId":"woodenclock"},"content":" String remark \u003d entry.getRemark();","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"lctxct"},"content":" return String.format(\"%s | %s | %s | %s\", date, species, name, remark);","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"woodenclock":79,"lctxct":42}},{"path":"src/main/java/seedu/wildwatch/operation/InputHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.Command;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.command.ByeCommand;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"public class InputHandler {","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(EntryHandler.class.getName());","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" public static void handleManualInput() {","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" while (true) {","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" Ui.inputPromptPrinter();","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" String inputBuffer \u003d Ui.inputRetriever(); //Retrieves input of user","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Input received: {0}\", inputBuffer);","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" Command command \u003d EntryHandler.handleEntry(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" if (command instanceof ByeCommand) {","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" command.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" } catch (IncorrectInputException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"lctxct"},"content":" Ui.incorrectInputMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"lctxct"},"content":" } catch (UnknownInputException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"lctxct"},"content":" Ui.unknownInputMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" EntryList.saveEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" ByeCommand.exitProgram();","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" public static void handleFileInput(String lineOfFile) {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" EntryHandler.handleEntry(lineOfFile);","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownInputException | IncorrectInputException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" //TODO: this function is no longer useful but this has to be moved somewhere","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.corruptFileMessagePrinter();","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" ShutDown.shutDown();","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" System.exit(0);","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":35,"lctxct":18}},{"path":"src/main/java/seedu/wildwatch/operation/LogHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Handler;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class LogHandler {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" static {","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" // Configure a FileHandler","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" FileHandler file \u003d new FileHandler(\"WildWatch.log\", true);","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" file.setFormatter(formatter);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" // Obtain the root logger. An empty string gets the root logger","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" // Remove the default handlers (like ConsoleHandler)","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" for (Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" // Add the FileHandler to the root logger","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" rootLogger.addHandler(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" } catch (Exception exception) {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" exception.printStackTrace();","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" public static void configure() { // Call this empty method to ensure the static block runs","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"woodenclock":33}},{"path":"src/main/java/seedu/wildwatch/operation/ShutDown.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class ShutDown {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":" public static void shutDown() {","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" //Program Ending","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Bye. Hope to see you again soon!\");","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":10}},{"path":"src/main/java/seedu/wildwatch/operation/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" * This is the Ui class that is in-charge of interaction with the user","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" * Represents the user interface of the application.","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" * Provides methods to interact with the user and display messages.","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate messages such as errors and tasks added","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"public class Ui {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" private static final int NUMBER_OF_UNDERSCORES \u003d 60;","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" private static Scanner in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" public static void inputPromptPrinter() {","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" System.out.print(\"\u003e\u003e\u003e \");","lastModifiedDate":"2023-10-28"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when checking if file exists","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" public static void checkingIfFileExistsMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Checking if \\\"WildWatch.txt\\\" already exists...\");","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file is corrupt","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" public static void corruptFileMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File is corrupted.\\nUnable to read file\");","lastModifiedDate":"2023-10-22"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" public static void entryAddedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"The following entry has been added:\");","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" public static void entryCountPrinter() {","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Now you have \" + (EntryList.getArraySize()) + \" entries in the list.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" public static void emptyDescriptionMessagePrinter(String description) {","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" if (description \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description cannot be empty. :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(AddCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of an add command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(DeleteCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of a delete command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(FindCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of a find command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description cannot be empty. :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" public static void emptyListMessagePrinter() {","lastModifiedDate":"2023-10-11"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! Nothing to list. :-(\");","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" public static void entryNotFoundMessagePrinter() {","lastModifiedDate":"2023-10-15"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The entry number could not be found :-(\");","lastModifiedDate":"2023-10-15"},{"lineNumber":68,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":69,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":" public static void entryRemovedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"The entry has been removed.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":" * Prints an error message to the console.","lastModifiedDate":"2023-10-22"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":" * @param exception The exception that occurred.","lastModifiedDate":"2023-10-22"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":" public static void errorMessagePrinter(Exception exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":80,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"An error occurred: \" + exception.getMessage());","lastModifiedDate":"2023-10-22"},{"lineNumber":81,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":82,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when creation of new file failed","lastModifiedDate":"2023-10-22"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":" public static void fileCreationFailMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File creation failed.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file already exists","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"woodenclock"},"content":" public static void fileExistMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File already exists.\\nOpening existing file...\\n\");","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file is not found","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" public static void fileNotFoundMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File not found.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":" public static void findTaskMessagePrinter(boolean hasMatch, ArrayList\u003cInteger\u003e matchingTasks) {","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":" if (!hasMatch) {","lastModifiedDate":"2023-10-25"},{"lineNumber":106,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"No matching tasks found.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Here are the matching tasks in your list:\");","lastModifiedDate":"2023-10-25"},{"lineNumber":109,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c matchingTasks.size(); i++) {","lastModifiedDate":"2023-10-25"},{"lineNumber":110,"author":{"gitId":"woodenclock"},"content":" System.out.print((i+1) + \".\");","lastModifiedDate":"2023-10-25"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":" printEntry(matchingTasks.get(i));","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"lctxct"},"content":" public static void incorrectInputMessagePrinter() {","lastModifiedDate":"2023-10-16"},{"lineNumber":117,"author":{"gitId":"lctxct"},"content":" System.out.println(\"OOPS!!! Format of command is incorrect.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":118,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":119,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":" public static void invalidDateMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! Invalid Date input :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":122,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":123,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":124,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":125,"author":{"gitId":"woodenclock"},"content":" * Returns input of the user from the console.","lastModifiedDate":"2023-10-22"},{"lineNumber":126,"author":{"gitId":"woodenclock"},"content":" * @return The user\u0027s input as a trimmed string.","lastModifiedDate":"2023-10-22"},{"lineNumber":127,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":128,"author":{"gitId":"woodenclock"},"content":" public static String inputRetriever() {","lastModifiedDate":"2023-10-22"},{"lineNumber":129,"author":{"gitId":"woodenclock"},"content":" return in.nextLine().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":130,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"woodenclock"},"content":" public static void listMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":133,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Here are the entries in your list: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":135,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":136,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":137,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when no file found","lastModifiedDate":"2023-10-22"},{"lineNumber":138,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":139,"author":{"gitId":"woodenclock"},"content":" public static void noFileMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":140,"author":{"gitId":"lctxct"},"content":" System.out.println(\"File does not exist.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":141,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":142,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":143,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":144,"author":{"gitId":"lctxct"},"content":" * Prints out message after a new file has been created.","lastModifiedDate":"2023-10-23"},{"lineNumber":145,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":146,"author":{"gitId":"lctxct"},"content":" public static void createNewFileMessagePrinter() {","lastModifiedDate":"2023-10-23"},{"lineNumber":147,"author":{"gitId":"lctxct"},"content":" System.out.println(\"Creating new file...\\nFile created successfully.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":148,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":149,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":150,"author":{"gitId":"woodenclock"},"content":" public static void printEntry(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Date: [\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":152,"author":{"gitId":"woodenclock"},"content":" EntryList.getEntryDate(nthEntry).format(DateTimeFormatter.ofPattern(\"dd-MM-yyyy\")) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":153,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Species: [\" + EntryList.getEntrySpecies(nthEntry) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Name: [\" + EntryList.getEntryName(nthEntry) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Remark: [\" + EntryList.getEntryRemark(nthEntry) + \"]\");","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-11"},{"lineNumber":157,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":158,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":159,"author":{"gitId":"woodenclock"},"content":" public static void printHorizontalLines() {","lastModifiedDate":"2023-10-12"},{"lineNumber":160,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c NUMBER_OF_UNDERSCORES; i++) {","lastModifiedDate":"2023-10-12"},{"lineNumber":161,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"_\");","lastModifiedDate":"2023-10-12"},{"lineNumber":162,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":163,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-12"},{"lineNumber":164,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":165,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":166,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":167,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when tasks are loaded","lastModifiedDate":"2023-10-22"},{"lineNumber":168,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":169,"author":{"gitId":"woodenclock"},"content":" public static void taskLoadedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":170,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"These are tasks loaded from before: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":172,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":173,"author":{"gitId":"woodenclock"},"content":" public static void unknownInputMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":174,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! I\u0027m sorry, but I don\u0027t know what that means :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":175,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":176,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":177,"author":{"gitId":"imaginarys96"},"content":" public static void printSummarySpecieMessage() {","lastModifiedDate":"2023-10-28"},{"lineNumber":178,"author":{"gitId":"imaginarys96"},"content":" System.out.println(\"Here are the species recorded: \");","lastModifiedDate":"2023-10-28"},{"lineNumber":179,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":180,"author":{"gitId":"imaginarys96"},"content":" public static void printSummaryNameMessage(String speciesName) {","lastModifiedDate":"2023-10-28"},{"lineNumber":181,"author":{"gitId":"imaginarys96"},"content":" System.out.println(\"Here is the data for the \" + speciesName + \", grouped by their names\");","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-13"},{"lineNumber":184,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":185,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"imaginarys96":7,"woodenclock":147,"tangzhenen":7,"lctxct":24}},{"path":"src/test/java/seedu/wildwatch/WildWatchTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"public class WildWatchTest {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public void isMainValid() {","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":4,"-":8}},{"path":"src/test/java/seedu/wildwatch/operation/DateHandlerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class DateHandlerTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" public void testDateHandler() {","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Testing whether date is valid...\");","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" assertTrue(DateHandler.isDateValid(\"D/ 09-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" assertFalse(DateHandler.isDateValid(\"D/9-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" assertFalse(DateHandler.isDateValid(\"D/ 99-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"woodenclock":18}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"FC ACTUAL.TXT ACTUAL.TXT \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"# diff EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"diff ACTUAL.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"-"},"content":"if [ $? -eq 0 ]","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"woodenclock":2,"-":22}}] +[{"path":"README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# Duke project template","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"-"},"content":"This is a project template for a greenfield Java project. It\u0027s named after the Java mascot _Duke_. Given below are instructions on how to use it.","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"## Setting up in Intellij","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"Prerequisites: JDK 11 (use the exact version), update Intellij to the most recent version.","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"1. **Ensure Intellij JDK 11 is defined as an SDK**, as described [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk) -- this step is not needed if you have used JDK 11 in a previous Intellij project.","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"1. **Import the project _as a Gradle project_**, as described [here](https://se-education.org/guides/tutorials/intellijImportGradleProject.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"1. **Verify the set up**: After the importing is complete, locate the `src/main/java/seedu/wildwatch/WildWatch.java` file, right-click it, and choose `Run WildWatch.main()`. If the setup is correct, you should see something like the below:","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003e Task :compileJava","lastModifiedDate":"2020-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003e Task :processResources NO-SOURCE","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003e Task :classes","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003e Task :Duke.main()","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" Hello there! Welcome to Wild Watch!","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" What is your name?","lastModifiedDate":"2020-05-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ```","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Type some word and press enter to let the execution proceed to the end.","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":"## Build automation using Gradle","lastModifiedDate":"2020-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* This project uses Gradle for build automation and dependency management. It includes a basic build script as well (i.e. the `build.gradle` file).","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* If you are new to Gradle, refer to the [Gradle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/gradle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"## Testing","lastModifiedDate":"2020-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"### I/O redirection tests","lastModifiedDate":"2020-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"* To run _I/O redirection_ tests (aka _Text UI tests_), navigate to the `text-ui-test` and run the `runtest(.bat/.sh)` script.","lastModifiedDate":"2020-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"### JUnit tests","lastModifiedDate":"2020-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":"* A skeleton JUnit test (`src/test/java/seedu/duke/DukeTest.java`) is provided with this project template. ","lastModifiedDate":"2020-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"* If you are new to JUnit, refer to the [JUnit Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/junit.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"## Checkstyle","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"* A sample CheckStyle rule configuration is provided in this project.","lastModifiedDate":"2020-05-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* If you are new to Checkstyle, refer to the [Checkstyle Tutorial at se-education.org/guides](https://se-education.org/guides/tutorials/checkstyle.html).","lastModifiedDate":"2020-05-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"## CI using GitHub Actions","lastModifiedDate":"2020-05-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"The project uses [GitHub actions](https://github.com/features/actions) for CI. When you push a commit to this repo or PR against it, GitHub actions will run automatically to build and verify the code as updated by the commit/PR.","lastModifiedDate":"2020-05-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"## Documentation","lastModifiedDate":"2020-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"`/docs` folder contains a skeleton version of the project documentation.","lastModifiedDate":"2020-05-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"Steps for publishing documentation to the public: ","lastModifiedDate":"2020-05-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"1. If you are using this project template for an individual project, go your fork on GitHub.\u003cbr\u003e","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" If you are using this project template for a team project, go to the team fork on GitHub.","lastModifiedDate":"2020-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"1. Click on the `settings` tab.","lastModifiedDate":"2020-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"1. Scroll down to the `GitHub Pages` section.","lastModifiedDate":"2020-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":"1. Set the `source` as `master branch /docs folder`.","lastModifiedDate":"2020-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"1. Optionally, use the `choose a theme` button to choose a theme for your documentation.","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":3,"-":56}},{"path":"build.gradle","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"plugins {","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":" id \u0027java\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":" id \u0027application\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":" id \u0027checkstyle\u0027","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":" id \u0027com.github.johnrengelman.shadow\u0027 version \u00277.1.2\u0027","lastModifiedDate":"2022-06-17"},{"lineNumber":6,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"repositories {","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":" mavenCentral()","lastModifiedDate":"2020-05-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"dependencies {","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" testImplementation group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-api\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" testRuntimeOnly group: \u0027org.junit.jupiter\u0027, name: \u0027junit-jupiter-engine\u0027, version: \u00275.10.0\u0027","lastModifiedDate":"2023-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"test {","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" useJUnitPlatform()","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" testLogging {","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" events \"passed\", \"skipped\", \"failed\"","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" showExceptions true","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" exceptionFormat \"full\"","lastModifiedDate":"2020-05-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" showCauses true","lastModifiedDate":"2020-05-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" showStackTraces true","lastModifiedDate":"2020-05-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" showStandardStreams \u003d false","lastModifiedDate":"2020-05-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2020-05-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"application {","lastModifiedDate":"2020-05-25"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" mainClass.set(\"seedu.wildwatch.WildWatch\")","lastModifiedDate":"2023-10-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":"shadowJar {","lastModifiedDate":"2020-05-25"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" archiveBaseName.set(\"wildwatch\")","lastModifiedDate":"2023-10-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":" archiveClassifier.set(\"\")","lastModifiedDate":"2023-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":"checkstyle {","lastModifiedDate":"2020-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" toolVersion \u003d \u002710.2\u0027","lastModifiedDate":"2022-04-29"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"run{","lastModifiedDate":"2020-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" standardInput \u003d System.in","lastModifiedDate":"2020-05-25"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" enableAssertions \u003d true","lastModifiedDate":"2023-10-16"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"woodenclock":3,"-":44}},{"path":"docs/AboutUs.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"# About us","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"| Display | Name | Github Profile | Portfolio |","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"|-------------------------------------------------------------------------------------------------------|:-----------:|:----------------------------------------:|:------------------------------------:|","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"| ![](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/252865bb-811e-48b1-9777-6c01b98500b1) | Lee Sungmin | [Github](https://github.com/woodenclock) | [Portfolio](https://github.com/AY2324S1-CS2113T-W11-2/tp/blob/master/docs/team/leesungmin.md#lee-sungmin) |","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"tangzhenen"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) |Tang Zhen En | [Github](https://github.com/tangzhenen) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"| ![](https://via.placeholder.com/100.png?text\u003dPhoto) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) |","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":4,"tangzhenen":2,"-":2}},{"path":"docs/DeveloperGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# WildWatch Developer Guide 🦣","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"## Table of Contents ","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"- [Acknowledgements](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#acknowledgements)","lastModifiedDate":"2023-10-21"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" - [Purpose](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#purpose)","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" - [Audience](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#audience)","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" - [How to use the Developer Guide](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#how-to-use-the-developer-guide)","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"- [Introduction](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#introduction)","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"- [Design \u0026 Implementation](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#design--implementation)","lastModifiedDate":"2023-10-21"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"- [Product Scope](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#product-scope)","lastModifiedDate":"2023-10-21"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" - [Target User Profile](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#target-user-profile)","lastModifiedDate":"2023-10-21"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" - [Value Proposition](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#value-proposition)","lastModifiedDate":"2023-10-21"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"- [User Story](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#user-stories)","lastModifiedDate":"2023-10-21"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"- [Non-Funtional Requirements](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#non-functional-requirements)","lastModifiedDate":"2023-10-21"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"- [Manual Testing](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#manual-testing)","lastModifiedDate":"2023-10-21"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"- [Command Summary](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#command-summary)","lastModifiedDate":"2023-10-21"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"- [Glossary](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#glossary)","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":"## Acknowledgements ","lastModifiedDate":"2020-05-24"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"Meet the [people](https://ay2324s1-cs2113t-w11-2.github.io/tp/AboutUs.html) behind WildWatch, get to know them better! ","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"Some code snippets were referenced from [woodenclock](https://github.com/woodenclock/ip.git). ","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"## Introduction 🐻","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"### Purpose","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"This document specifies the architectural and software design decisions in the implementation of the WildWatch.","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":"### Audience","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":"The intended audience for this document are developers who would like to look under the hood and understand how WildWatch works, and are looking to introduce new functionalities into WildWatch.","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"### How to use the Developer Guide ","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":"- Are you new here? ","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":"No worries, head to the [Quick Start](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#quick-start-) page.","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"- Lost among the pages? ","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":"Head to the [Table of Contents](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#table-of-contents) to look for the right pages. ","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":"- Need help with the functionalities? ","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"Head to the [Features](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#features-) page for detailed guidance. ","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":"- Do you have a question for us? ","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":"Head to the [FAQ](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#faq-) page. ","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"- Do you want a concise summary of all functionalities? ","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"Head to the [Command Summary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#command-summary-) page for a summary of all commands.","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":"- Not sure what that word meant? ","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":"Head to the [Glossary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#glossary-) page for its meaning. ","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":"### Legend","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" Symbol | Meaning","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" -------------- |------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" ❗ IMPORTANT | These are important instructions that you should follow. ","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" ⬆ Back to top | Click to scroll back up to the `Table of Contents`.","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" 🐵 🦊 🦁 | Your cute animal friends pop up to let you know that you have reached a new section.","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":"## Quick Start 🐵","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"1. Ensure you have Java 11 or above installed in your Computer. (What is my [Java version](https://www.java.com/en/download/help/version_manual.html)?)","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":"2. Download the latest `WildWatch.jar` from [here](https://github.com/AY2324S1-CS2113T-W11-2/tp/releases).","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"3. Copy the file to the folder you want to use as the home folder for your WildWatch.","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":"4. Open a command terminal, `cd` into the folder you put the jar file in, and run the following command: `java -jar WildWatch.jar`.","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":"You should see the welcome screen as the diagram below.","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":"5. Type commands below the horizontal line and press `Enter` to execute it. (e.g. typing `help` and pressing `Enter` will show the help page).","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":"Some example commands you can try:","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":"- `list` : Lists all entries. ","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"- `bye` : Exits the program. ","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":"![Image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/1dcd7951-eb68-46d5-bdae-4cb4e275d94f) ","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#table-of-contents)","lastModifiedDate":"2023-10-29"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":"## Design \u0026 Implementation","lastModifiedDate":"2023-10-21"},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":81,"author":{"gitId":"-"},"content":"{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}","lastModifiedDate":"2020-05-24"},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for a clerk managing wildlife data in a wildlife reserve via the [Command Line Interface (CLI)](https://ay2324s1-cs2113t-w11-2.github.io/tp/DeveloperGuide.html#glossary).","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":"## Product scope","lastModifiedDate":"2020-05-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":"### Target user profile","lastModifiedDate":"2020-05-24"},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":89,"author":{"gitId":"woodenclock"},"content":"Target user profile are the clerks working in zoos.","lastModifiedDate":"2023-10-21"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":92,"author":{"gitId":"-"},"content":"### Value proposition","lastModifiedDate":"2020-05-24"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":"{Describe the value proposition: what problem does it solve?}","lastModifiedDate":"2020-05-24"},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":97,"author":{"gitId":"-"},"content":"## User Stories","lastModifiedDate":"2020-05-24"},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":99,"author":{"gitId":"-"},"content":"|Version| As a ... | I want to ... | So that I can ...|","lastModifiedDate":"2020-05-24"},{"lineNumber":100,"author":{"gitId":"-"},"content":"|--------|----------|---------------|------------------|","lastModifiedDate":"2020-05-24"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":"|v1.0|new user|see help instructions|refer to them when I forget how to use the application|","lastModifiedDate":"2023-10-21"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|add an animal entry|record the animals in the zoo, and refer to them afterwards|","lastModifiedDate":"2023-10-21"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|delete an animal entry|remove redundant or invalid animal entry|","lastModifiedDate":"2023-10-21"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":"|v1.0|zoo clerk|list all the entries|see what entries I have entered previously, and refer to them|","lastModifiedDate":"2023-10-21"},{"lineNumber":105,"author":{"gitId":"-"},"content":"|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|","lastModifiedDate":"2020-05-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":108,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":109,"author":{"gitId":"-"},"content":"## Non-Functional Requirements","lastModifiedDate":"2020-05-24"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":111,"author":{"gitId":"-"},"content":"{Give non-functional requirements}","lastModifiedDate":"2020-05-24"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":"## Manual Testing","lastModifiedDate":"2023-10-21"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":117,"author":{"gitId":"-"},"content":"{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}","lastModifiedDate":"2020-05-24"},{"lineNumber":118,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":119,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":121,"author":{"gitId":"woodenclock"},"content":"## Command Summary","lastModifiedDate":"2023-10-21"},{"lineNumber":122,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":123,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-21"},{"lineNumber":124,"author":{"gitId":"woodenclock"},"content":"## Glossary","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"woodenclock"},"content":"* *glossary item* - Definition","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"woodenclock":94,"-":32}},{"path":"docs/README.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# WildWatch","lastModifiedDate":"2023-10-14"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for recording down individual wildlife in a wildlife reserve via a Command Line Interface (CLI).","lastModifiedDate":"2023-10-21"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2019-07-29"},{"lineNumber":5,"author":{"gitId":"-"},"content":"Useful links:","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"* [User Guide](UserGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"* [Developer Guide](DeveloperGuide.md)","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"* [About Us](AboutUs.md)","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":2,"-":6}},{"path":"docs/UserGuide.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# WildWatch User Guide 🐘","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"## Table of Contents ","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"- [Introduction](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#introduction-)","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" - [How to use the User Guide](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#how-to-use-the-user-guide)","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" - [Legend](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#legend)","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"- [Quick Start](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#quick-start-)","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"- [Features](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#features-)","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" - [Adding Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#1-adding-entries-add): `add`","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" - [Deleting Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#2-deleting-entries-delete): `delete`","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" - [Listing Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#3-listing-entries-list): `list`","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" - [Editiing Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#4-editing-entries-edit): `edit`","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" - [Summarizing Entries](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#5-summarizing-entries-summary): `summary`","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" - [Getting Help](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#6-getting-help--help): `help` ","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"- [FAQ](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#faq-)","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"- [Command Summary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#command-summary-)","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"- [Glossary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#glossary-)","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"## Introduction 🐻","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"Welcome aboard fellow animal lover! We are really excited to have you here! 😉 ","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for a clerk managing wildlife data in a wildlife reserve via the [Command Line Interface (CLI)](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#glossary-). ","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"The purpose of this user guide is to familiarize you with the program and help you when you face a problem using it. ","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":"Its main job is to store and present animal data, this would make your job so much more convenient!","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"### How to use the User Guide ","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":"- Are you new here? ","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"No worries, head to the [Quick Start](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#quick-start-) page, and you will be up and running in no time! ","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"- Lost among the pages? ","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"Head to the [Table of Contents](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents) to look for the right pages. ","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":"- Need help with the functionalities? ","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":"Head to the [Features](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#features-) page for detailed guidance. ","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"- Do you have a question for us? ","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"Head to the [FAQ](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#faq-) page. ","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":"- Do you want a concise summary of all functionalities? ","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":"Head to the [Command Summary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#command-summary-) page for a summary of all commands.","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"- Not sure what that word meant? ","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":"Head to the [Glossary](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#glossary-) page for its meaning. ","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"### Legend","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" Symbol | Meaning","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" -------------- |------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" ❗ IMPORTANT | These are important instructions that you should follow. ","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" ⬆ Back to top | Click to scroll back up to the `Table of Contents`.","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" 🐵 🦊 🦁 | Your cute animal friends pop up to let you know that you have reached a new section.","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":"## Quick Start 🐵","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":"1. Ensure you have Java 11 or above installed in your Computer. (What is my [Java version](https://www.java.com/en/download/help/version_manual.html)?)","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":"2. Download the latest `WildWatch.jar` from [here](https://github.com/AY2324S1-CS2113T-W11-2/tp/releases).","lastModifiedDate":"2023-10-27"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":"3. Copy the file to the folder you want to use as the home folder for your WildWatch.","lastModifiedDate":"2023-10-27"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"4. Open a command terminal, `cd` into the folder you put the jar file in, and run the following command: `java -jar WildWatch.jar`.","lastModifiedDate":"2023-10-27"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":"You should see the welcome screen as the diagram below.","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":"5. Type commands below the horizontal line and press `Enter` to execute it. (e.g. typing `help` and pressing `Enter` will show the help page).","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"Some example commands you can try:","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":"- `list` : Lists all entries. ","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":"- `bye` : Exits the program. ","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":"![Image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/1dcd7951-eb68-46d5-bdae-4cb4e275d94f) ","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":"## Features 🦊","lastModifiedDate":"2023-10-25"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":"\u003e ❗ IMPORTANT","lastModifiedDate":"2023-10-25"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":"\u003e * Capitalized words between angle brackets `\u003c \u003e` are information to be written appropriately by the user.","lastModifiedDate":"2023-10-27"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":"\u003e * E.g., `delete \u003cINDEX\u003e` should be `delete 2`","lastModifiedDate":"2023-10-26"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":81,"author":{"gitId":"imaginarys96"},"content":"### 1. Adding Entries: `add`","lastModifiedDate":"2023-10-28"},{"lineNumber":82,"author":{"gitId":"woodenclock"},"content":"Adds a new entry to the system.","lastModifiedDate":"2023-10-25"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":"Format: `add D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e`","lastModifiedDate":"2023-10-26"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":"`\u003cdate\u003e` should be in the format **DD-MM-YY**","lastModifiedDate":"2023-10-25"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":87,"author":{"gitId":"woodenclock"},"content":"Example: ","lastModifiedDate":"2023-10-25"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":"![image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/6864fe77-f579-45d1-9680-b5b30e7530b5)","lastModifiedDate":"2023-10-29"},{"lineNumber":89,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-25"},{"lineNumber":93,"author":{"gitId":"imaginarys96"},"content":"### 2. Deleting Entries: `delete`","lastModifiedDate":"2023-10-28"},{"lineNumber":94,"author":{"gitId":"woodenclock"},"content":"Deletes an entry. ","lastModifiedDate":"2023-10-25"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":"Format: `delete INDEX`","lastModifiedDate":"2023-10-25"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":"Deletes the entry at the specified INDEX. ","lastModifiedDate":"2023-10-25"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":"The index refers to the index number shown in the displayed entry list.","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":"\u003e❗ IMPORTANT","lastModifiedDate":"2023-10-29"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":"\u003e * Index must be a positive integer 1, 2, 3, ...","lastModifiedDate":"2023-10-25"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":"\u003e * Deleted items may not be recoverable","lastModifiedDate":"2023-10-25"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":"Example: ","lastModifiedDate":"2023-10-25"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":"![image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/6ab91cb4-722e-4e0b-94af-095b0a9f4f24)","lastModifiedDate":"2023-10-29"},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":108,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":109,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":110,"author":{"gitId":"imaginarys96"},"content":"### 3. Listing Entries: `list`","lastModifiedDate":"2023-10-28"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":"Shows a list of all entries of wildlife in the WildWatch so far.","lastModifiedDate":"2023-10-25"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":"Shows useful information about each entry.","lastModifiedDate":"2023-10-25"},{"lineNumber":113,"author":{"gitId":"woodenclock"},"content":"Information such as the species, name, age, gender, size, remarks are shown together.","lastModifiedDate":"2023-10-25"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":"Format: `list` ","lastModifiedDate":"2023-10-25"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":117,"author":{"gitId":"woodenclock"},"content":"Example: ","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"woodenclock"},"content":"![image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/92befe34-c75e-4269-9aeb-42a6c02344bd)","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"-"},"content":" ","lastModifiedDate":"2020-05-24"},{"lineNumber":122,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":123,"author":{"gitId":"woodenclock"},"content":"### 4. Editing Entries: `edit`","lastModifiedDate":"2023-10-29"},{"lineNumber":124,"author":{"gitId":"imaginarys96"},"content":"Edits an entry in the system.","lastModifiedDate":"2023-10-29"},{"lineNumber":125,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":126,"author":{"gitId":"imaginarys96"},"content":"Format: `edit I/\u003cINDEX\u003e D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e`","lastModifiedDate":"2023-10-29"},{"lineNumber":127,"author":{"gitId":"imaginarys96"},"content":"`\u003cdate\u003e` should be in the format **DD-MM-YY**","lastModifiedDate":"2023-10-29"},{"lineNumber":128,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":129,"author":{"gitId":"imaginarys96"},"content":"`I/\u003cINDEX\u003e` argument is required.","lastModifiedDate":"2023-10-29"},{"lineNumber":130,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":131,"author":{"gitId":"imaginarys96"},"content":"Example:","lastModifiedDate":"2023-10-29"},{"lineNumber":132,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":133,"author":{"gitId":"imaginarys96"},"content":"edit I/1 D/02-03-24 S/Annam Leaf Turtle N/Ariel R/Injured left flipper","lastModifiedDate":"2023-10-29"},{"lineNumber":134,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":135,"author":{"gitId":"imaginarys96"},"content":"The following entry has been edited:","lastModifiedDate":"2023-10-29"},{"lineNumber":136,"author":{"gitId":"imaginarys96"},"content":"Date: [02-04-2024] | Species: [Annam Leaf Turtle] | Name: [Javier] | Remark: [Injured right flipper]","lastModifiedDate":"2023-10-29"},{"lineNumber":137,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"imaginarys96"},"content":"edit I/1 S/Green Leaf Turtle","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"imaginarys96"},"content":"The following entry has been edited:","lastModifiedDate":"2023-10-29"},{"lineNumber":143,"author":{"gitId":"imaginarys96"},"content":"Date: [02-03-2023] | Species: [Green Leaf Turtle] | Name: [Ariel] | Remark: [Injured left flipper]","lastModifiedDate":"2023-10-29"},{"lineNumber":144,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":145,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":146,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":147,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-29"},{"lineNumber":148,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":149,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":150,"author":{"gitId":"woodenclock"},"content":"### 5. Summarizing Entries: `summary`","lastModifiedDate":"2023-10-29"},{"lineNumber":151,"author":{"gitId":"imaginarys96"},"content":"Shows a summary of all wildlife in the WildWatch system.","lastModifiedDate":"2023-10-29"},{"lineNumber":152,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":153,"author":{"gitId":"imaginarys96"},"content":"Format: `summary \u003cSPECIES\u003e`","lastModifiedDate":"2023-10-29"},{"lineNumber":154,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":155,"author":{"gitId":"imaginarys96"},"content":"`\u003cSPECIES\u003e` argument is optional. When specified, it will show a summary of the wildlife recorded for the specified species.","lastModifiedDate":"2023-10-29"},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":157,"author":{"gitId":"imaginarys96"},"content":"Example:","lastModifiedDate":"2023-10-29"},{"lineNumber":158,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":159,"author":{"gitId":"imaginarys96"},"content":"________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":160,"author":{"gitId":"imaginarys96"},"content":"summary","lastModifiedDate":"2023-10-29"},{"lineNumber":161,"author":{"gitId":"imaginarys96"},"content":"________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":162,"author":{"gitId":"imaginarys96"},"content":"Here are the species recorded: ","lastModifiedDate":"2023-10-29"},{"lineNumber":163,"author":{"gitId":"imaginarys96"},"content":"Annam Leaf Turtle - (2)","lastModifiedDate":"2023-10-29"},{"lineNumber":164,"author":{"gitId":"imaginarys96"},"content":"Green Leaf Turtle - (1)","lastModifiedDate":"2023-10-29"},{"lineNumber":165,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":166,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":167,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":168,"author":{"gitId":"imaginarys96"},"content":"summary Annam Leaf Turtle","lastModifiedDate":"2023-10-29"},{"lineNumber":169,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":170,"author":{"gitId":"imaginarys96"},"content":"Here is the data for the Annam Leaf Turtle, grouped by their names","lastModifiedDate":"2023-10-29"},{"lineNumber":171,"author":{"gitId":"imaginarys96"},"content":"Javier - (1)","lastModifiedDate":"2023-10-29"},{"lineNumber":172,"author":{"gitId":"imaginarys96"},"content":"Ariel - (1)","lastModifiedDate":"2023-10-29"},{"lineNumber":173,"author":{"gitId":"imaginarys96"},"content":"____________________________________________________________","lastModifiedDate":"2023-10-29"},{"lineNumber":174,"author":{"gitId":"imaginarys96"},"content":"```","lastModifiedDate":"2023-10-29"},{"lineNumber":175,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents) ","lastModifiedDate":"2023-10-29"},{"lineNumber":176,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-26"},{"lineNumber":177,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-29"},{"lineNumber":178,"author":{"gitId":"imaginarys96"},"content":"### 6. Getting Help : `help`","lastModifiedDate":"2023-10-29"},{"lineNumber":179,"author":{"gitId":"imaginarys96"},"content":"Shows the user how to use all the commands.","lastModifiedDate":"2023-10-28"},{"lineNumber":180,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":181,"author":{"gitId":"imaginarys96"},"content":"Format: `help`","lastModifiedDate":"2023-10-28"},{"lineNumber":182,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":183,"author":{"gitId":"imaginarys96"},"content":"Example: ","lastModifiedDate":"2023-10-28"},{"lineNumber":184,"author":{"gitId":"woodenclock"},"content":"![image](https://github.com/AY2324S1-CS2113T-W11-2/tp/assets/69474977/9acf7e67-2f0a-407a-9235-400661ce3fed)","lastModifiedDate":"2023-10-29"},{"lineNumber":185,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":186,"author":{"gitId":"imaginarys96"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-28"},{"lineNumber":187,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":188,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":189,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":190,"author":{"gitId":"woodenclock"},"content":"## FAQ 🦁","lastModifiedDate":"2023-10-29"},{"lineNumber":191,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":192,"author":{"gitId":"woodenclock"},"content":"\u003e **Q**: Why do I get the `OOPS!!! Invalid Date input :-(` error? ","lastModifiedDate":"2023-10-26"},{"lineNumber":193,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":194,"author":{"gitId":"imaginarys96"},"content":"Ensure the day, month, year is separated by `-` e.g., `23-05-23` in **DD-MM-YY** format. ","lastModifiedDate":"2023-10-29"},{"lineNumber":195,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":196,"author":{"gitId":"woodenclock"},"content":"\u003e **Q**: I found a bug! What do I do? ","lastModifiedDate":"2023-10-26"},{"lineNumber":197,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":198,"author":{"gitId":"imaginarys96"},"content":"Great! Please contact [Min](https://github.com/woodenclock), your help is greatly appreciated!","lastModifiedDate":"2023-10-29"},{"lineNumber":199,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-26"},{"lineNumber":200,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-27"},{"lineNumber":201,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-27"},{"lineNumber":202,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-26"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":204,"author":{"gitId":"woodenclock"},"content":"## Command Summary 🐱","lastModifiedDate":"2023-10-29"},{"lineNumber":205,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":206,"author":{"gitId":"woodenclock"},"content":"| Action | Format |","lastModifiedDate":"2023-10-29"},{"lineNumber":207,"author":{"gitId":"woodenclock"},"content":"| -------------- |------------------------------------------------------------|","lastModifiedDate":"2023-10-29"},{"lineNumber":208,"author":{"gitId":"woodenclock"},"content":"| Getting Help | `help` |","lastModifiedDate":"2023-10-29"},{"lineNumber":209,"author":{"gitId":"woodenclock"},"content":"| Add Entries | `add D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e` |","lastModifiedDate":"2023-10-29"},{"lineNumber":210,"author":{"gitId":"woodenclock"},"content":"| Delete Entries | `delete \u003cINDEX\u003e` |","lastModifiedDate":"2023-10-29"},{"lineNumber":211,"author":{"gitId":"woodenclock"},"content":"| Edit Entries | `edit I/\u003cINDEX\u003e D/\u003cDATE\u003e S/\u003cSPECIES\u003e N/\u003cNAME\u003e R/\u003cREMARKS\u003e` |","lastModifiedDate":"2023-10-29"},{"lineNumber":212,"author":{"gitId":"woodenclock"},"content":"| Summarizing Entries | `summary \u003cSPECIES\u003e` |","lastModifiedDate":"2023-10-29"},{"lineNumber":213,"author":{"gitId":"woodenclock"},"content":"| List Entries | `list` |","lastModifiedDate":"2023-10-29"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":215,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-29"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":217,"author":{"gitId":"woodenclock"},"content":"--------------------------------------------------------------------------------------------------------------------------------------","lastModifiedDate":"2023-10-29"},{"lineNumber":218,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":219,"author":{"gitId":"woodenclock"},"content":"## Glossary 🐨","lastModifiedDate":"2023-10-29"},{"lineNumber":220,"author":{"gitId":"woodenclock"},"content":"We are here to help you with terminologies used in the user guide, that may not be familiar to you.","lastModifiedDate":"2023-10-29"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":222,"author":{"gitId":"woodenclock"},"content":"| Terminology | Meaning |","lastModifiedDate":"2023-10-29"},{"lineNumber":223,"author":{"gitId":"imaginarys96"},"content":"| -------------- |------------------------------------------------------------|","lastModifiedDate":"2023-10-29"},{"lineNumber":224,"author":{"gitId":"woodenclock"},"content":"| Command Line Interface | A way to communicate with your computer using texts. |","lastModifiedDate":"2023-10-29"},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":226,"author":{"gitId":"woodenclock"},"content":"[⬆ Back to top](https://ay2324s1-cs2113t-w11-2.github.io/tp/UserGuide.html#table-of-contents)","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"imaginarys96":61,"woodenclock":143,"-":22}},{"path":"docs/team/leesungmin.md","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"# Lee Sungmin\u0027s Portfolio","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"## Project: WildWatch","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"Welcome aboard fellow animal lover! We are really excited to have you here! 😉 ","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"Wildwatch is a program for a clerk managing wildlife data in a wildlife reserve via the Command Line Interface (CLI). ","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"The purpose of this user guide is to familiarize you with the program and help you when you face a problem using it. ","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"Its main job is to store and present animal data, this would make your job so much more convenient! ","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"woodenclock":8}},{"path":"src/main/java/seedu/wildwatch/WildWatch.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.LogHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.BootUp;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.FileHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.InputHandler;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"public class WildWatch {","lastModifiedDate":"2023-10-09"},{"lineNumber":10,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" * Main entry-point for the java.wildwatch.WildWatch application.","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2019-07-29"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" LogHandler.configure(); //Configure Log","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" BootUp.bootUpOne();","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" FileHandler.handleFile(); //FileHandler takes on","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" InputHandler.handleManualInput();","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2019-07-29"},{"lineNumber":19,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2019-07-29"}],"authorContributionMap":{"woodenclock":12,"-":7}},{"path":"src/main/java/seedu/wildwatch/command/AddCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-16"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" * Command class for adding entry to EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":" public static final Pattern ADD_ENTRY_COMMAND_FORMAT \u003d","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" Pattern.compile(\"add\"","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" + \" D/(?\u003cdate\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" + \" S/(?\u003cspecies\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" + \" N/(?\u003cname\u003e[^/]+)\"","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" + \"(?: R/(?\u003cremark\u003e[^/]+))?\");","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" //TODO[PARSER]: TEMPORARY. REMOVE LATER.","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" public AddCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" public void execute() throws IncorrectInputException {","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"lctxct"},"content":" final Matcher matcher \u003d ADD_ENTRY_COMMAND_FORMAT.matcher(inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":36,"author":{"gitId":"lctxct"},"content":" if (!matcher.matches()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"lctxct"},"content":" throw new IncorrectInputException();","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":40,"author":{"gitId":"lctxct"},"content":" final String date \u003d matcher.group(\"date\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":41,"author":{"gitId":"lctxct"},"content":" final String species \u003d matcher.group(\"species\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" final String name \u003d matcher.group(\"name\").trim();","lastModifiedDate":"2023-10-16"},{"lineNumber":43,"author":{"gitId":"lctxct"},"content":" final String remark \u003d matcher.group(\"remark\");","lastModifiedDate":"2023-10-16"},{"lineNumber":44,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" EntryList.addEntry(new Entry(date, species, name, remark));","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" Ui.entryAddedMessagePrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.printEntry(EntryList.getArraySize() - 1);","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":12,"lctxct":40}},{"path":"src/main/java/seedu/wildwatch/command/ByeCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.ShutDown;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-22"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"public class ByeCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"bye\";","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(ByeCommand.class.getName());","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" public static void exitProgram() {","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Initiating shutdown procedures.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" ShutDown.shutDown();","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" //TODO: figure out a way to get rid of this","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"woodenclock":14,"lctxct":8}},{"path":"src/main/java/seedu/wildwatch/command/Command.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" * Command class for manipulating EntryList","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public abstract class Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public Command() {}","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public abstract void execute() throws IncorrectInputException;","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":8,"lctxct":4}},{"path":"src/main/java/seedu/wildwatch/command/DeleteCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-13"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-13"},{"lineNumber":5,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":6,"author":{"gitId":"tangzhenen"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" * Command class for deleting entry in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"public class DeleteCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":" private final int numberInput;","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" public DeleteCommand(int numberInput) {","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":" this.numberInput \u003d numberInput;","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"tangzhenen"},"content":" /**","lastModifiedDate":"2023-10-13"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" * Deletes entry in the EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":23,"author":{"gitId":"tangzhenen"},"content":" */","lastModifiedDate":"2023-10-13"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"tangzhenen"},"content":" if (numberInput \u003c\u003d 0 || numberInput \u003e EntryList.getArraySize()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"tangzhenen"},"content":" Ui.entryNotFoundMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"tangzhenen"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"tangzhenen"},"content":" Scanner scanner \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"tangzhenen"},"content":" Ui.printEntry(numberInput-1);","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"tangzhenen"},"content":" Ui.entryDeletionConfirmationPrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"tangzhenen"},"content":" String confirmation \u003d scanner.nextLine().trim().toLowerCase();","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"tangzhenen"},"content":" if (confirmation.equals(\"yes\")) {","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"tangzhenen"},"content":" Ui.entryRemovedMessagePrinter();","lastModifiedDate":"2023-10-13"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" EntryList.deleteEntry(numberInput);","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"tangzhenen"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-13"},{"lineNumber":37,"author":{"gitId":"tangzhenen"},"content":" } else {","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"tangzhenen"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"tangzhenen"},"content":" Ui.entryNotDeletedMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":44,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"woodenclock":10,"tangzhenen":24,"lctxct":10}},{"path":"src/main/java/seedu/wildwatch/command/EditCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"imaginarys96"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"imaginarys96"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"imaginarys96"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"imaginarys96"},"content":"public class EditCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"imaginarys96"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":" public static final Pattern EDIT_ENTRY_COMMAND_FORMAT \u003d","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":" Pattern.compile(\"edit\"","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"imaginarys96"},"content":" + \" I/(?\u003cindex\u003e[^/]+)\"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"imaginarys96"},"content":" + \"( D/(?\u003cdate\u003e[^/]+))?\"","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"imaginarys96"},"content":" + \"( S/(?\u003cspecies\u003e[^/]+))?\"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"imaginarys96"},"content":" + \"( N/(?\u003cname\u003e[^/]+))?\"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"imaginarys96"},"content":" + \"(?: R/(?\u003cremark\u003e[^/]+))?\");","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"imaginarys96"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"imaginarys96"},"content":" public EditCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"imaginarys96"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"imaginarys96"},"content":" public Entry checkAndUpdateEntry(Entry entry, String date, String species, String name, String remark) {","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"imaginarys96"},"content":" if( date !\u003d null \u0026\u0026 !date.isEmpty() ) {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"imaginarys96"},"content":" date \u003d date.trim();","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"imaginarys96"},"content":" entry.setDate(date);","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"imaginarys96"},"content":" if( species !\u003d null \u0026\u0026 !species.isEmpty() ) {","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"imaginarys96"},"content":" species \u003d species.trim();","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"imaginarys96"},"content":" entry.setSpecies(species);","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"imaginarys96"},"content":" if( name !\u003d null \u0026\u0026 !name.isEmpty() ) {","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"imaginarys96"},"content":" name \u003d name.trim();","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" entry.setName(name);","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" if( remark !\u003d null \u0026\u0026 !remark.isEmpty() ) {","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" remark \u003d remark.trim();","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" entry.setRemark(remark);","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"imaginarys96"},"content":" return entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"imaginarys96"},"content":" public void execute() throws IncorrectInputException {","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" final Matcher matcher \u003d EDIT_ENTRY_COMMAND_FORMAT.matcher(this.inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"imaginarys96"},"content":" if (!matcher.matches()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"imaginarys96"},"content":" throw new IncorrectInputException();","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"imaginarys96"},"content":" final String indexStr \u003d matcher.group(\"index\").trim();","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"imaginarys96"},"content":" final String date \u003d matcher.group(\"date\");","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"imaginarys96"},"content":" final String species \u003d matcher.group(\"species\");","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"imaginarys96"},"content":" final String name \u003d matcher.group(\"name\");","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"imaginarys96"},"content":" final String remark \u003d matcher.group(\"remark\");","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"imaginarys96"},"content":" int index \u003d Integer.parseInt(indexStr);","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"imaginarys96"},"content":" if( index \u003c\u003d 0 ) {","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"imaginarys96"},"content":" throw new IncorrectInputException();","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"imaginarys96"},"content":" index -\u003d 1; // EntryList is 0 based.","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"imaginarys96"},"content":" //System.out.println(indexStr + \" \" + date + \" \" + species + \" \" + name + \" \" + remark);","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"imaginarys96"},"content":" Entry currentEntry \u003d EntryList.getEntry(index);","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"imaginarys96"},"content":" Entry updatedEntry \u003d checkAndUpdateEntry(currentEntry, date, species, name, remark);","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"imaginarys96"},"content":" EntryList.editEntry(index, updatedEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"imaginarys96"},"content":" Ui.entryEditedMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"imaginarys96"},"content":" Ui.printEntry(index);","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"imaginarys96"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"imaginarys96":70}},{"path":"src/main/java/seedu/wildwatch/command/FindCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" * Handles the \"find\" command to search for tasks that contain a specific keyword.","lastModifiedDate":"2023-10-25"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"lctxct"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" //TODO[PARSER]: SHOULD BE REMOVED AFTER IMPLEMENTING PARSER","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" public FindCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-25"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" * Searches for tasks that contain the specified keyword and prints them.","lastModifiedDate":"2023-10-25"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" boolean hasMatch \u003d false;","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" String matchingWord \u003d inputBuffer.substring(inputBuffer.indexOf(\"find\") + 5).trim();","lastModifiedDate":"2023-10-25"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" ArrayList\u003cEntry\u003e entries \u003d EntryList.getArray();","lastModifiedDate":"2023-10-25"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" ArrayList\u003cInteger\u003e matchingEntries \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2023-10-25"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" LocalDate inputDate \u003d null;","lastModifiedDate":"2023-10-25"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" inputDate \u003d LocalDate.parse(matchingWord, DateTimeFormatter.ofPattern(\"dd-MM-yy\"));","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" } catch (DateTimeParseException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" // matchingWord is not a date","lastModifiedDate":"2023-10-25"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" for (Entry entry: entries) {","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" boolean isInputADate \u003d (inputDate !\u003d null \u0026\u0026 entry.getDate().equals(inputDate));","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" if (entry.getSpecies().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" || entry.getSpecies().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" || entry.getName().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" || entry.getName().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" || entry.getRemark().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" || entry.getRemark().toLowerCase().contains(matchingWord)","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" || isInputADate) {","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" hasMatch \u003d true;","lastModifiedDate":"2023-10-25"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" matchingEntries.add(entries.indexOf(entry));","lastModifiedDate":"2023-10-25"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" Ui.findTaskMessagePrinter(hasMatch, matchingEntries);","lastModifiedDate":"2023-10-25"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":47,"lctxct":12}},{"path":"src/main/java/seedu/wildwatch/command/HelpCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class HelpCommand extends Command {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"help\";","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" * Requires UPDATE","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":" private static final String helpCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":" \"1. Get help - show the list of commands available for this app\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":" \" Format: help\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" \" help\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":17,"author":{"gitId":"imaginarys96"},"content":" private static final String addCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":20,"author":{"gitId":"imaginarys96"},"content":" \"2. To add a new wildlife\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":21,"author":{"gitId":"imaginarys96"},"content":" \" Format: add D/DATE S/SPECIES N/NAME R/REMARKS\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":22,"author":{"gitId":"imaginarys96"},"content":" \" DATE should be in the format DD-MM-YY\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":23,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" \" add D/02-03-23 S/Annam Leaf Turtle N/Ariel R/Injured left flipper\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":25,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":26,"author":{"gitId":"imaginarys96"},"content":" private static final String listCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":29,"author":{"gitId":"imaginarys96"},"content":" \"3. To list all wildlife,\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":30,"author":{"gitId":"imaginarys96"},"content":" \" Format: list\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":31,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" \" list\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":33,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" private static final String deleteCommandMessage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" \"4. To delete a wildlife\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" \" Format: delete INDEX\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" \" The index refers to the index number shown in the displayed observation list.\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" \" Note:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" \" - The index must be a positive integer:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" \" - Deleted items may not be recoverable:\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":43,"author":{"gitId":"imaginarys96"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" \" delete 1\\n\" +","lastModifiedDate":"2023-10-14"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" \"_________________________________________________________________\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-14"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" private static final String helpPage \u003d","lastModifiedDate":"2023-10-14"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-18"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" \"---------------------------HELP PAGE-----------------------------\\n\"+","lastModifiedDate":"2023-10-18"},{"lineNumber":50,"author":{"gitId":"imaginarys96"},"content":" helpCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":51,"author":{"gitId":"imaginarys96"},"content":" addCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":52,"author":{"gitId":"imaginarys96"},"content":" listCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":53,"author":{"gitId":"imaginarys96"},"content":" deleteCommandMessage +","lastModifiedDate":"2023-10-14"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" \"-------------------------HELP PAGE END---------------------------\\n\";","lastModifiedDate":"2023-10-18"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" private static final String needHelpPage \u003d","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" \"Please type \\\"help\\\" if you need help\" +","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" \"\\n\";","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" public static void printNeedHelpMessage() {","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" System.out.println(needHelpPage);","lastModifiedDate":"2023-10-22"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" * Prints out help page","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"lctxct"},"content":" System.out.println(\"No worries, I\u0027m here to help!\");","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" System.out.println(helpPage);","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"imaginarys96":30,"woodenclock":40,"lctxct":5}},{"path":"src/main/java/seedu/wildwatch/command/ListCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" * Command class for listing all entries in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" * Lists out all entry in EntryList","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"lctxct"},"content":" public static void listEntry() {","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" int arraySize \u003d EntryList.getArraySize();","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c arraySize; i++) {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" System.out.print(i + 1 + \".\");","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" Ui.printEntry(i);","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" Ui.entryCountPrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" public void execute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" Ui.listMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":21,"lctxct":9}},{"path":"src/main/java/seedu/wildwatch/command/SummaryCommand.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"imaginarys96"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-28"},{"lineNumber":2,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":3,"author":{"gitId":"imaginarys96"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-28"},{"lineNumber":4,"author":{"gitId":"imaginarys96"},"content":"import java.util.HashMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":5,"author":{"gitId":"imaginarys96"},"content":"import java.util.List;","lastModifiedDate":"2023-10-28"},{"lineNumber":6,"author":{"gitId":"imaginarys96"},"content":"import java.util.Map;","lastModifiedDate":"2023-10-28"},{"lineNumber":7,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":8,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-28"},{"lineNumber":9,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-28"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-28"},{"lineNumber":11,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.operation.Ui;","lastModifiedDate":"2023-10-28"},{"lineNumber":12,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":"/**","lastModifiedDate":"2023-10-28"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":" * Command class for `summary`","lastModifiedDate":"2023-10-28"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":" */","lastModifiedDate":"2023-10-28"},{"lineNumber":16,"author":{"gitId":"imaginarys96"},"content":"public class SummaryCommand extends Command {","lastModifiedDate":"2023-10-28"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"lctxct"},"content":" public static final String COMMAND_WORD \u003d \"summary\";","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" //TODO[PARSER]: REMOVE LATER","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" private String inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":" public SummaryCommand(String inputBuffer) {","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" this.inputBuffer \u003d inputBuffer;","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" private static Map\u003cString, List\u003cEntry\u003e\u003e groupEntriesBySpecies(List\u003cEntry\u003e entries) {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":29,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e map \u003d new HashMap\u003cString, List\u003cEntry\u003e\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":30,"author":{"gitId":"imaginarys96"},"content":" for (Entry entry : entries) {","lastModifiedDate":"2023-10-28"},{"lineNumber":31,"author":{"gitId":"imaginarys96"},"content":" String key \u003d entry.getSpecies();","lastModifiedDate":"2023-10-28"},{"lineNumber":32,"author":{"gitId":"imaginarys96"},"content":" if(map.containsKey(key)){","lastModifiedDate":"2023-10-28"},{"lineNumber":33,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d map.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":35,"author":{"gitId":"imaginarys96"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":36,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d new ArrayList\u003cEntry\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" map.put(key, list);","lastModifiedDate":"2023-10-28"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" return map;","lastModifiedDate":"2023-10-28"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":43,"author":{"gitId":"lctxct"},"content":" private static Map\u003cString, List\u003cEntry\u003e\u003e groupSpecieByName(List\u003cEntry\u003e filteredEntries) {","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e filteredMap \u003d new HashMap\u003cString, List\u003cEntry\u003e\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":45,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":" for (Entry entry : filteredEntries) {","lastModifiedDate":"2023-10-28"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" String key \u003d entry.getName();","lastModifiedDate":"2023-10-28"},{"lineNumber":48,"author":{"gitId":"imaginarys96"},"content":" if(filteredMap.containsKey(key)){","lastModifiedDate":"2023-10-28"},{"lineNumber":49,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d filteredMap.get(key);","lastModifiedDate":"2023-10-28"},{"lineNumber":50,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":51,"author":{"gitId":"imaginarys96"},"content":" }else{","lastModifiedDate":"2023-10-28"},{"lineNumber":52,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e list \u003d new ArrayList\u003cEntry\u003e();","lastModifiedDate":"2023-10-28"},{"lineNumber":53,"author":{"gitId":"imaginarys96"},"content":" list.add(entry);","lastModifiedDate":"2023-10-28"},{"lineNumber":54,"author":{"gitId":"imaginarys96"},"content":" filteredMap.put(key, list);","lastModifiedDate":"2023-10-28"},{"lineNumber":55,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":56,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":57,"author":{"gitId":"imaginarys96"},"content":" return filteredMap;","lastModifiedDate":"2023-10-28"},{"lineNumber":58,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":59,"author":{"gitId":"lctxct"},"content":" public void execute() throws IncorrectInputException {","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"imaginarys96"},"content":" String argument \u003d inputBuffer.replace(\"summary\",\"\").trim();","lastModifiedDate":"2023-10-28"},{"lineNumber":61,"author":{"gitId":"imaginarys96"},"content":" String speciesName \u003d argument;","lastModifiedDate":"2023-10-28"},{"lineNumber":62,"author":{"gitId":"imaginarys96"},"content":" boolean hasArgument \u003d !argument.isEmpty();","lastModifiedDate":"2023-10-28"},{"lineNumber":63,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":64,"author":{"gitId":"imaginarys96"},"content":" ArrayList\u003cEntry\u003e entries \u003d EntryList.getArray();","lastModifiedDate":"2023-10-28"},{"lineNumber":65,"author":{"gitId":"imaginarys96"},"content":" // Group entries by .species attribute","lastModifiedDate":"2023-10-28"},{"lineNumber":66,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e map \u003d groupEntriesBySpecies(entries);","lastModifiedDate":"2023-10-28"},{"lineNumber":67,"author":{"gitId":"imaginarys96"},"content":" // change message based on whether `summary` or `summary \u003cspecies\u003e`","lastModifiedDate":"2023-10-28"},{"lineNumber":68,"author":{"gitId":"imaginarys96"},"content":" if( hasArgument ) {","lastModifiedDate":"2023-10-28"},{"lineNumber":69,"author":{"gitId":"imaginarys96"},"content":" Ui.printSummaryNameMessage(speciesName);","lastModifiedDate":"2023-10-28"},{"lineNumber":70,"author":{"gitId":"imaginarys96"},"content":" List\u003cEntry\u003e filteredEntries \u003d map.get(speciesName);","lastModifiedDate":"2023-10-28"},{"lineNumber":71,"author":{"gitId":"imaginarys96"},"content":" Map\u003cString, List\u003cEntry\u003e\u003e filteredMap \u003d groupSpecieByName(filteredEntries);","lastModifiedDate":"2023-10-28"},{"lineNumber":72,"author":{"gitId":"imaginarys96"},"content":" filteredMap.forEach((key, value) -\u003e System.out.println(key + \" - (\" + value.size() + \")\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":73,"author":{"gitId":"imaginarys96"},"content":" } else {","lastModifiedDate":"2023-10-28"},{"lineNumber":74,"author":{"gitId":"imaginarys96"},"content":" Ui.printSummarySpecieMessage();","lastModifiedDate":"2023-10-28"},{"lineNumber":75,"author":{"gitId":"imaginarys96"},"content":" map.forEach((key, value) -\u003e System.out.println(key + \" - (\" + value.size() + \")\"));","lastModifiedDate":"2023-10-28"},{"lineNumber":76,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":77,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":78,"author":{"gitId":"imaginarys96"},"content":"}","lastModifiedDate":"2023-10-28"}],"authorContributionMap":{"imaginarys96":65,"woodenclock":1,"lctxct":12}},{"path":"src/main/java/seedu/wildwatch/entry/Entry.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.entry;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-09"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"public class Entry {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" private LocalDate date;","lastModifiedDate":"2023-10-09"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" private String species;","lastModifiedDate":"2023-10-09"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" private String name;","lastModifiedDate":"2023-10-15"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" private String remark;","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" public Entry(String date, String species, String name, String remark) {","lastModifiedDate":"2023-10-15"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" DateTimeFormatter inputFormat \u003d DateTimeFormatter.ofPattern(\"dd-MM-yy\");","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" this.date \u003d LocalDate.parse(date, inputFormat);","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" this.species \u003d species;","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-15"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" this.remark \u003d remark;","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" public LocalDate getDate() {","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" return date;","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" public String getSpecies() {","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" return species;","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" public String getName() {","lastModifiedDate":"2023-10-15"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" return name;","lastModifiedDate":"2023-10-15"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" public String getRemark() {","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" return remark;","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"imaginarys96"},"content":" public void setDate(String date) {","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"imaginarys96"},"content":" DateTimeFormatter inputFormat \u003d DateTimeFormatter.ofPattern(\"dd-MM-yy\");","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":" this.date \u003d LocalDate.parse(date, inputFormat);","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"imaginarys96"},"content":" public void setSpecies(String species) {","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"imaginarys96"},"content":" this.species \u003d species;","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"imaginarys96"},"content":" public void setName(String name) {","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"imaginarys96"},"content":" this.name \u003d name;","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"imaginarys96"},"content":" public void setRemark(String remark) {","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":" this.remark \u003d remark;","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"imaginarys96":13,"woodenclock":35}},{"path":"src/main/java/seedu/wildwatch/entry/EntryList.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.entry;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.operation.FileHandler;","lastModifiedDate":"2023-10-22"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.time.LocalDate;","lastModifiedDate":"2023-10-11"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class EntryList {","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" private static ArrayList\u003cEntry\u003e entries \u003d new ArrayList\u003c\u003e(); //Keeps track of all Entry instances made","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" public static ArrayList\u003cEntry\u003e getArray() {","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" return entries;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" public static int getArraySize() {","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" return entries.size();","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"lctxct"},"content":" public static void addEntry(Entry newEntry) {","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"lctxct"},"content":" entries.add(newEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" public static void deleteEntry(int numberInput){","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" entries.remove(numberInput - 1);","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"tangzhenen"},"content":" public static void clearEntry(){","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"tangzhenen"},"content":" entries.clear();","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" public static Entry getEntry(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" return entries.get(nthEntry);","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"imaginarys96"},"content":" public static void editEntry(int nthEntry, Entry updatedEntry) {","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"imaginarys96"},"content":" entries.set(nthEntry, updatedEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" public static LocalDate getEntryDate(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getDate();","lastModifiedDate":"2023-10-22"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" public static String getEntrySpecies(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getSpecies();","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" public static String getEntryName(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getName();","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" public static String getEntryRemark(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" return getEntry(nthEntry).getRemark();","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" public static boolean isArrayEmpty() {","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" return entries.isEmpty();","lastModifiedDate":"2023-10-11"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" public static void saveEntry() {","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" FileHandler.saver(entries);","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"imaginarys96":4,"woodenclock":52,"tangzhenen":3,"lctxct":2}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyAddException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyAddException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyDeleteException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyDeleteException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyFindException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyFindException extends Exception {","lastModifiedDate":"2023-10-25"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyInputException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EmptyListException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EmptyListException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/EntryNotFoundException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-15"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-15"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class EntryNotFoundException extends Exception {","lastModifiedDate":"2023-10-15"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-15"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/IncorrectInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"lctxct"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"public class IncorrectInputException extends Exception {","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"lctxct":4}},{"path":"src/main/java/seedu/wildwatch/exception/UnknownDateFormatException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class UnknownDateFormatException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/exception/UnknownInputException.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.exception;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class UnknownInputException extends Exception {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":4}},{"path":"src/main/java/seedu/wildwatch/operation/BootUp.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class BootUp {","lastModifiedDate":"2023-10-09"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":" public static final String WELCOME_MESSAGE_1 \u003d","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" \"Hello there! Welcome to WildWatch!\\n\";","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" public static final String WELCOME_MESSAGE_2 \u003d","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" \"What would you like to do?\\n\";","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" public static final String LOGO \u003d","lastModifiedDate":"2023-10-09"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" \"____ __ ____ __ __ _______\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" \"\\\\ \\\\ / \\\\ / / | | | | | \\\\\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" \" \\\\ \\\\/ \\\\/ / | | | | | .--. |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" \" \\\\ / | | | | | | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" \" \\\\ /\\\\ / | | | `----.| \u0027--\u0027 |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" \" \\\\__/ \\\\__/ |__| |_______||_______/\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" \"____ __ ____ ___ .___________. ______ __ __\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" \"\\\\ \\\\ / \\\\ / / / \\\\ | | / || | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" \" \\\\ \\\\/ \\\\/ / / ^ \\\\ `---| |----`| ,----\u0027| |__| |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" \" \\\\ / / /_\\\\ \\\\ | | | | | __ |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" \" \\\\ /\\\\ / / _____ \\\\ | | | `----.| | | |\\n\" +","lastModifiedDate":"2023-10-09"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" \" \\\\__/ \\\\__/ /__/ \\\\__\\\\ |__| \\\\______||__| |__|\\n\";","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" public static void bootUpOne() {","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.LOGO);","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.WELCOME_MESSAGE_1);","lastModifiedDate":"2023-10-22"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" public static void bootUpTwo() {","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" System.out.print(BootUp.WELCOME_MESSAGE_2);","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-09"}],"authorContributionMap":{"woodenclock":35}},{"path":"src/main/java/seedu/wildwatch/operation/DateHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"public class DateHandler {","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" private static final Pattern DATE_PATTERN \u003d Pattern.compile(","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" \"(0[1-9]|[1-2][0-9]|3[0-1])-(0[1-9]|1[0-2])-\\\\d{2}\" // dd-mm-yy","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" );","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public static boolean isDateValid(String inputBuffer) {","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" //Trims off everything except date","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" CharSequence date \u003d inputBuffer.substring(inputBuffer.indexOf(\"D/\") + 2, inputBuffer.indexOf(\"S/\")).trim();","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" if (DATE_PATTERN.matcher(date).matches()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" return true;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" } catch (StringIndexOutOfBoundsException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":21}},{"path":"src/main/java/seedu/wildwatch/operation/EntryHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.Command;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.EditCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.SummaryCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.ByeCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"imaginarys96"},"content":"import seedu.wildwatch.command.HelpCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"public class EntryHandler {","lastModifiedDate":"2023-10-22"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" private static final int DEFAULT_NUMBER_INPUT \u003d -3710; //Number that can never be input in normal use of WildWatch","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(EntryHandler.class.getName());","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":" public static Command handleEntry(String inputBuffer)","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" throws UnknownInputException, IncorrectInputException {","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Managing entry for input: {0}\", inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" Scanner bufferScanner \u003d new Scanner(inputBuffer); //Scanner for the buffer","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" String firstWord \u003d bufferScanner.next(); //Stores first word in the input","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" assert firstWord !\u003d null \u0026\u0026 !firstWord.isEmpty() : \"First word shouldn\u0027t be null or empty\";","lastModifiedDate":"2023-10-16"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"lctxct"},"content":" //TODO: weird place to put this","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" boolean hasInputInteger \u003d bufferScanner.hasNextInt(); //Indicates that some integer was input","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" int numberInput \u003d DEFAULT_NUMBER_INPUT; //Stores the number input","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" if (hasInputInteger) {","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" numberInput \u003d bufferScanner.nextInt();","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" assert numberInput !\u003d DEFAULT_NUMBER_INPUT : \"Number input wasn\u0027t parsed correctly\";","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" //Functionalities","lastModifiedDate":"2023-10-11"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" if (firstWord.equals(AddCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"lctxct"},"content":" return new AddCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026 hasInputInteger \u0026\u0026 !bufferScanner.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"woodenclock"},"content":" assert numberInput \u003e 0 : \"Entry number to delete should be positive\";","lastModifiedDate":"2023-10-16"},{"lineNumber":46,"author":{"gitId":"lctxct"},"content":" return new DeleteCommand(numberInput);","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(FindCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"lctxct"},"content":" return new FindCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"lctxct"},"content":" } else if (inputBuffer.equals(ListCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"lctxct"},"content":" return new ListCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(SummaryCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"lctxct"},"content":" return new SummaryCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(HelpCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"lctxct"},"content":" return new HelpCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(ByeCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"lctxct"},"content":" return new ByeCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"imaginarys96"},"content":" } else if (firstWord.equals(EditCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"imaginarys96"},"content":" return new EditCommand(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-16"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.WARNING, \"Unknown input received: {0}. Throwing exception.\", inputBuffer);","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":" throw new UnknownInputException(); //Unrecognizable by Parser","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"imaginarys96":12,"woodenclock":33,"lctxct":19}},{"path":"src/main/java/seedu/wildwatch/operation/ErrorHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeParseException;","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.command.HelpCommand;","lastModifiedDate":"2023-10-15"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyAddException;","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyDeleteException;","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyListException;","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EmptyFindException;","lastModifiedDate":"2023-10-25"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.EntryNotFoundException;","lastModifiedDate":"2023-10-15"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownDateFormatException;","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":"//TODO: this file should not exist","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":"public class ErrorHandler {","lastModifiedDate":"2023-10-11"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" private static final int DEFAULT_NUMBER_INPUT \u003d -3710; //Number never input during normal use of WildWatch","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(ErrorHandler.class.getName());","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" ","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" public static void handleError(String inputBuffer) {","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" boolean validInput \u003d false;","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-11"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" checkError(inputBuffer);","lastModifiedDate":"2023-10-11"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" EntryHandler.handleEntry(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyInputException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" Ui.emptyDescriptionMessagePrinter(null);","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyAddException exception){","lastModifiedDate":"2023-10-11"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty add input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(AddCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyDeleteException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty delete input.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":42,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(DeleteCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyFindException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Received an empty find input.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" Ui.emptyDescriptionMessagePrinter(FindCommand.COMMAND_WORD);","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" } catch (EmptyListException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" LOGGER.info(\"List is empty.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.emptyListMessagePrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-11"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" } catch (EntryNotFoundException exception) {","lastModifiedDate":"2023-10-15"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Queried entry not found.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" Ui.entryNotFoundMessagePrinter();","lastModifiedDate":"2023-10-15"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" validInput \u003d true;","lastModifiedDate":"2023-10-15"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownInputException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Unknown input received.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" Ui.unknownInputMessagePrinter();","lastModifiedDate":"2023-10-11"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownDateFormatException | DateTimeParseException exception) {","lastModifiedDate":"2023-10-11"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Date is invalid.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" Ui.invalidDateMessagePrinter();","lastModifiedDate":"2023-10-15"},{"lineNumber":60,"author":{"gitId":"lctxct"},"content":" } catch (IncorrectInputException exception) {","lastModifiedDate":"2023-10-16"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Command is invalid.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":62,"author":{"gitId":"lctxct"},"content":" Ui.incorrectInputMessagePrinter();","lastModifiedDate":"2023-10-16"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" } finally {","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" if (!validInput) {","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" HelpCommand.printNeedHelpMessage();","lastModifiedDate":"2023-10-22"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" public static void checkError(String inputBuffer) throws EmptyInputException, EmptyAddException,","lastModifiedDate":"2023-10-11"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":" EmptyListException, EmptyDeleteException, EntryNotFoundException, UnknownDateFormatException,","lastModifiedDate":"2023-10-25"},{"lineNumber":73,"author":{"gitId":"woodenclock"},"content":" EmptyFindException {","lastModifiedDate":"2023-10-25"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":" assert inputBuffer !\u003d null : \"Input buffer should not be null.\";","lastModifiedDate":"2023-10-16"},{"lineNumber":75,"author":{"gitId":"woodenclock"},"content":" Scanner bufferScanner \u003d new Scanner(inputBuffer); //Scanner for the buffer","lastModifiedDate":"2023-10-11"},{"lineNumber":76,"author":{"gitId":"woodenclock"},"content":" String firstWord; //First word of input","lastModifiedDate":"2023-10-11"},{"lineNumber":77,"author":{"gitId":"woodenclock"},"content":" int numberInput \u003d DEFAULT_NUMBER_INPUT;","lastModifiedDate":"2023-10-15"},{"lineNumber":78,"author":{"gitId":"woodenclock"},"content":" if (!bufferScanner.hasNext()) { //Checks for the case when there is no input","lastModifiedDate":"2023-10-11"},{"lineNumber":79,"author":{"gitId":"woodenclock"},"content":" throw new EmptyInputException();","lastModifiedDate":"2023-10-11"},{"lineNumber":80,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-11"},{"lineNumber":81,"author":{"gitId":"woodenclock"},"content":" firstWord \u003d bufferScanner.next();","lastModifiedDate":"2023-10-11"},{"lineNumber":82,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":83,"author":{"gitId":"woodenclock"},"content":" if (bufferScanner.hasNextInt()) {","lastModifiedDate":"2023-10-15"},{"lineNumber":84,"author":{"gitId":"woodenclock"},"content":" numberInput \u003d bufferScanner.nextInt();","lastModifiedDate":"2023-10-15"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-15"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":87,"author":{"gitId":"lctxct"},"content":" if (firstWord.equals(AddCommand.COMMAND_WORD) \u0026\u0026 !bufferScanner.hasNext()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":" throw new EmptyAddException();","lastModifiedDate":"2023-10-11"},{"lineNumber":89,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(AddCommand.COMMAND_WORD) \u0026\u0026 !(DateHandler.isDateValid(inputBuffer))) {","lastModifiedDate":"2023-10-29"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" throw new UnknownDateFormatException();","lastModifiedDate":"2023-10-11"},{"lineNumber":91,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026 numberInput \u003d\u003d DEFAULT_NUMBER_INPUT) {","lastModifiedDate":"2023-10-29"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" throw new EmptyDeleteException();","lastModifiedDate":"2023-10-11"},{"lineNumber":93,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(DeleteCommand.COMMAND_WORD) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":94,"author":{"gitId":"lctxct"},"content":" (numberInput \u003c 1 || numberInput \u003e EntryList.getArraySize())) {","lastModifiedDate":"2023-10-29"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":" throw new EntryNotFoundException();","lastModifiedDate":"2023-10-15"},{"lineNumber":96,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(FindCommand.COMMAND_WORD) \u0026\u0026","lastModifiedDate":"2023-10-29"},{"lineNumber":97,"author":{"gitId":"lctxct"},"content":" !bufferScanner.hasNext() \u0026\u0026 !bufferScanner.hasNextInt()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" throw new EmptyFindException();","lastModifiedDate":"2023-10-25"},{"lineNumber":99,"author":{"gitId":"lctxct"},"content":" } else if (firstWord.equals(ListCommand.COMMAND_WORD) \u0026\u0026 EntryList.isArrayEmpty()) {","lastModifiedDate":"2023-10-29"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" throw new EmptyListException();","lastModifiedDate":"2023-10-11"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":83,"lctxct":20}},{"path":"src/main/java/seedu/wildwatch/operation/FileHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-22"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.ListCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-22"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import java.io.IOException;","lastModifiedDate":"2023-10-22"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.io.File;","lastModifiedDate":"2023-10-22"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.io.FileWriter;","lastModifiedDate":"2023-10-22"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2023-10-22"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-22"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-22"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-22"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"public class FileHandler {","lastModifiedDate":"2023-10-22"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" private static final String FILE_PATH \u003d \"./WildWatch.txt\";","lastModifiedDate":"2023-10-22"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" private static final DateTimeFormatter STD_FORMAT \u003d DateTimeFormatter.ofPattern(\"dd-MM-yy\");","lastModifiedDate":"2023-10-22"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" private static File openedFile; //File to save the entries","lastModifiedDate":"2023-10-22"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" public static void handleFile() {","lastModifiedDate":"2023-10-22"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" if (checkFileExistence()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" Ui.fileExistMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" loadFile();","lastModifiedDate":"2023-10-22"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" Ui.taskLoadedMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" // Lists entries loaded from file","lastModifiedDate":"2023-10-23"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":" ListCommand.listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"lctxct"},"content":" } else { // File does not exist","lastModifiedDate":"2023-10-23"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" Ui.noFileMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":30,"author":{"gitId":"lctxct"},"content":" createFile();","lastModifiedDate":"2023-10-23"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" BootUp.bootUpTwo(); //Welcome prompt message","lastModifiedDate":"2023-10-23"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":36,"author":{"gitId":"lctxct"},"content":" * Checks if file exists. Opens file if the file exists.","lastModifiedDate":"2023-10-23"},{"lineNumber":37,"author":{"gitId":"lctxct"},"content":" *","lastModifiedDate":"2023-10-23"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":" * @return true if file exists; false if not","lastModifiedDate":"2023-10-23"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" public static boolean checkFileExistence() {","lastModifiedDate":"2023-10-22"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-22"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" Ui.checkingIfFileExistsMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" File file \u003d new File(FILE_PATH);","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" if (!file.exists()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" return false;","lastModifiedDate":"2023-10-22"},{"lineNumber":47,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" openedFile \u003d file; //File used to save tasks","lastModifiedDate":"2023-10-22"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" return true;","lastModifiedDate":"2023-10-22"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" * Loads tasks from file into the TaskList","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" public static void loadFile() {","lastModifiedDate":"2023-10-22"},{"lineNumber":57,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" Scanner fileReader \u003d new Scanner(openedFile); // create a Scanner using the File as the source","lastModifiedDate":"2023-10-22"},{"lineNumber":59,"author":{"gitId":"woodenclock"},"content":" while (fileReader.hasNext()) {","lastModifiedDate":"2023-10-22"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" String lineOfFile \u003d fileReader.nextLine();","lastModifiedDate":"2023-10-22"},{"lineNumber":61,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"lctxct"},"content":" // Creates new entry from line in file","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"lctxct"},"content":" String[] entryDetails \u003d lineOfFile.split(\" \\\\| \");","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"lctxct"},"content":" Entry newEntry \u003d new Entry(entryDetails[0], entryDetails[1], entryDetails[2], entryDetails[3]);","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"lctxct"},"content":" EntryList.addEntry(newEntry);","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" } catch (FileNotFoundException exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":" Ui.fileNotFoundMessagePrinter();","lastModifiedDate":"2023-10-22"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":72,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":73,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":74,"author":{"gitId":"lctxct"},"content":" * Creates new file with filename specified by {@code FILE_PATH}.","lastModifiedDate":"2023-10-23"},{"lineNumber":75,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":76,"author":{"gitId":"lctxct"},"content":" public static void createFile() {","lastModifiedDate":"2023-10-23"},{"lineNumber":77,"author":{"gitId":"lctxct"},"content":" File file \u003d new File(FILE_PATH);","lastModifiedDate":"2023-10-23"},{"lineNumber":78,"author":{"gitId":"lctxct"},"content":" try {","lastModifiedDate":"2023-10-23"},{"lineNumber":79,"author":{"gitId":"lctxct"},"content":" if (file.createNewFile()) {","lastModifiedDate":"2023-10-23"},{"lineNumber":80,"author":{"gitId":"lctxct"},"content":" openedFile \u003d file;","lastModifiedDate":"2023-10-23"},{"lineNumber":81,"author":{"gitId":"lctxct"},"content":" Ui.createNewFileMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":82,"author":{"gitId":"lctxct"},"content":" } else {","lastModifiedDate":"2023-10-23"},{"lineNumber":83,"author":{"gitId":"lctxct"},"content":" Ui.fileCreationFailMessagePrinter();","lastModifiedDate":"2023-10-23"},{"lineNumber":84,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":85,"author":{"gitId":"lctxct"},"content":" } catch (IOException exception) {","lastModifiedDate":"2023-10-23"},{"lineNumber":86,"author":{"gitId":"lctxct"},"content":" Ui.errorMessagePrinter(exception);","lastModifiedDate":"2023-10-23"},{"lineNumber":87,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":88,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":89,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":" * Manages the storage of tasks in a file.","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" * Write each task in the desired format to the file","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"woodenclock"},"content":" public static void saver(ArrayList\u003cEntry\u003e entries) {","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":" FileWriter writer \u003d new FileWriter(FILE_PATH);","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":" for (Entry entry : entries) {","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" writer.write(toFileString(entry) + \"\\n\");","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" writer.close();","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" } catch (IOException exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":" Ui.errorMessagePrinter(exception);","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":" * Returns String that is in the format to be written to file","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"woodenclock"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":109,"author":{"gitId":"woodenclock"},"content":" * @param entry","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"woodenclock"},"content":" * @return String","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":" * @throws IOException when there is problem with formatting the task","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":113,"author":{"gitId":"woodenclock"},"content":" public static String toFileString(Entry entry) throws IOException {","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"woodenclock"},"content":" String date \u003d entry.getDate().format(STD_FORMAT);","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":" String species \u003d entry.getSpecies();","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"woodenclock"},"content":" String name \u003d entry.getName();","lastModifiedDate":"2023-10-22"},{"lineNumber":117,"author":{"gitId":"woodenclock"},"content":" String remark \u003d entry.getRemark();","lastModifiedDate":"2023-10-22"},{"lineNumber":118,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":119,"author":{"gitId":"lctxct"},"content":" return String.format(\"%s | %s | %s | %s\", date, species, name, remark);","lastModifiedDate":"2023-10-29"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":121,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-22"}],"authorContributionMap":{"woodenclock":79,"lctxct":42}},{"path":"src/main/java/seedu/wildwatch/operation/InputHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-25"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.Command;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.command.ByeCommand;","lastModifiedDate":"2023-10-25"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-25"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.IncorrectInputException;","lastModifiedDate":"2023-10-25"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.exception.UnknownInputException;","lastModifiedDate":"2023-10-25"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Level;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-25"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"public class InputHandler {","lastModifiedDate":"2023-10-25"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(InputHandler.class.getName());","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" public static void handleManualInput() {","lastModifiedDate":"2023-10-25"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" while (true) {","lastModifiedDate":"2023-10-25"},{"lineNumber":17,"author":{"gitId":"lctxct"},"content":" Ui.inputPromptPrinter();","lastModifiedDate":"2023-10-28"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" String inputBuffer \u003d Ui.inputRetriever(); //Retrieves input of user","lastModifiedDate":"2023-10-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" LOGGER.log(Level.INFO, \"Input received: {0}\", inputBuffer);","lastModifiedDate":"2023-10-25"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":21,"author":{"gitId":"lctxct"},"content":" try {","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":" Command command \u003d EntryHandler.handleEntry(inputBuffer);","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"lctxct"},"content":" if (command instanceof ByeCommand) {","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" break;","lastModifiedDate":"2023-10-25"},{"lineNumber":26,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-25"},{"lineNumber":29,"author":{"gitId":"lctxct"},"content":" command.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-25"},{"lineNumber":31,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"lctxct"},"content":" } catch (IncorrectInputException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"lctxct"},"content":" Ui.incorrectInputMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"lctxct"},"content":" } catch (UnknownInputException e) {","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"lctxct"},"content":" Ui.unknownInputMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":38,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"lctxct"},"content":" EntryList.saveEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":" ByeCommand.exitProgram();","lastModifiedDate":"2023-10-25"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" public static void handleFileInput(String lineOfFile) {","lastModifiedDate":"2023-10-25"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-25"},{"lineNumber":45,"author":{"gitId":"lctxct"},"content":" EntryHandler.handleEntry(lineOfFile);","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"woodenclock"},"content":" } catch (UnknownInputException | IncorrectInputException exception) {","lastModifiedDate":"2023-10-25"},{"lineNumber":47,"author":{"gitId":"lctxct"},"content":" //TODO: this function is no longer useful but this has to be moved somewhere","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" Ui.corruptFileMessagePrinter();","lastModifiedDate":"2023-10-25"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" ShutDown.shutDownWithError();","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" System.exit(0);","lastModifiedDate":"2023-10-25"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-25"}],"authorContributionMap":{"woodenclock":35,"lctxct":18}},{"path":"src/main/java/seedu/wildwatch/operation/LogHandler.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-16"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2023-10-16"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.Handler;","lastModifiedDate":"2023-10-16"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.FileHandler;","lastModifiedDate":"2023-10-16"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import java.util.logging.SimpleFormatter;","lastModifiedDate":"2023-10-16"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class LogHandler {","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" private static final Logger LOGGER \u003d Logger.getLogger(LogHandler.class.getName());","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" static {","lastModifiedDate":"2023-10-16"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" try {","lastModifiedDate":"2023-10-16"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" // Configure a FileHandler","lastModifiedDate":"2023-10-16"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" FileHandler file \u003d new FileHandler(\"WildWatch.log\", true);","lastModifiedDate":"2023-10-16"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" SimpleFormatter formatter \u003d new SimpleFormatter();","lastModifiedDate":"2023-10-16"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" file.setFormatter(formatter);","lastModifiedDate":"2023-10-16"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":" // Obtain the root logger. An empty string gets the root logger","lastModifiedDate":"2023-10-16"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" Logger rootLogger \u003d Logger.getLogger(\"\");","lastModifiedDate":"2023-10-16"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":" // Remove the default handlers (like ConsoleHandler)","lastModifiedDate":"2023-10-16"},{"lineNumber":22,"author":{"gitId":"woodenclock"},"content":" for (Handler handler : rootLogger.getHandlers()) {","lastModifiedDate":"2023-10-16"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" rootLogger.removeHandler(handler);","lastModifiedDate":"2023-10-16"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" // Add the FileHandler to the root logger","lastModifiedDate":"2023-10-16"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" rootLogger.addHandler(file);","lastModifiedDate":"2023-10-16"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" } catch (Exception exception) {","lastModifiedDate":"2023-10-16"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":" LOGGER.warning(\"Queried entry not found.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" Ui.corruptLoggerMessagePrinter();","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" ShutDown.shutDownWithError();","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" System.exit(0);","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":" public static void configure() { // Call this empty method to ensure the static block runs","lastModifiedDate":"2023-10-16"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-16"}],"authorContributionMap":{"woodenclock":38}},{"path":"src/main/java/seedu/wildwatch/operation/ShutDown.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"public class ShutDown {","lastModifiedDate":"2023-10-11"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":" public static void shutDown() {","lastModifiedDate":"2023-10-11"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":" //Program Ending","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Bye. Hope to see you again soon!\");","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-11"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" public static void shutDownWithError() {","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" //Program Ending","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Ending program due to error...\");","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":17}},{"path":"src/main/java/seedu/wildwatch/operation/Ui.java","fileType":"functional-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-11"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":3,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.AddCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.DeleteCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"lctxct"},"content":"import seedu.wildwatch.command.FindCommand;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-11"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"import java.time.format.DateTimeFormatter;","lastModifiedDate":"2023-10-16"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":"import java.util.ArrayList;","lastModifiedDate":"2023-10-25"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":"import java.util.Scanner;","lastModifiedDate":"2023-10-11"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":"/**","lastModifiedDate":"2023-10-11"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" * This is the Ui class that is in-charge of interaction with the user","lastModifiedDate":"2023-10-11"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" * Represents the user interface of the application.","lastModifiedDate":"2023-10-11"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" * Provides methods to interact with the user and display messages.","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate messages such as errors and tasks added","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"public class Ui {","lastModifiedDate":"2023-10-11"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":" private static final int NUMBER_OF_UNDERSCORES \u003d 60;","lastModifiedDate":"2023-10-11"},{"lineNumber":20,"author":{"gitId":"woodenclock"},"content":" private static Scanner in \u003d new Scanner(System.in);","lastModifiedDate":"2023-10-11"},{"lineNumber":21,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":22,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":23,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-11"},{"lineNumber":24,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when checking if file exists","lastModifiedDate":"2023-10-22"},{"lineNumber":25,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-11"},{"lineNumber":26,"author":{"gitId":"woodenclock"},"content":" public static void checkingIfFileExistsMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":27,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Checking if \\\"WildWatch.txt\\\" already exists...\");","lastModifiedDate":"2023-10-22"},{"lineNumber":28,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":29,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":30,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":31,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file is corrupt","lastModifiedDate":"2023-10-22"},{"lineNumber":32,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":33,"author":{"gitId":"woodenclock"},"content":" public static void corruptFileMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":34,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File is corrupted.\\nUnable to read file\");","lastModifiedDate":"2023-10-22"},{"lineNumber":35,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":36,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":37,"author":{"gitId":"woodenclock"},"content":" public static void corruptLoggerMessagePrinter() {","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Logger is corrupted.\\nUnable to be configured\");","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"woodenclock"},"content":" public static void entryAddedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":43,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"The following entry has been added:\");","lastModifiedDate":"2023-10-22"},{"lineNumber":44,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":45,"author":{"gitId":"imaginarys96"},"content":" public static void entryEditedMessagePrinter() {","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"imaginarys96"},"content":" System.out.println(\"The following entry has been edited:\");","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"woodenclock"},"content":" public static void entryCountPrinter() {","lastModifiedDate":"2023-10-11"},{"lineNumber":49,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Now you have \" + (EntryList.getArraySize()) + \" entries in the list.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":50,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":51,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":52,"author":{"gitId":"woodenclock"},"content":" public static void emptyDescriptionMessagePrinter(String description) {","lastModifiedDate":"2023-10-22"},{"lineNumber":53,"author":{"gitId":"woodenclock"},"content":" if (description \u003d\u003d null) {","lastModifiedDate":"2023-10-22"},{"lineNumber":54,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description cannot be empty. :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":55,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(AddCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of an add command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":57,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(DeleteCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of a delete command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":59,"author":{"gitId":"lctxct"},"content":" } else if (description.equals(FindCommand.COMMAND_WORD)) {","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description of a find command cannot be empty. :-(\");","lastModifiedDate":"2023-10-25"},{"lineNumber":61,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-22"},{"lineNumber":62,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The description cannot be empty. :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":63,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":64,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":65,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":66,"author":{"gitId":"woodenclock"},"content":" public static void emptyListMessagePrinter() {","lastModifiedDate":"2023-10-11"},{"lineNumber":67,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! Nothing to list. :-(\");","lastModifiedDate":"2023-10-11"},{"lineNumber":68,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":69,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":70,"author":{"gitId":"woodenclock"},"content":" public static void entryNotFoundMessagePrinter() {","lastModifiedDate":"2023-10-15"},{"lineNumber":71,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! The entry number could not be found :-(\");","lastModifiedDate":"2023-10-15"},{"lineNumber":72,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":73,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":74,"author":{"gitId":"woodenclock"},"content":" public static void entryRemovedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":75,"author":{"gitId":"tangzhenen"},"content":" System.out.println(\"The entry has been deleted.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"tangzhenen"},"content":" printHorizontalLines();","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":78,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"tangzhenen"},"content":" public static void entryDeletionConfirmationPrinter() {","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"tangzhenen"},"content":" System.out.println(\"Are you sure you want to delete this entry? (yes/no): \");","lastModifiedDate":"2023-10-29"},{"lineNumber":81,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":83,"author":{"gitId":"tangzhenen"},"content":" public static void entryNotDeletedMessagePrinter() {","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"tangzhenen"},"content":" System.out.println(\"The entry was not deleted.\");","lastModifiedDate":"2023-10-29"},{"lineNumber":85,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":86,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":87,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":88,"author":{"gitId":"woodenclock"},"content":" * Prints an error message to the console.","lastModifiedDate":"2023-10-22"},{"lineNumber":89,"author":{"gitId":"woodenclock"},"content":" *","lastModifiedDate":"2023-10-22"},{"lineNumber":90,"author":{"gitId":"woodenclock"},"content":" * @param exception The exception that occurred.","lastModifiedDate":"2023-10-22"},{"lineNumber":91,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":92,"author":{"gitId":"woodenclock"},"content":" public static void errorMessagePrinter(Exception exception) {","lastModifiedDate":"2023-10-22"},{"lineNumber":93,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"An error occurred: \" + exception.getMessage());","lastModifiedDate":"2023-10-22"},{"lineNumber":94,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":95,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":96,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":97,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when creation of new file failed","lastModifiedDate":"2023-10-22"},{"lineNumber":98,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":99,"author":{"gitId":"woodenclock"},"content":" public static void fileCreationFailMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":100,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File creation failed.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":101,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":102,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":103,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":104,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file already exists","lastModifiedDate":"2023-10-22"},{"lineNumber":105,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":106,"author":{"gitId":"woodenclock"},"content":" public static void fileExistMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":107,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File already exists.\\nOpening existing file...\\n\");","lastModifiedDate":"2023-10-22"},{"lineNumber":108,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":109,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":110,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":111,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when file is not found","lastModifiedDate":"2023-10-22"},{"lineNumber":112,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":113,"author":{"gitId":"woodenclock"},"content":" public static void fileNotFoundMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":114,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"File not found.\");","lastModifiedDate":"2023-10-22"},{"lineNumber":115,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":116,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":117,"author":{"gitId":"woodenclock"},"content":" public static void findTaskMessagePrinter(boolean hasMatch, ArrayList\u003cInteger\u003e matchingTasks) {","lastModifiedDate":"2023-10-25"},{"lineNumber":118,"author":{"gitId":"woodenclock"},"content":" if (!hasMatch) {","lastModifiedDate":"2023-10-25"},{"lineNumber":119,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"No matching tasks found.\");","lastModifiedDate":"2023-10-25"},{"lineNumber":120,"author":{"gitId":"woodenclock"},"content":" } else {","lastModifiedDate":"2023-10-25"},{"lineNumber":121,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Here are the matching tasks in your list:\");","lastModifiedDate":"2023-10-25"},{"lineNumber":122,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c matchingTasks.size(); i++) {","lastModifiedDate":"2023-10-25"},{"lineNumber":123,"author":{"gitId":"woodenclock"},"content":" System.out.print((i+1) + \".\");","lastModifiedDate":"2023-10-25"},{"lineNumber":124,"author":{"gitId":"woodenclock"},"content":" printEntry(matchingTasks.get(i));","lastModifiedDate":"2023-10-25"},{"lineNumber":125,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":126,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":127,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-25"},{"lineNumber":128,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-25"},{"lineNumber":129,"author":{"gitId":"lctxct"},"content":" public static void incorrectInputMessagePrinter() {","lastModifiedDate":"2023-10-16"},{"lineNumber":130,"author":{"gitId":"lctxct"},"content":" System.out.println(\"OOPS!!! Format of command is incorrect.\");","lastModifiedDate":"2023-10-16"},{"lineNumber":131,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":132,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":133,"author":{"gitId":"woodenclock"},"content":" public static void invalidDateMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":134,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! Invalid Date input :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":135,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-13"},{"lineNumber":136,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":137,"author":{"gitId":"woodenclock"},"content":" public static void inputPromptPrinter() {","lastModifiedDate":"2023-10-29"},{"lineNumber":138,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"\u003e\u003e\u003e \");","lastModifiedDate":"2023-10-29"},{"lineNumber":139,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":140,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":141,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":142,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":143,"author":{"gitId":"woodenclock"},"content":" * Returns input of the user from the console.","lastModifiedDate":"2023-10-22"},{"lineNumber":144,"author":{"gitId":"woodenclock"},"content":" * @return The user\u0027s input as a trimmed string.","lastModifiedDate":"2023-10-22"},{"lineNumber":145,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":146,"author":{"gitId":"woodenclock"},"content":" public static String inputRetriever() {","lastModifiedDate":"2023-10-22"},{"lineNumber":147,"author":{"gitId":"woodenclock"},"content":" return in.nextLine().trim();","lastModifiedDate":"2023-10-22"},{"lineNumber":148,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-16"},{"lineNumber":149,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-16"},{"lineNumber":150,"author":{"gitId":"woodenclock"},"content":" public static void listMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":151,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Here are the entries in your list: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":152,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":153,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":154,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":155,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when no file found","lastModifiedDate":"2023-10-22"},{"lineNumber":156,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":157,"author":{"gitId":"woodenclock"},"content":" public static void noFileMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":158,"author":{"gitId":"lctxct"},"content":" System.out.println(\"File does not exist.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":159,"author":{"gitId":"lctxct"},"content":" }","lastModifiedDate":"2023-10-23"},{"lineNumber":160,"author":{"gitId":"lctxct"},"content":"","lastModifiedDate":"2023-10-23"},{"lineNumber":161,"author":{"gitId":"lctxct"},"content":" /**","lastModifiedDate":"2023-10-23"},{"lineNumber":162,"author":{"gitId":"lctxct"},"content":" * Prints out message after a new file has been created.","lastModifiedDate":"2023-10-23"},{"lineNumber":163,"author":{"gitId":"lctxct"},"content":" */","lastModifiedDate":"2023-10-23"},{"lineNumber":164,"author":{"gitId":"lctxct"},"content":" public static void createNewFileMessagePrinter() {","lastModifiedDate":"2023-10-23"},{"lineNumber":165,"author":{"gitId":"lctxct"},"content":" System.out.println(\"Creating new file...\\nFile created successfully.\");","lastModifiedDate":"2023-10-23"},{"lineNumber":166,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":167,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-11"},{"lineNumber":168,"author":{"gitId":"woodenclock"},"content":" public static void printEntry(int nthEntry) {","lastModifiedDate":"2023-10-22"},{"lineNumber":169,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Date: [\" +","lastModifiedDate":"2023-10-16"},{"lineNumber":170,"author":{"gitId":"woodenclock"},"content":" EntryList.getEntryDate(nthEntry).format(DateTimeFormatter.ofPattern(\"dd-MM-yyyy\")) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":171,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Species: [\" + EntryList.getEntrySpecies(nthEntry) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":172,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Name: [\" + EntryList.getEntryName(nthEntry) + \"] | \");","lastModifiedDate":"2023-10-22"},{"lineNumber":173,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"Remark: [\" + EntryList.getEntryRemark(nthEntry) + \"]\");","lastModifiedDate":"2023-10-22"},{"lineNumber":174,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-11"},{"lineNumber":175,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-11"},{"lineNumber":176,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":177,"author":{"gitId":"woodenclock"},"content":" public static void printHorizontalLines() {","lastModifiedDate":"2023-10-12"},{"lineNumber":178,"author":{"gitId":"woodenclock"},"content":" for (int i \u003d 0; i \u003c NUMBER_OF_UNDERSCORES; i++) {","lastModifiedDate":"2023-10-12"},{"lineNumber":179,"author":{"gitId":"woodenclock"},"content":" System.out.print(\"_\");","lastModifiedDate":"2023-10-12"},{"lineNumber":180,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":181,"author":{"gitId":"woodenclock"},"content":" System.out.print(System.lineSeparator());","lastModifiedDate":"2023-10-12"},{"lineNumber":182,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":183,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":184,"author":{"gitId":"woodenclock"},"content":" /**","lastModifiedDate":"2023-10-22"},{"lineNumber":185,"author":{"gitId":"woodenclock"},"content":" * Prints out appropriate message when tasks are loaded","lastModifiedDate":"2023-10-22"},{"lineNumber":186,"author":{"gitId":"woodenclock"},"content":" */","lastModifiedDate":"2023-10-22"},{"lineNumber":187,"author":{"gitId":"woodenclock"},"content":" public static void taskLoadedMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":188,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"These are tasks loaded from before: \");","lastModifiedDate":"2023-10-22"},{"lineNumber":189,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":190,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-22"},{"lineNumber":191,"author":{"gitId":"woodenclock"},"content":" public static void unknownInputMessagePrinter() {","lastModifiedDate":"2023-10-22"},{"lineNumber":192,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"OOPS!!! I\u0027m sorry, but I don\u0027t know what that means :-(\");","lastModifiedDate":"2023-10-22"},{"lineNumber":193,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-22"},{"lineNumber":194,"author":{"gitId":"imaginarys96"},"content":"","lastModifiedDate":"2023-10-28"},{"lineNumber":195,"author":{"gitId":"imaginarys96"},"content":" public static void printSummarySpecieMessage() {","lastModifiedDate":"2023-10-28"},{"lineNumber":196,"author":{"gitId":"imaginarys96"},"content":" System.out.println(\"Here are the species recorded: \");","lastModifiedDate":"2023-10-28"},{"lineNumber":197,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":198,"author":{"gitId":"imaginarys96"},"content":" public static void printSummaryNameMessage(String speciesName) {","lastModifiedDate":"2023-10-28"},{"lineNumber":199,"author":{"gitId":"imaginarys96"},"content":" System.out.println(\"Here is the data for the \" + speciesName + \", grouped by their names\");","lastModifiedDate":"2023-10-28"},{"lineNumber":200,"author":{"gitId":"imaginarys96"},"content":" }","lastModifiedDate":"2023-10-28"},{"lineNumber":201,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-13"},{"lineNumber":202,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"},{"lineNumber":203,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-13"}],"authorContributionMap":{"imaginarys96":10,"woodenclock":155,"tangzhenen":17,"lctxct":21}},{"path":"src/test/java/seedu/wildwatch/WildWatchTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch;","lastModifiedDate":"2023-10-09"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2023-10-09"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"public class WildWatchTest {","lastModifiedDate":"2023-10-09"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" public void isMainValid() {","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"-"},"content":" assertTrue(true);","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2020-05-24"}],"authorContributionMap":{"woodenclock":4,"-":8}},{"path":"src/test/java/seedu/wildwatch/command/DeleteCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"tangzhenen"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"tangzhenen"},"content":"import java.io.ByteArrayInputStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"tangzhenen"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"tangzhenen"},"content":"import java.io.InputStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"tangzhenen"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"tangzhenen"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"tangzhenen"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"tangzhenen"},"content":"import static seedu.wildwatch.entry.EntryList.addEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"tangzhenen"},"content":"import static seedu.wildwatch.entry.EntryList.clearEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.entry.EntryList;","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"tangzhenen"},"content":"public class DeleteCommandTest {","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"tangzhenen"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"tangzhenen"},"content":" private final ByteArrayOutputStream mockOutput \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"tangzhenen"},"content":" private InputStream originalIn;","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"tangzhenen"},"content":" private ByteArrayInputStream mockInput;","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"tangzhenen"},"content":" @BeforeEach","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"tangzhenen"},"content":" void redirectSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"tangzhenen"},"content":" System.setOut(new PrintStream(mockOutput));","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"tangzhenen"},"content":" originalIn \u003d System.in;","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"tangzhenen"},"content":" @AfterEach","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"tangzhenen"},"content":" void restoreSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"tangzhenen"},"content":" System.setOut(originalOut);","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"tangzhenen"},"content":" System.setIn(originalIn);","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"tangzhenen"},"content":" void testExecuteConfirmation() {","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"tangzhenen"},"content":" clearEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"tangzhenen"},"content":" addEntry(new Entry(\"28-10-23\", \"Lion\", \"Simba\", \"This is Simba.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"tangzhenen"},"content":" // Prepare user input \"yes\" for confirmation","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"tangzhenen"},"content":" mockInput \u003d new ByteArrayInputStream(\"yes\\n\".getBytes());","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"tangzhenen"},"content":" System.setIn(mockInput);","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"tangzhenen"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"tangzhenen"},"content":" deleteCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"tangzhenen"},"content":" String consoleOutput \u003d mockOutput.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"tangzhenen"},"content":" // Assert: Verify the confirmation message and that the entry is removed","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"tangzhenen"},"content":" assertTrue(consoleOutput.contains(\"Are you sure you want to delete this entry? (yes/no):\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"tangzhenen"},"content":" assertTrue(consoleOutput.contains(\"The entry has been deleted.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"tangzhenen"},"content":" void testExecuteCancellation() {","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"tangzhenen"},"content":" clearEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"tangzhenen"},"content":" addEntry(new Entry(\"28-10-23\", \"Lion\", \"Simba\", \"This is Simba.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"tangzhenen"},"content":" // Prepare user input \"no\" for cancellation","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"tangzhenen"},"content":" mockInput \u003d new ByteArrayInputStream(\"no\\n\".getBytes());","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"tangzhenen"},"content":" System.setIn(mockInput);","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"tangzhenen"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(1);","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"tangzhenen"},"content":" deleteCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"tangzhenen"},"content":" String consoleOutput \u003d mockOutput.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"tangzhenen"},"content":" // Assert: Verify the confirmation message and that the entry is not removed","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"tangzhenen"},"content":" assertTrue(consoleOutput.contains(\"Are you sure you want to delete this entry? (yes/no):\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"tangzhenen"},"content":" assertTrue(consoleOutput.contains(\"The entry was not deleted.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":77,"author":{"gitId":"tangzhenen"},"content":" public void testDeleteCommandWithInvalidIndex(){","lastModifiedDate":"2023-10-29"},{"lineNumber":78,"author":{"gitId":"tangzhenen"},"content":" clearEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":79,"author":{"gitId":"tangzhenen"},"content":" addEntry(new Entry(\"09-11-23\", \"Lion\", \"Simba\", \"This is Simba\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":80,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":81,"author":{"gitId":"tangzhenen"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(2);","lastModifiedDate":"2023-10-29"},{"lineNumber":82,"author":{"gitId":"tangzhenen"},"content":" deleteCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":83,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":84,"author":{"gitId":"tangzhenen"},"content":" int entryListSizeAfter \u003d EntryList.getArraySize();","lastModifiedDate":"2023-10-29"},{"lineNumber":85,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":86,"author":{"gitId":"tangzhenen"},"content":" assertEquals(1,entryListSizeAfter,\"Entry count should remain the same due to deletion of an invalid index\");","lastModifiedDate":"2023-10-29"},{"lineNumber":87,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":88,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":89,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"tangzhenen":89}},{"path":"src/test/java/seedu/wildwatch/command/HelpCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"tangzhenen"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"tangzhenen"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"tangzhenen"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"tangzhenen"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"tangzhenen"},"content":"public class HelpCommandTest {","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"tangzhenen"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"tangzhenen"},"content":" private final ByteArrayOutputStream mockOutput \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"tangzhenen"},"content":" @BeforeEach","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"tangzhenen"},"content":" void redirectSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"tangzhenen"},"content":" System.setOut(new PrintStream(mockOutput));","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"tangzhenen"},"content":" @AfterEach","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"tangzhenen"},"content":" void restoreSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"tangzhenen"},"content":" System.setOut(originalOut);","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"tangzhenen"},"content":" void testExecute() {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"tangzhenen"},"content":" HelpCommand helpCommand \u003d new HelpCommand();","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"tangzhenen"},"content":" helpCommand.execute();","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"tangzhenen"},"content":" // Define the expected help page content","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"tangzhenen"},"content":" String expectedHelpPage \u003d \"No worries, I\u0027m here to help!\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"tangzhenen"},"content":" \"---------------------------HELP PAGE-----------------------------\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"tangzhenen"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"tangzhenen"},"content":" \"1. Get help - show the list of commands available for this app\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"tangzhenen"},"content":" \" Format: help\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"tangzhenen"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"tangzhenen"},"content":" \" help\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"tangzhenen"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"tangzhenen"},"content":" \"2. To add a new wildlife\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"tangzhenen"},"content":" \" Format: add D/DATE S/SPECIES N/NAME R/REMARKS\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"tangzhenen"},"content":" \" DATE should be in the format DD-MM-YY\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"tangzhenen"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"tangzhenen"},"content":" \" add D/02-03-23 S/Annam Leaf Turtle N/Ariel R/Injured left flipper\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"tangzhenen"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"tangzhenen"},"content":" \"3. To list all wildlife,\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"tangzhenen"},"content":" \" Format: list\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"tangzhenen"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"tangzhenen"},"content":" \" list\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"tangzhenen"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"tangzhenen"},"content":" \"4. To delete a wildlife\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"tangzhenen"},"content":" \" Format: delete INDEX\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"tangzhenen"},"content":" \" The index refers to the index number shown in the displayed observation list.\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"tangzhenen"},"content":" \" Note:\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"tangzhenen"},"content":" \" - The index must be a positive integer:\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"tangzhenen"},"content":" \" - Deleted items may not be recoverable:\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"tangzhenen"},"content":" \" Examples: \\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":63,"author":{"gitId":"tangzhenen"},"content":" \" delete 1\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":64,"author":{"gitId":"tangzhenen"},"content":" \"_________________________________________________________________\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":65,"author":{"gitId":"tangzhenen"},"content":" \"\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":66,"author":{"gitId":"tangzhenen"},"content":" \"-------------------------HELP PAGE END---------------------------\\n\" +","lastModifiedDate":"2023-10-29"},{"lineNumber":67,"author":{"gitId":"tangzhenen"},"content":" \"\\n\";","lastModifiedDate":"2023-10-29"},{"lineNumber":68,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":69,"author":{"gitId":"tangzhenen"},"content":" // Normalize the line separators in the actual and expected output to ignore differences","lastModifiedDate":"2023-10-29"},{"lineNumber":70,"author":{"gitId":"tangzhenen"},"content":" String actualOutput \u003d mockOutput.toString().replace(System.lineSeparator(), \"\\n\");","lastModifiedDate":"2023-10-29"},{"lineNumber":71,"author":{"gitId":"tangzhenen"},"content":" String expectedOutput \u003d expectedHelpPage.replace(System.lineSeparator(), \"\\n\");","lastModifiedDate":"2023-10-29"},{"lineNumber":72,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":73,"author":{"gitId":"tangzhenen"},"content":" // Assert: Verify the printed output matches the expected help page content","lastModifiedDate":"2023-10-29"},{"lineNumber":74,"author":{"gitId":"tangzhenen"},"content":" assertEquals(expectedOutput, actualOutput);","lastModifiedDate":"2023-10-29"},{"lineNumber":75,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":76,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"tangzhenen":76}},{"path":"src/test/java/seedu/wildwatch/command/ListCommandTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"tangzhenen"},"content":"package seedu.wildwatch.command;","lastModifiedDate":"2023-10-29"},{"lineNumber":2,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":3,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.AfterEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":4,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.BeforeEach;","lastModifiedDate":"2023-10-29"},{"lineNumber":5,"author":{"gitId":"tangzhenen"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-29"},{"lineNumber":6,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":7,"author":{"gitId":"tangzhenen"},"content":"import static org.junit.jupiter.api.Assertions.assertEquals;","lastModifiedDate":"2023-10-29"},{"lineNumber":8,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":9,"author":{"gitId":"tangzhenen"},"content":"import static seedu.wildwatch.entry.EntryList.addEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":10,"author":{"gitId":"tangzhenen"},"content":"import static seedu.wildwatch.entry.EntryList.clearEntry;","lastModifiedDate":"2023-10-29"},{"lineNumber":11,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":12,"author":{"gitId":"tangzhenen"},"content":"import seedu.wildwatch.entry.Entry;","lastModifiedDate":"2023-10-29"},{"lineNumber":13,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":14,"author":{"gitId":"tangzhenen"},"content":"import java.io.ByteArrayOutputStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":15,"author":{"gitId":"tangzhenen"},"content":"import java.io.PrintStream;","lastModifiedDate":"2023-10-29"},{"lineNumber":16,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":17,"author":{"gitId":"tangzhenen"},"content":"class ListCommandTest {","lastModifiedDate":"2023-10-29"},{"lineNumber":18,"author":{"gitId":"tangzhenen"},"content":" private final PrintStream originalOut \u003d System.out;","lastModifiedDate":"2023-10-29"},{"lineNumber":19,"author":{"gitId":"tangzhenen"},"content":" private final ByteArrayOutputStream mockOutput \u003d new ByteArrayOutputStream();","lastModifiedDate":"2023-10-29"},{"lineNumber":20,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":21,"author":{"gitId":"tangzhenen"},"content":" @BeforeEach","lastModifiedDate":"2023-10-29"},{"lineNumber":22,"author":{"gitId":"tangzhenen"},"content":" void redirectSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":23,"author":{"gitId":"tangzhenen"},"content":" System.setOut(new PrintStream(mockOutput));","lastModifiedDate":"2023-10-29"},{"lineNumber":24,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":25,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":26,"author":{"gitId":"tangzhenen"},"content":" @AfterEach","lastModifiedDate":"2023-10-29"},{"lineNumber":27,"author":{"gitId":"tangzhenen"},"content":" void restoreSystemOut() {","lastModifiedDate":"2023-10-29"},{"lineNumber":28,"author":{"gitId":"tangzhenen"},"content":" System.setOut(originalOut);","lastModifiedDate":"2023-10-29"},{"lineNumber":29,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":30,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":31,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":32,"author":{"gitId":"tangzhenen"},"content":" void listEntry() {","lastModifiedDate":"2023-10-29"},{"lineNumber":33,"author":{"gitId":"tangzhenen"},"content":" clearEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":34,"author":{"gitId":"tangzhenen"},"content":" addEntry(new Entry(\"28-10-23\", \"Lion\", \"Simba\", \"This is Simba.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":35,"author":{"gitId":"tangzhenen"},"content":" addEntry(new Entry(\"28-10-23\", \"Tiger\", \"Tigger\", \"This is Tigger.\"));","lastModifiedDate":"2023-10-29"},{"lineNumber":36,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":37,"author":{"gitId":"tangzhenen"},"content":" ListCommand.listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":38,"author":{"gitId":"tangzhenen"},"content":" String consoleOutput \u003d mockOutput.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":39,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":40,"author":{"gitId":"tangzhenen"},"content":" String expectedOutput \u003d \"1.Date: [28-10-2023] | Species: [Lion] | Name: [Simba] | Remark: [This is Simba.]\"","lastModifiedDate":"2023-10-29"},{"lineNumber":41,"author":{"gitId":"tangzhenen"},"content":" + \"\\n\"","lastModifiedDate":"2023-10-29"},{"lineNumber":42,"author":{"gitId":"tangzhenen"},"content":" + \"2.Date: [28-10-2023] | Species: [Tiger] | Name: [Tigger] | Remark: [This is Tigger.]\"","lastModifiedDate":"2023-10-29"},{"lineNumber":43,"author":{"gitId":"tangzhenen"},"content":" + \"\\n\"","lastModifiedDate":"2023-10-29"},{"lineNumber":44,"author":{"gitId":"tangzhenen"},"content":" + \"Now you have 2 entries in the list.\"","lastModifiedDate":"2023-10-29"},{"lineNumber":45,"author":{"gitId":"tangzhenen"},"content":" + \"\\n\";","lastModifiedDate":"2023-10-29"},{"lineNumber":46,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":47,"author":{"gitId":"tangzhenen"},"content":" consoleOutput \u003d consoleOutput.replace(System.lineSeparator(), \"\\n\");","lastModifiedDate":"2023-10-29"},{"lineNumber":48,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":49,"author":{"gitId":"tangzhenen"},"content":" assertEquals(expectedOutput, consoleOutput);","lastModifiedDate":"2023-10-29"},{"lineNumber":50,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":51,"author":{"gitId":"tangzhenen"},"content":"","lastModifiedDate":"2023-10-29"},{"lineNumber":52,"author":{"gitId":"tangzhenen"},"content":" @Test","lastModifiedDate":"2023-10-29"},{"lineNumber":53,"author":{"gitId":"tangzhenen"},"content":" void listEntryWithZeroEntry() {","lastModifiedDate":"2023-10-29"},{"lineNumber":54,"author":{"gitId":"tangzhenen"},"content":" clearEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":55,"author":{"gitId":"tangzhenen"},"content":" ListCommand.listEntry();","lastModifiedDate":"2023-10-29"},{"lineNumber":56,"author":{"gitId":"tangzhenen"},"content":" String consoleOutput \u003d mockOutput.toString();","lastModifiedDate":"2023-10-29"},{"lineNumber":57,"author":{"gitId":"tangzhenen"},"content":" String expectedOutput \u003d \"Now you have 0 entries in the list.\"","lastModifiedDate":"2023-10-29"},{"lineNumber":58,"author":{"gitId":"tangzhenen"},"content":" + \"\\n\";","lastModifiedDate":"2023-10-29"},{"lineNumber":59,"author":{"gitId":"tangzhenen"},"content":" consoleOutput \u003d consoleOutput.replace(System.lineSeparator(), \"\\n\");","lastModifiedDate":"2023-10-29"},{"lineNumber":60,"author":{"gitId":"tangzhenen"},"content":" assertEquals(expectedOutput, consoleOutput);","lastModifiedDate":"2023-10-29"},{"lineNumber":61,"author":{"gitId":"tangzhenen"},"content":" }","lastModifiedDate":"2023-10-29"},{"lineNumber":62,"author":{"gitId":"tangzhenen"},"content":"}","lastModifiedDate":"2023-10-29"}],"authorContributionMap":{"tangzhenen":62}},{"path":"src/test/java/seedu/wildwatch/operation/DateHandlerTest.java","fileType":"test-code","lines":[{"lineNumber":1,"author":{"gitId":"woodenclock"},"content":"package seedu.wildwatch.operation;","lastModifiedDate":"2023-10-12"},{"lineNumber":2,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":3,"author":{"gitId":"woodenclock"},"content":"import org.junit.jupiter.api.Test;","lastModifiedDate":"2023-10-12"},{"lineNumber":4,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":5,"author":{"gitId":"woodenclock"},"content":"import static org.junit.jupiter.api.Assertions.assertFalse;","lastModifiedDate":"2023-10-12"},{"lineNumber":6,"author":{"gitId":"woodenclock"},"content":"import static org.junit.jupiter.api.Assertions.assertTrue;","lastModifiedDate":"2023-10-12"},{"lineNumber":7,"author":{"gitId":"woodenclock"},"content":"","lastModifiedDate":"2023-10-12"},{"lineNumber":8,"author":{"gitId":"woodenclock"},"content":"public class DateHandlerTest {","lastModifiedDate":"2023-10-12"},{"lineNumber":9,"author":{"gitId":"woodenclock"},"content":" @Test","lastModifiedDate":"2023-10-12"},{"lineNumber":10,"author":{"gitId":"woodenclock"},"content":" public void testDateHandler() {","lastModifiedDate":"2023-10-12"},{"lineNumber":11,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-12"},{"lineNumber":12,"author":{"gitId":"woodenclock"},"content":" System.out.println(\"Testing whether date is valid...\");","lastModifiedDate":"2023-10-12"},{"lineNumber":13,"author":{"gitId":"woodenclock"},"content":" Ui.printHorizontalLines();","lastModifiedDate":"2023-10-12"},{"lineNumber":14,"author":{"gitId":"woodenclock"},"content":" assertTrue(DateHandler.isDateValid(\"D/ 09-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":" assertFalse(DateHandler.isDateValid(\"D/9-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":" assertFalse(DateHandler.isDateValid(\"D/ 99-11-23 S/\"));","lastModifiedDate":"2023-10-12"},{"lineNumber":17,"author":{"gitId":"woodenclock"},"content":" }","lastModifiedDate":"2023-10-12"},{"lineNumber":18,"author":{"gitId":"woodenclock"},"content":"}","lastModifiedDate":"2023-10-12"}],"authorContributionMap":{"woodenclock":18}},{"path":"text-ui-test/runtest.bat","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"@echo off","lastModifiedDate":"2020-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"setlocal enableextensions","lastModifiedDate":"2020-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"pushd %~dp0","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"call gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"cd build\\libs","lastModifiedDate":"2020-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"for /f \"tokens\u003d*\" %%a in (","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" \u0027dir /b *.jar\u0027","lastModifiedDate":"2020-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":") do (","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" set jarloc\u003d%%a","lastModifiedDate":"2020-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":")","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"java -jar %jarloc% \u003c ..\\..\\text-ui-test\\input.txt \u003e ..\\..\\text-ui-test\\ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"cd ..\\..\\text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"woodenclock"},"content":"FC ACTUAL.TXT ACTUAL.TXT \u0026\u0026 ECHO Test passed! || Echo Test failed!","lastModifiedDate":"2023-10-11"}],"authorContributionMap":{"woodenclock":1,"-":18}},{"path":"text-ui-test/runtest.sh","fileType":"other","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"#!/usr/bin/env bash","lastModifiedDate":"2020-05-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"# change to script directory","lastModifiedDate":"2020-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"cd \"${0%/*}\"","lastModifiedDate":"2020-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"cd ..","lastModifiedDate":"2020-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"./gradlew clean shadowJar","lastModifiedDate":"2020-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"cd text-ui-test","lastModifiedDate":"2020-05-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"java -jar $(find ../build/libs/ -mindepth 1 -print -quit) \u003c input.txt \u003e ACTUAL.TXT","lastModifiedDate":"2020-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2020-05-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"cp EXPECTED.TXT EXPECTED-UNIX.TXT","lastModifiedDate":"2020-05-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"dos2unix EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-09"},{"lineNumber":15,"author":{"gitId":"woodenclock"},"content":"# diff EXPECTED-UNIX.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-11"},{"lineNumber":16,"author":{"gitId":"woodenclock"},"content":"diff ACTUAL.TXT ACTUAL.TXT","lastModifiedDate":"2023-10-11"},{"lineNumber":17,"author":{"gitId":"-"},"content":"if [ $? -eq 0 ]","lastModifiedDate":"2020-05-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"then","lastModifiedDate":"2020-05-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" echo \"Test passed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" exit 0","lastModifiedDate":"2020-05-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":"else","lastModifiedDate":"2020-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" echo \"Test failed!\"","lastModifiedDate":"2020-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" exit 1","lastModifiedDate":"2020-05-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":"fi","lastModifiedDate":"2020-05-25"}],"authorContributionMap":{"woodenclock":2,"-":22}}] diff --git a/AY2324S1-CS2113T-W11-2_tp_master/commits.json b/AY2324S1-CS2113T-W11-2_tp_master/commits.json index 73ee24e..0f7592d 100644 --- a/AY2324S1-CS2113T-W11-2_tp_master/commits.json +++ b/AY2324S1-CS2113T-W11-2_tp_master/commits.json @@ -1 +1 @@ -{"authorDailyContributionsMap":{"imaginarys96":[{"date":"2023-10-14","commitResults":[{"hash":"ec58ce88cfc6d13389719ba5c71f25eca9a9a801","isMergeCommit":false,"messageTitle":"Updated help command for v1 features - help, add, list, delete","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":43}}},{"hash":"bf15d755cbc672977eb38b6001162424834580fc","isMergeCommit":true,"messageTitle":"Merge pull request #31 from imaginarys96/master","messageBody":"Updated help command for v1 features - help, add, list, delete","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d99f0c79eee52e1af97c186c829392ef8e30f8aa","isMergeCommit":false,"messageTitle":"Implemented SummaryCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":80,"deletions":4}}},{"hash":"5fd5ddccef1e9c4294df3f1b749d059f20811590","isMergeCommit":true,"messageTitle":"Merge pull request #77 from imaginarys96/master","messageBody":"Implemented SummaryCommand","fileTypesAndContributionMap":{}},{"hash":"e9872b87ea07ed2f4cfae8208a6b7b9c85b19f80","isMergeCommit":false,"messageTitle":"reordered help command in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":55}}},{"hash":"4c5d7b7b18fb4ddc69c360e904b408a2dbf760d5","isMergeCommit":true,"messageTitle":"Merge pull request #78 from imaginarys96/master","messageBody":"reordered help command in UserGuide","fileTypesAndContributionMap":{}},{"hash":"8dfcebc71e11c422e383ebe2a57adf7c36d807a3","isMergeCommit":false,"messageTitle":"reordered table of contents in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7f53d8a203e66ce0c1ce0ff7df0065910b5995cc","isMergeCommit":true,"messageTitle":"Merge pull request #79 from imaginarys96/master","messageBody":"reordered table of contents in UserGuide","fileTypesAndContributionMap":{}}]}],"woodenclock":[{"date":"2023-10-04","commitResults":[{"hash":"773a8e43cb56142c5789ca6965e4db2986c5c57f","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-09","commitResults":[{"hash":"6077ba4a23bd1b9fc1e50fa53e3b872be5b6eb1e","isMergeCommit":false,"messageTitle":"Create AboutUs branch and leesungmin.md portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":7}}},{"hash":"a37fa65ccb6a1b62dfab0eb6f3457341f6d818fc","isMergeCommit":false,"messageTitle":"Update READ.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":2}}},{"hash":"c2fcafd4f8451047de38b018df37b1fe9c6f480a","isMergeCommit":true,"messageTitle":"Merge pull request #1 from woodenclock/LeeSungmin-AboutUs","messageBody":"Create AboutUs branch and leesungmin.md portfolio","fileTypesAndContributionMap":{}},{"hash":"3e9aca38ae0e03fd4a8ae621146d083c45409027","isMergeCommit":true,"messageTitle":"Merge branch \u0027LeeSungmin-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2d4101597f24823b23a9a5ef502aef5397288f1c","isMergeCommit":false,"messageTitle":"Rename Duke.java to WildWatch.java as per out project name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"1abb04b6249ec7daf5a386a21773f3ddb077ac18","isMergeCommit":false,"messageTitle":"Revert \"Rename Duke.java to WildWatch.java as per out project name\"","messageBody":"This reverts commit 2d4101597f24823b23a9a5ef502aef5397288f1c.\n","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"244abfa479dd4619a399297ac397592315e08604","isMergeCommit":false,"messageTitle":"Create abstract class Animal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":0}}},{"hash":"7663b3ecf3a8aa8aa508d8ca7edad59130e9c0eb","isMergeCommit":false,"messageTitle":"Rename project as WildWatch as per our project name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":6,"deletions":6}}},{"hash":"b2e6806dddd0bf67b32c68655dd5236c7e9cc544","isMergeCommit":true,"messageTitle":"Merge pull request #4 from woodenclock/rename_project","messageBody":"Rename project from Duke to WildWatch as per our project name","fileTypesAndContributionMap":{}},{"hash":"c6242a7063a64aa4bb36350d575a875c50229edc","isMergeCommit":true,"messageTitle":"Merge branch \u0027rename_project\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a64a4c0cab96655ea728b5ac0f2f60751c8ed5a1","isMergeCommit":false,"messageTitle":"Create BootUp.java that contains welcome logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":77,"deletions":0}}},{"hash":"1f3d3b8c4fc84585d1699c43d127d4a36da01587","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":114,"deletions":76}}},{"hash":"fe6e136acc5d593d19301effc6cc5f2641e1947e","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"6c2cafbaba2f9bb015357d95eff4dfaa5f5c4a69","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":21}}},{"hash":"6cf1720e89934b3c61ab1c0d8db3a7e239eacd36","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"b348ea5c36874f96a6b46c30290db939136d88fc","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"c4fb3ba9f397df9c3454cadc898b8829dd8553db","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"32d40d3e7e7046ccc3c3e596dc7c5b0b68073947","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"bfd809b962a596b58a7fc24c27f6b244735c571b","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"936492bd4e993987c0bd1fcae321f3493ab4b91e","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"429d316db795b18efa841f79d94336cea4f40331","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"fd7bfa9b414fe7ee9bfb841d84703aaf82e6ce7c","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":52,"deletions":133},"other":{"insertions":1,"deletions":1}}},{"hash":"97689efd86b84f8ee0b3497014aea9426286baaa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into bootup","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ac3e8877e92b18280e3cd70bdadaf9310f81dff7","isMergeCommit":true,"messageTitle":"Merge pull request #6 from woodenclock/bootup","messageBody":"Update BootUp.java to fit within 120 wordline limit","fileTypesAndContributionMap":{}},{"hash":"c06e04b29d428439ccf8b280bd26d5482c96c8d3","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"31c6d46df982c3a0688f29f473887f21dc3ba1db","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":51}}},{"hash":"c6dff4fe86a6f3264235eadf60d8443e5e8f6a19","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"98d77c185330d024cf1a480c1d16eb5413f0f497","isMergeCommit":true,"messageTitle":"Merge branch \u0027bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95b5f9b53ffbc9c55aa75f230a8746872f8bee4c","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/bootup\u0027 into bootup","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9f4548643bc946e1e5906276338a280796b2cef9","isMergeCommit":false,"messageTitle":"Update project structure","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":39}}},{"hash":"e5a87bbe89f4a01b708f0f3327d195415909489c","isMergeCommit":true,"messageTitle":"Merge branch \u0027bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"987dc591619e7c1b4cd557c06e21f6a68d607a4a","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"a5c52684a404e5205c5674689e949f782d79811c","isMergeCommit":false,"messageTitle":"Update BootUp.java to conform to coding quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f17fcaa275038ea365d6759055ab33f6c31e9aa","isMergeCommit":true,"messageTitle":"Merge pull request #12 from woodenclock/bootup","messageBody":"Update project structure","fileTypesAndContributionMap":{}},{"hash":"7145784bb155b969e48ff7e7010ea4c97c2aae75","isMergeCommit":false,"messageTitle":"Create Entry class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":2}}},{"hash":"f03352d7d7f269e18a0591384ba5a3c7cc4eb55a","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":8}}},{"hash":"96ac3b11547e3b2d2d4c6e14bdf22fd36aa76bba","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into entry","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5dac1732ee34244d4e59bf099e9261501710087d","isMergeCommit":true,"messageTitle":"Merge pull request #13 from woodenclock/entry","messageBody":"Create Entry class","fileTypesAndContributionMap":{}},{"hash":"945347d04572d7a9a11413580262329c992f14a5","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":2},"test-code":{"insertions":4,"deletions":2}}},{"hash":"3b7a601cd1b53fc7be7a2d1bedc42310cf1649e1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into test","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"be05363bad21706e61fab277cea8f999e2782b07","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"2e019b43aa866ada15a4ed25cd3d7885ac10cc4a","isMergeCommit":false,"messageTitle":"Create EntryList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"6d3073813fb40e7d90e3ab589849963683e1189a","isMergeCommit":true,"messageTitle":"Merge pull request #14 from woodenclock/test","messageBody":"Update WildWatchTest.java","fileTypesAndContributionMap":{}},{"hash":"f774cc61af7a812a27a5b8886299f5f7b1f8868d","isMergeCommit":true,"messageTitle":"Merge pull request #15 from woodenclock/entry-list","messageBody":"Create EntryList class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"fb23536d544f38c73460e96a5c8bd313abdf0871","isMergeCommit":false,"messageTitle":"Update Main.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"38254679c1a734c325e5dab8dcf333beef508b93","isMergeCommit":false,"messageTitle":"Update Entry","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":4}}},{"hash":"a3e6c2fd82eac65ab404abed9a60af89969b3303","isMergeCommit":true,"messageTitle":"Merge branch \u0027test\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"1bade08d80d0e3eedb5160168e9cb74b4927402d","isMergeCommit":true,"messageTitle":"Merge branch \u0027entry-list\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d0e3391ae33de9f5e0a565830ac98df6cc4f313f","isMergeCommit":true,"messageTitle":"Merge branch \u0027entry\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4ee7626d1bc4413bf1ddef578903135c52b31969","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":1}}},{"hash":"9e1e349dc0473c94c82979f9b4205f2c7a5a2a0f","isMergeCommit":true,"messageTitle":"Merge pull request #17 from woodenclock/master","messageBody":"Update Main.java","fileTypesAndContributionMap":{}},{"hash":"641b2c736ec355c3848f2cbcbb041dc8338c9f26","isMergeCommit":false,"messageTitle":"Update Main.java to show welcome logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"77fe5541e59e37f74e72d91231d710d0ed696be1","isMergeCommit":false,"messageTitle":"Update Welcome Logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":13},"other":{"insertions":1,"deletions":1}}},{"hash":"6ea49076bd57c39603afcf927bf16466cdace61a","isMergeCommit":true,"messageTitle":"Merge pull request #18 from woodenclock/master","messageBody":"Update Main.java to show welcome logo","fileTypesAndContributionMap":{}},{"hash":"68be8887d8efee36a1ef4f109533033482dcd242","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"c2a56a8ff200897cfb897a15b2667cf694316c48","isMergeCommit":false,"messageTitle":"Merge operatingsystem and operation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":6},"other":{"insertions":1,"deletions":1}}},{"hash":"b9d4ec4398a5423e8ba4e6cff7a0e21b6703d2de","isMergeCommit":false,"messageTitle":"Create Help.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":1}}},{"hash":"139ddda6ac311b9fe600964084bedc30025b5c23","isMergeCommit":false,"messageTitle":"Create Ui.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":16}}},{"hash":"aa73f36ed0f867e9cc494712264bbcf74eb20acd","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"1b39f7d802f41be2b0972d434ac72ed2a5d174ea","isMergeCommit":false,"messageTitle":"Update Main.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":265,"deletions":12},"other":{"insertions":2,"deletions":2}}},{"hash":"2f5bb6fcc91de14d1cfdff6923d9cf4cbe8b586a","isMergeCommit":false,"messageTitle":"Rectify coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":7}}},{"hash":"3fe9e8732a78b643b213927cfc670a40841bc438","isMergeCommit":true,"messageTitle":"Merge pull request #19 from woodenclock/master","messageBody":"Update BootUp.java","fileTypesAndContributionMap":{}},{"hash":"768e729a01aa2ca563e5b753adfd4bb3fba53fe2","isMergeCommit":false,"messageTitle":"Create DateHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":9}}},{"hash":"17a55f41fb4299dbafc4a11ce5132343f647ce8e","isMergeCommit":false,"messageTitle":"Update master","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":11}}},{"hash":"00f4e5be68faec38e3787643e978c85acd8a4140","isMergeCommit":false,"messageTitle":"Update DateHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-12","commitResults":[{"hash":"854362b0cb347d3eef09cff390a2bc1ece81a933","isMergeCommit":false,"messageTitle":"Create UiTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":7},"test-code":{"insertions":23,"deletions":5}}},{"hash":"9219e532962e466897da973e62b635128a9537d7","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":1}}},{"hash":"000704a61d0cf556f3659838c9f483cf4dc327b9","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}},{"hash":"3bd708d0dc25b88e7467f88ebf02c13d04fad21a","isMergeCommit":true,"messageTitle":"Merge pull request #24 from woodenclock/JUnit","messageBody":"Create DateHandler.java","fileTypesAndContributionMap":{}},{"hash":"9269539e2e1b215c6abe2ce8299598f2ac7bbfc9","isMergeCommit":false,"messageTitle":"Update master","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":9},"test-code":{"insertions":23,"deletions":1}}},{"hash":"ec828890f2b2e762697dc08f3c59345057a75d6b","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"21885dd84c3a1eb10fc873bea34312d6cd5d3908","isMergeCommit":false,"messageTitle":"Create DateHandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2},"test-code":{"insertions":45,"deletions":4}}},{"hash":"e62a99b83b1a86695fdd408c40fa647c6d55c395","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"a42c135198681cfb760500a9fb570cf655900b15","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":33}}},{"hash":"34c204943b75d986f3434990cc8a2a0d51785428","isMergeCommit":true,"messageTitle":"Merge pull request #26 from woodenclock/JUnit","messageBody":"Update JUnit Testing","fileTypesAndContributionMap":{}},{"hash":"f89a3376b6128b40c6fb6a0ac87ae67433c69718","isMergeCommit":false,"messageTitle":"Update master branch","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3},"test-code":{"insertions":30,"deletions":24}}}]},{"date":"2023-10-13","commitResults":[{"hash":"04bfb9cdcbb0e565b7728dff4ef37b9900ecaf01","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"c41766f63af1deec7f34501671e4ce7797dd8a7e","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0824e77a201a68175ae07a2bd651b9a28d77bfae","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"155b4a5313622cf619386de79dac55fd1e6511d2","isMergeCommit":false,"messageTitle":"Update Team","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":6}}}]},{"date":"2023-10-14","commitResults":[{"hash":"a6771c27f6f02e0b583eab8a6b8b084dc2e2b613","isMergeCommit":true,"messageTitle":"Merge pull request #30 from tangzhenen/DeleteCommand","messageBody":"Delete command ","fileTypesAndContributionMap":{}},{"hash":"66a8c9a6cd5cac707a4f960ee6afbc999ae363dd","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"00c2201381e98033b496951aac6812238b46249b","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"7aa2d2e9e23cbaaa7c4d183901c9a80aeb4a050e","isMergeCommit":false,"messageTitle":"Delete docs/team/johndoe.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":6}}}]},{"date":"2023-10-15","commitResults":[{"hash":"d224fc9b93a7ab109c4bc7789325449fa98c4b31","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"610129370f63512b2b17ef46b9e9e9bba81ea8f2","isMergeCommit":false,"messageTitle":"Update ErrorHandler to be more defensive when handling invalid command input for delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":21}}},{"hash":"b0b42fe5a3c45ea96b5cb9f0231b763009ce75b1","isMergeCommit":false,"messageTitle":"Update Helper to HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8},"other":{"insertions":2,"deletions":2}}},{"hash":"6fb4e2fce4321f4b3390687233fed35eaf984f33","isMergeCommit":true,"messageTitle":"Merge pull request #29 from woodenclock/master","messageBody":"Update docs/team","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"450da925b330879ecf333b82d2f23dd01f0ba7cf","isMergeCommit":true,"messageTitle":"Merge pull request #32 from lctxct/master","messageBody":"Add add command","fileTypesAndContributionMap":{}},{"hash":"cca01ddd9bafcd73bab5601d937d80176c768a4c","isMergeCommit":false,"messageTitle":"Add assertions for Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":10},"other":{"insertions":1,"deletions":0}}},{"hash":"be31165e3f29da49d974c06bfe456d9a86e14d5e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into JUnit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"46279ea4c95f206dddb4e551a2e1dbe2db2adc83","isMergeCommit":false,"messageTitle":"Update error handling to be more resilient","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":19},"other":{"insertions":1,"deletions":1}}},{"hash":"7b23c414b16f87663f8d9ac8cbc379596256f30c","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":7}}},{"hash":"6bd0efebc07159b11dc261fff9f34374aba05eec","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":5}}},{"hash":"115693537e993d70f89024842dd6e170d584bf15","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"463587f2747ec71359e71c28e88259af383f0d2d","isMergeCommit":false,"messageTitle":"Update ErrorHandler.java to be more defensive","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"62cdd84658d7065539c5f991671b99913c12e384","isMergeCommit":false,"messageTitle":"Update Assertions and Logging for ErrorHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":1}}},{"hash":"16b0525ef78374b54dc7b6b5e274909efef28325","isMergeCommit":true,"messageTitle":"Merge branch \u0027JUnit\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9bff5d167f55af981c3a47361f0ddd243349ef7e","isMergeCommit":false,"messageTitle":"Update gitignore","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"976434bb6d811e51a8be416ce003b805086dd8cc","isMergeCommit":true,"messageTitle":"Merge pull request #33 from woodenclock/JUnit","messageBody":"Add Assertions\u0026Logging for Parser.java \u0026 ErrorHandler.java","fileTypesAndContributionMap":{}},{"hash":"9cab20433568b43e3f97459a5abd399dc9d95fd6","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4}}}]},{"date":"2023-10-18","commitResults":[{"hash":"1304354f67117f4b44f29fb50d395bff627f33ef","isMergeCommit":true,"messageTitle":"Merge pull request #35 from woodenclock/master","messageBody":"Create LogHandler.java","tags":["v1.0"],"fileTypesAndContributionMap":{}},{"hash":"f2bf7121a54988b8aae718966e9936168a1f78c9","isMergeCommit":false,"messageTitle":"Update HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":26}}},{"hash":"a775e5d8540fe1662258e81878bde359b7389aab","isMergeCommit":true,"messageTitle":"Merge pull request #37 from lctxct/master","messageBody":"Trim add command attributes","fileTypesAndContributionMap":{}},{"hash":"517a582de13b8da9c01cb9560e57eeb9cb900e04","isMergeCommit":true,"messageTitle":"Merge pull request #38 from woodenclock/master","messageBody":"Update HelpCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"3ba93ef829aeb9749839687d188d1e98665dcaf1","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"88f1e79af130134d0e69cd5fc8ac3f4ee7ba4250","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"1e3ece0f8c482bc9b9d69e58d5dfa1ec8bf9c719","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"4be4b3bc4c835b3f228e6664f56f7c45fc5b6929","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7afb1c9045252a235b022ba229fba2f424758d0d","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"a28bd140e9ef8dd83c307f1dd2cbaf6a85324c55","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":1}}},{"hash":"1452811275c11a608f8c8efecf997fffbe3fe359","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":2}}},{"hash":"6d645b691a546bc05707102ae2165ae79c140b68","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":0}}}]},{"date":"2023-10-22","commitResults":[{"hash":"931a82be6bb9716fce842f07f2a0634891c8d723","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fc1314dd5fd8272f25bb0f0c4062ab3ef124c3d4","isMergeCommit":false,"messageTitle":"Create FileHandler class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":262,"deletions":69},"other":{"insertions":24,"deletions":13}}},{"hash":"49953cd354913432aa4e3ae852bd71aa269bb5b2","isMergeCommit":false,"messageTitle":"Update to conform to coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"cdf125e1beca7bb3a4063330b725d59205edc5b2","isMergeCommit":true,"messageTitle":"Merge pull request #43 from woodenclock/feature/file-handler","messageBody":"Create FileHandler class","fileTypesAndContributionMap":{}},{"hash":"b8b831fd2eee00070db0641f2d18c427da06ae7e","isMergeCommit":false,"messageTitle":"Update HandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":46,"deletions":4}}}]},{"date":"2023-10-25","commitResults":[{"hash":"71c60292bc89991caef1a3695436d09286562b0e","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":132,"deletions":22}}},{"hash":"801e5200abe33a244de96df8786e2dbe7bfe8f46","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"de00a3076eb5eba44e4dcb92c1147683139bd577","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"a88ab74d5e7f56c212d229a48c3d1f69f4de57ad","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":8}}},{"hash":"8efa46d48a1f2460f950d0163096e1ed33dfb996","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":1}}},{"hash":"d62b0808a95f7e76fa753f360612e07f9e3104cd","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"70351e139f405fe75afebae3532b13cee21ac57f","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7212664e4176144796e87e3434f4ddd17759744d","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"999431233aacdb145349641f962902670d3956bc","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":13}}},{"hash":"8523bb7ed471238502b710348b84528fd6da0c94","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"6300da7aa03d3bd34ee1cef1ac57da6cd146ee0e","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"79ec23b44f524a07a16aa79097b4a71d4d5a361c","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"73c201d8f89d41325b3a74d623526c2b59ee31ee","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":7}}},{"hash":"fa7c26d503410ebeed06981e77762afd8973d192","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}},{"hash":"1c91472ae7643a1e14d269f55a9b64be4e5b32d9","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"9e9fd85fe63e51e4f72921b8e924a9f22962e1e8","isMergeCommit":true,"messageTitle":"Merge pull request #44 from lctxct/decouple-filehandler","messageBody":"Decouple filehandler","fileTypesAndContributionMap":{}},{"hash":"9113b6d5796af11bb360ce27272ce4a43233193a","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"1b69d279c88f149ead8710f208e350f538cb7a7d","isMergeCommit":false,"messageTitle":"Decouple the InputHandler class from EntryHandler class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":47},"test-code":{"insertions":15,"deletions":33}}},{"hash":"2855de5b8de26166236c54831261d772078f2896","isMergeCommit":false,"messageTitle":"Create FindComamand Operation class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":78,"deletions":3}}},{"hash":"f9c00b1fc91dabeaea48bcf7b66939df2a5cadc0","isMergeCommit":false,"messageTitle":"Fixed bug in FindCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":7}}},{"hash":"a2fef8e3b29c5a04fbe63d90fbef45e22fb3039d","isMergeCommit":false,"messageTitle":"Update to conform to coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"4dcafe9b3f12f35844fdae882657ff74e7ff973c","isMergeCommit":false,"messageTitle":"Delete EntryHandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":35}}},{"hash":"4d2cf0c635b94b39afd5686685817389a8f7a11f","isMergeCommit":true,"messageTitle":"Merge pull request #45 from woodenclock/master","messageBody":"Decouple the InputHandler class from EntryHandler class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"d1790785abfc81cd517c6a30ae354f83829f31b3","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"f14878ef43b32d4f6ace8902a325b3d0f673cc65","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"fc7c5b14c74f279c9949f6a0c75adbd57fe64add","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"ef087c4e7da75d66c8ddb2bfe7fdbb7fbc43fc85","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":14,"deletions":4}}},{"hash":"594921c73d45b19c90ee33995dacd59893d330c9","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"e4a22d783560b1ed2f05ce2d7475a1de8240abdc","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"5a1e50d52da7261382aaf1afff40e2dd41dd18b6","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"9d8b5f5499e762f794e8e4a9546a3ab5abac8c64","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"b1a6375766d87c2cb0ee8f581008919daf1597fb","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"1e48ee6e8ccb0f62d4986a65d48f952d5abc08ad","isMergeCommit":false,"messageTitle":"Update FindCommand.java, erased print used for debugging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"5bc23eba9fb6ccbf703de844153e9d8a70326f49","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"2aabe5252b8721b13c6f1bc01343f366c7d4bba0","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"5b144293727c9669eef4fb7a3fb130262de7dc77","isMergeCommit":true,"messageTitle":"Merge pull request #47 from woodenclock/master","messageBody":"Update FindCommand.java, erased print used for debugging","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"57ea655be0101904e4e4896a56d269eb269d5659","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"9d5948c7728238f746ab462036e8e7228052fd03","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"c91cdfa7f37882e01a42b7c55cc1cd84bbc75bee","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":1}}},{"hash":"e8a7f527f27279ffc60b7044e6c6490253813216","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"2d94603aaf7ac8b4268f03c0727a9f069f989d45","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"16a5a67761528c9b8fbe8648b51df1ff88e64704","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"74787f82bda0e7105cf06e16571b87d8dbf03b55","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}}]},{"date":"2023-10-28","commitResults":[{"hash":"6ce9fbaa24fdd842c8f291108986b2deac66553a","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":8}}},{"hash":"eb0321b813089f0868700ccc31bb5438385f7ce7","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"d80b65a2c7a0e70d829823382e7b7a7c3e36cde2","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":22}}}]},{"date":"2023-10-29","commitResults":[{"hash":"ce4fcce49515f712cf651b6eecbb20dd61571cef","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":1}}}]}],"tangzhenen":[{"date":"2023-10-13","commitResults":[{"hash":"533b7989a5a1ab5bb5320352563ef8ec26703a36","isMergeCommit":false,"messageTitle":"Add delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":4}}},{"hash":"5a8687f571cd1e27f76be6509dbe561301672ebf","isMergeCommit":false,"messageTitle":"Update entry list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"972d977c09e7acc98f20d0f7126538392192348f","isMergeCommit":false,"messageTitle":"Update Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"3d2b111b51993622d4ee5a3533f64719aa479814","isMergeCommit":false,"messageTitle":"Bug fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"3294660fadf18a4228e61b926bdb7d1374e63746","isMergeCommit":false,"messageTitle":"Bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]}],"lctxct":[{"date":"2023-10-16","commitResults":[{"hash":"c0a6facf1ef9e936416052a7d76eaf23255016fd","isMergeCommit":false,"messageTitle":"Add add command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":5}}},{"hash":"632e790bd87588b55a753b76eaaf7d4dccb54216","isMergeCommit":false,"messageTitle":"Fix checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":2}}},{"hash":"4b26b50b548553c814feb4174ddda85dc03134fb","isMergeCommit":false,"messageTitle":"Fix thrown exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"b61c4261525cf634b900f427e7ef9b882f00385a","isMergeCommit":false,"messageTitle":"Fix cause of date exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"bc517ce6a252ddf3a72742a4fb8ed074cc1edbfa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of github.com:lctxct/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"865340925053b521b9d91c616f26fbc04a762ba5","isMergeCommit":false,"messageTitle":"Decouple filehandler functions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":17}}},{"hash":"11d6042e07a6939cee64533690875a2366deb6c3","isMergeCommit":false,"messageTitle":"Move EntryHandler to main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}}]},{"date":"2023-10-28","commitResults":[{"hash":"4394a0a78505bbb5df96ce7ff8c65e79b82cdcbc","isMergeCommit":false,"messageTitle":"Add input prompt","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"9a546b130db55a07862cad1fe776d47c1896a346","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":3}}},{"hash":"71f0a2f9adea67936991bdb756b5b4812194ec27","isMergeCommit":true,"messageTitle":"Merge pull request #84 from lctxct/add-input-prompt","messageBody":"Add input prompt","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"7566680d6432f1327c9d79e97e0fce1256f94c50","isMergeCommit":false,"messageTitle":"Modify save file formatting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":13}}},{"hash":"59f0c98600743012db13cf717d528911d49e6c87","isMergeCommit":true,"messageTitle":"Merge pull request #85 from lctxct/modify-entry-loading","messageBody":"Modify save file formatting","fileTypesAndContributionMap":{}},{"hash":"7de3fcd9415ac19f9d1ca2b45d46eebdd6e02412","isMergeCommit":false,"messageTitle":"Update to use COMMAND_WORDs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":20}}},{"hash":"8331f9b1703d24dba16d1b68cc2d6ac016086694","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"580d519c695345b4e2e4dd3bd07726093db4e73e","isMergeCommit":true,"messageTitle":"Merge pull request #86 from lctxct/add-commandwords","messageBody":"Update to use COMMAND_WORDs","fileTypesAndContributionMap":{}},{"hash":"f90e278dc3d2f920b189e66bf9b80d86cf2c0479","isMergeCommit":false,"messageTitle":"Add execute()s to commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":25}}},{"hash":"fa1e3af7807c5828627b64414f4234ab6df87908","isMergeCommit":true,"messageTitle":"Merge pull request #87 from lctxct/add-command-execute","messageBody":"Add execute()s to commands","fileTypesAndContributionMap":{}},{"hash":"314155a753a8959dc53f40c2b0301b55f4849166","isMergeCommit":false,"messageTitle":"Move routing functionality to EntryHandler","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":41,"deletions":24}}},{"hash":"04b5df6d75fb2be3b92ae02d90f8395b6667ae16","isMergeCommit":true,"messageTitle":"Merge pull request #88 from lctxct/improve-command-routing","messageBody":"Move routing functionality to EntryHandler","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"imaginarys96":{"docs":55,"functional-code":102,"test-code":0},"woodenclock":{"docs":156,"functional-code":760,"test-code":22,"other":6},"tangzhenen":{"docs":0,"functional-code":14,"test-code":0},"lctxct":{"docs":0,"functional-code":238,"test-code":0}},"authorContributionVariance":{"imaginarys96":1158.881,"woodenclock":37240.72,"tangzhenen":51.88711,"lctxct":1725.1807},"authorDisplayNameMap":{"imaginarys96":"CS2113T-W11-2 YANG..REMY","woodenclock":"CS2113T-W11-2 LEE ..GMIN","tangzhenen":"CS2113T-W11-2 TANG..N EN","lctxct":"CS2113T-W11-2 LIEN..TING"}} +{"authorDailyContributionsMap":{"imaginarys96":[{"date":"2023-10-14","commitResults":[{"hash":"ec58ce88cfc6d13389719ba5c71f25eca9a9a801","isMergeCommit":false,"messageTitle":"Updated help command for v1 features - help, add, list, delete","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":45,"deletions":43}}},{"hash":"bf15d755cbc672977eb38b6001162424834580fc","isMergeCommit":true,"messageTitle":"Merge pull request #31 from imaginarys96/master","messageBody":"Updated help command for v1 features - help, add, list, delete","fileTypesAndContributionMap":{}}]},{"date":"2023-10-28","commitResults":[{"hash":"d99f0c79eee52e1af97c186c829392ef8e30f8aa","isMergeCommit":false,"messageTitle":"Implemented SummaryCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":80,"deletions":4}}},{"hash":"5fd5ddccef1e9c4294df3f1b749d059f20811590","isMergeCommit":true,"messageTitle":"Merge pull request #77 from imaginarys96/master","messageBody":"Implemented SummaryCommand","fileTypesAndContributionMap":{}},{"hash":"e9872b87ea07ed2f4cfae8208a6b7b9c85b19f80","isMergeCommit":false,"messageTitle":"reordered help command in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":55,"deletions":55}}},{"hash":"4c5d7b7b18fb4ddc69c360e904b408a2dbf760d5","isMergeCommit":true,"messageTitle":"Merge pull request #78 from imaginarys96/master","messageBody":"reordered help command in UserGuide","fileTypesAndContributionMap":{}},{"hash":"8dfcebc71e11c422e383ebe2a57adf7c36d807a3","isMergeCommit":false,"messageTitle":"reordered table of contents in UserGuide","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7f53d8a203e66ce0c1ce0ff7df0065910b5995cc","isMergeCommit":true,"messageTitle":"Merge pull request #79 from imaginarys96/master","messageBody":"reordered table of contents in UserGuide","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"b2370db38fdd6b8d98b86c2367444f6337266906","isMergeCommit":false,"messageTitle":"Implemented EditCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":93,"deletions":9}}},{"hash":"fa22d1545a218794419f1d0a67cec37502a5d8bd","isMergeCommit":false,"messageTitle":"Updated UserGuide to include summary and edit commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"docs":{"insertions":60,"deletions":7}}},{"hash":"6cdbd2c30fdeef268e33fb981ecd3b576b3b2d3b","isMergeCommit":true,"messageTitle":"Merge pull request #89 from imaginarys96/master","messageBody":"Added `edit` command, updated UserGuide to include `edit` and `summary` commands","fileTypesAndContributionMap":{}},{"hash":"b26d8338e0a7b492c5168c089f28059631573218","isMergeCommit":false,"messageTitle":"fix gradle errors","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":5}}},{"hash":"7ea0fc9a05bd1bf0189f19626dcf36b60f769d6f","isMergeCommit":true,"messageTitle":"Merge pull request #91 from imaginarys96/master","messageBody":"fix gradle errors","fileTypesAndContributionMap":{}},{"hash":"5c47056fa698a2c75cc2089a9ee983c81a3acacb","isMergeCommit":false,"messageTitle":"added edit, summary table of contents to include link to github pages. updated FAQ to have Q\u0026A on separate lines","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":4}}},{"hash":"144e360d92e10d6eadfd15dab9e913ca17060554","isMergeCommit":true,"messageTitle":"Merge pull request #92 from imaginarys96/master","messageBody":"added edit, summary table of contents to include link to github pages…","fileTypesAndContributionMap":{}}]}],"woodenclock":[{"date":"2023-10-04","commitResults":[{"hash":"773a8e43cb56142c5789ca6965e4db2986c5c57f","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}}]},{"date":"2023-10-09","commitResults":[{"hash":"6077ba4a23bd1b9fc1e50fa53e3b872be5b6eb1e","isMergeCommit":false,"messageTitle":"Create AboutUs branch and leesungmin.md portfolio","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":7}}},{"hash":"a37fa65ccb6a1b62dfab0eb6f3457341f6d818fc","isMergeCommit":false,"messageTitle":"Update READ.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":2}}},{"hash":"c2fcafd4f8451047de38b018df37b1fe9c6f480a","isMergeCommit":true,"messageTitle":"Merge pull request #1 from woodenclock/LeeSungmin-AboutUs","messageBody":"Create AboutUs branch and leesungmin.md portfolio","fileTypesAndContributionMap":{}},{"hash":"3e9aca38ae0e03fd4a8ae621146d083c45409027","isMergeCommit":true,"messageTitle":"Merge branch \u0027LeeSungmin-AboutUs\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"2d4101597f24823b23a9a5ef502aef5397288f1c","isMergeCommit":false,"messageTitle":"Rename Duke.java to WildWatch.java as per out project name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"1abb04b6249ec7daf5a386a21773f3ddb077ac18","isMergeCommit":false,"messageTitle":"Revert \"Rename Duke.java to WildWatch.java as per out project name\"","messageBody":"This reverts commit 2d4101597f24823b23a9a5ef502aef5397288f1c.\n","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"244abfa479dd4619a399297ac397592315e08604","isMergeCommit":false,"messageTitle":"Create abstract class Animal","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":18,"deletions":0}}},{"hash":"7663b3ecf3a8aa8aa508d8ca7edad59130e9c0eb","isMergeCommit":false,"messageTitle":"Rename project as WildWatch as per our project name","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":6,"deletions":6}}},{"hash":"b2e6806dddd0bf67b32c68655dd5236c7e9cc544","isMergeCommit":true,"messageTitle":"Merge pull request #4 from woodenclock/rename_project","messageBody":"Rename project from Duke to WildWatch as per our project name","fileTypesAndContributionMap":{}},{"hash":"c6242a7063a64aa4bb36350d575a875c50229edc","isMergeCommit":true,"messageTitle":"Merge branch \u0027rename_project\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"a64a4c0cab96655ea728b5ac0f2f60751c8ed5a1","isMergeCommit":false,"messageTitle":"Create BootUp.java that contains welcome logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":77,"deletions":0}}},{"hash":"1f3d3b8c4fc84585d1699c43d127d4a36da01587","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":114,"deletions":76}}},{"hash":"fe6e136acc5d593d19301effc6cc5f2641e1947e","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":8}}},{"hash":"6c2cafbaba2f9bb015357d95eff4dfaa5f5c4a69","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":21}}},{"hash":"6cf1720e89934b3c61ab1c0d8db3a7e239eacd36","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"b348ea5c36874f96a6b46c30290db939136d88fc","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"c4fb3ba9f397df9c3454cadc898b8829dd8553db","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"32d40d3e7e7046ccc3c3e596dc7c5b0b68073947","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"bfd809b962a596b58a7fc24c27f6b244735c571b","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"936492bd4e993987c0bd1fcae321f3493ab4b91e","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"429d316db795b18efa841f79d94336cea4f40331","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"fd7bfa9b414fe7ee9bfb841d84703aaf82e6ce7c","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":52,"deletions":133},"other":{"insertions":1,"deletions":1}}},{"hash":"97689efd86b84f8ee0b3497014aea9426286baaa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into bootup","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"ac3e8877e92b18280e3cd70bdadaf9310f81dff7","isMergeCommit":true,"messageTitle":"Merge pull request #6 from woodenclock/bootup","messageBody":"Update BootUp.java to fit within 120 wordline limit","fileTypesAndContributionMap":{}},{"hash":"c06e04b29d428439ccf8b280bd26d5482c96c8d3","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"31c6d46df982c3a0688f29f473887f21dc3ba1db","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":51}}},{"hash":"c6dff4fe86a6f3264235eadf60d8443e5e8f6a19","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"98d77c185330d024cf1a480c1d16eb5413f0f497","isMergeCommit":true,"messageTitle":"Merge branch \u0027bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"95b5f9b53ffbc9c55aa75f230a8746872f8bee4c","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027origin/bootup\u0027 into bootup","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9f4548643bc946e1e5906276338a280796b2cef9","isMergeCommit":false,"messageTitle":"Update project structure","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":27,"deletions":39}}},{"hash":"e5a87bbe89f4a01b708f0f3327d195415909489c","isMergeCommit":true,"messageTitle":"Merge branch \u0027bootup\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"987dc591619e7c1b4cd557c06e21f6a68d607a4a","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"a5c52684a404e5205c5674689e949f782d79811c","isMergeCommit":false,"messageTitle":"Update BootUp.java to conform to coding quality","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"1f17fcaa275038ea365d6759055ab33f6c31e9aa","isMergeCommit":true,"messageTitle":"Merge pull request #12 from woodenclock/bootup","messageBody":"Update project structure","fileTypesAndContributionMap":{}},{"hash":"7145784bb155b969e48ff7e7010ea4c97c2aae75","isMergeCommit":false,"messageTitle":"Create Entry class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":2}}},{"hash":"f03352d7d7f269e18a0591384ba5a3c7cc4eb55a","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":8}}},{"hash":"96ac3b11547e3b2d2d4c6e14bdf22fd36aa76bba","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into entry","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"5dac1732ee34244d4e59bf099e9261501710087d","isMergeCommit":true,"messageTitle":"Merge pull request #13 from woodenclock/entry","messageBody":"Create Entry class","fileTypesAndContributionMap":{}},{"hash":"945347d04572d7a9a11413580262329c992f14a5","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":2},"test-code":{"insertions":4,"deletions":2}}},{"hash":"3b7a601cd1b53fc7be7a2d1bedc42310cf1649e1","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into test","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"be05363bad21706e61fab277cea8f999e2782b07","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"2e019b43aa866ada15a4ed25cd3d7885ac10cc4a","isMergeCommit":false,"messageTitle":"Create EntryList class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":0}}},{"hash":"6d3073813fb40e7d90e3ab589849963683e1189a","isMergeCommit":true,"messageTitle":"Merge pull request #14 from woodenclock/test","messageBody":"Update WildWatchTest.java","fileTypesAndContributionMap":{}},{"hash":"f774cc61af7a812a27a5b8886299f5f7b1f8868d","isMergeCommit":true,"messageTitle":"Merge pull request #15 from woodenclock/entry-list","messageBody":"Create EntryList class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-11","commitResults":[{"hash":"fb23536d544f38c73460e96a5c8bd313abdf0871","isMergeCommit":false,"messageTitle":"Update Main.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"38254679c1a734c325e5dab8dcf333beef508b93","isMergeCommit":false,"messageTitle":"Update Entry","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":14,"deletions":4}}},{"hash":"a3e6c2fd82eac65ab404abed9a60af89969b3303","isMergeCommit":true,"messageTitle":"Merge branch \u0027test\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"1bade08d80d0e3eedb5160168e9cb74b4927402d","isMergeCommit":true,"messageTitle":"Merge branch \u0027entry-list\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"d0e3391ae33de9f5e0a565830ac98df6cc4f313f","isMergeCommit":true,"messageTitle":"Merge branch \u0027entry\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"4ee7626d1bc4413bf1ddef578903135c52b31969","isMergeCommit":false,"messageTitle":"Update runtest.sh","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":2,"deletions":1}}},{"hash":"9e1e349dc0473c94c82979f9b4205f2c7a5a2a0f","isMergeCommit":true,"messageTitle":"Merge pull request #17 from woodenclock/master","messageBody":"Update Main.java","fileTypesAndContributionMap":{}},{"hash":"641b2c736ec355c3848f2cbcbb041dc8338c9f26","isMergeCommit":false,"messageTitle":"Update Main.java to show welcome logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}},{"hash":"77fe5541e59e37f74e72d91231d710d0ed696be1","isMergeCommit":false,"messageTitle":"Update Welcome Logo","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":13,"deletions":13},"other":{"insertions":1,"deletions":1}}},{"hash":"6ea49076bd57c39603afcf927bf16466cdace61a","isMergeCommit":true,"messageTitle":"Merge pull request #18 from woodenclock/master","messageBody":"Update Main.java to show welcome logo","fileTypesAndContributionMap":{}},{"hash":"68be8887d8efee36a1ef4f109533033482dcd242","isMergeCommit":false,"messageTitle":"Update BootUp.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"c2a56a8ff200897cfb897a15b2667cf694316c48","isMergeCommit":false,"messageTitle":"Merge operatingsystem and operation","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":58,"deletions":6},"other":{"insertions":1,"deletions":1}}},{"hash":"b9d4ec4398a5423e8ba4e6cff7a0e21b6703d2de","isMergeCommit":false,"messageTitle":"Create Help.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":69,"deletions":1}}},{"hash":"139ddda6ac311b9fe600964084bedc30025b5c23","isMergeCommit":false,"messageTitle":"Create Ui.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":16}}},{"hash":"aa73f36ed0f867e9cc494712264bbcf74eb20acd","isMergeCommit":false,"messageTitle":"Update runtest.bat","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"1b39f7d802f41be2b0972d434ac72ed2a5d174ea","isMergeCommit":false,"messageTitle":"Update Main.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":265,"deletions":12},"other":{"insertions":2,"deletions":2}}},{"hash":"2f5bb6fcc91de14d1cfdff6923d9cf4cbe8b586a","isMergeCommit":false,"messageTitle":"Rectify coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":7}}},{"hash":"3fe9e8732a78b643b213927cfc670a40841bc438","isMergeCommit":true,"messageTitle":"Merge pull request #19 from woodenclock/master","messageBody":"Update BootUp.java","fileTypesAndContributionMap":{}},{"hash":"768e729a01aa2ca563e5b753adfd4bb3fba53fe2","isMergeCommit":false,"messageTitle":"Create DateHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":37,"deletions":9}}},{"hash":"17a55f41fb4299dbafc4a11ce5132343f647ce8e","isMergeCommit":false,"messageTitle":"Update master","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":39,"deletions":11}}},{"hash":"00f4e5be68faec38e3787643e978c85acd8a4140","isMergeCommit":false,"messageTitle":"Update DateHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-12","commitResults":[{"hash":"854362b0cb347d3eef09cff390a2bc1ece81a933","isMergeCommit":false,"messageTitle":"Create UiTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":7,"deletions":7},"test-code":{"insertions":23,"deletions":5}}},{"hash":"9219e532962e466897da973e62b635128a9537d7","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":6,"deletions":1}}},{"hash":"000704a61d0cf556f3659838c9f483cf4dc327b9","isMergeCommit":false,"messageTitle":"Update WildWatchTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":1,"deletions":2}}},{"hash":"3bd708d0dc25b88e7467f88ebf02c13d04fad21a","isMergeCommit":true,"messageTitle":"Merge pull request #24 from woodenclock/JUnit","messageBody":"Create DateHandler.java","fileTypesAndContributionMap":{}},{"hash":"9269539e2e1b215c6abe2ce8299598f2ac7bbfc9","isMergeCommit":false,"messageTitle":"Update master","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":9},"test-code":{"insertions":23,"deletions":1}}},{"hash":"ec828890f2b2e762697dc08f3c59345057a75d6b","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"21885dd84c3a1eb10fc873bea34312d6cd5d3908","isMergeCommit":false,"messageTitle":"Create DateHandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":2},"test-code":{"insertions":45,"deletions":4}}},{"hash":"e62a99b83b1a86695fdd408c40fa647c6d55c395","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":1}}},{"hash":"a42c135198681cfb760500a9fb570cf655900b15","isMergeCommit":false,"messageTitle":"Update JUnit Testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":33}}},{"hash":"34c204943b75d986f3434990cc8a2a0d51785428","isMergeCommit":true,"messageTitle":"Merge pull request #26 from woodenclock/JUnit","messageBody":"Update JUnit Testing","fileTypesAndContributionMap":{}},{"hash":"f89a3376b6128b40c6fb6a0ac87ae67433c69718","isMergeCommit":false,"messageTitle":"Update master branch","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":3},"test-code":{"insertions":30,"deletions":24}}}]},{"date":"2023-10-13","commitResults":[{"hash":"04bfb9cdcbb0e565b7728dff4ef37b9900ecaf01","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"c41766f63af1deec7f34501671e4ce7797dd8a7e","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"0824e77a201a68175ae07a2bd651b9a28d77bfae","isMergeCommit":false,"messageTitle":"Update AboutUs.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"155b4a5313622cf619386de79dac55fd1e6511d2","isMergeCommit":false,"messageTitle":"Update Team","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":6}}}]},{"date":"2023-10-14","commitResults":[{"hash":"a6771c27f6f02e0b583eab8a6b8b084dc2e2b613","isMergeCommit":true,"messageTitle":"Merge pull request #30 from tangzhenen/DeleteCommand","messageBody":"Delete command ","fileTypesAndContributionMap":{}},{"hash":"66a8c9a6cd5cac707a4f960ee6afbc999ae363dd","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"00c2201381e98033b496951aac6812238b46249b","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"7aa2d2e9e23cbaaa7c4d183901c9a80aeb4a050e","isMergeCommit":false,"messageTitle":"Delete docs/team/johndoe.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":6}}}]},{"date":"2023-10-15","commitResults":[{"hash":"d224fc9b93a7ab109c4bc7789325449fa98c4b31","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"610129370f63512b2b17ef46b9e9e9bba81ea8f2","isMergeCommit":false,"messageTitle":"Update ErrorHandler to be more defensive when handling invalid command input for delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":42,"deletions":21}}},{"hash":"b0b42fe5a3c45ea96b5cb9f0231b763009ce75b1","isMergeCommit":false,"messageTitle":"Update Helper to HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":8},"other":{"insertions":2,"deletions":2}}},{"hash":"6fb4e2fce4321f4b3390687233fed35eaf984f33","isMergeCommit":true,"messageTitle":"Merge pull request #29 from woodenclock/master","messageBody":"Update docs/team","fileTypesAndContributionMap":{}}]},{"date":"2023-10-16","commitResults":[{"hash":"450da925b330879ecf333b82d2f23dd01f0ba7cf","isMergeCommit":true,"messageTitle":"Merge pull request #32 from lctxct/master","messageBody":"Add add command","fileTypesAndContributionMap":{}},{"hash":"cca01ddd9bafcd73bab5601d937d80176c768a4c","isMergeCommit":false,"messageTitle":"Add assertions for Parser.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":15,"deletions":10},"other":{"insertions":1,"deletions":0}}},{"hash":"be31165e3f29da49d974c06bfe456d9a86e14d5e","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 into JUnit","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"46279ea4c95f206dddb4e551a2e1dbe2db2adc83","isMergeCommit":false,"messageTitle":"Update error handling to be more resilient","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":33,"deletions":19},"other":{"insertions":1,"deletions":1}}},{"hash":"7b23c414b16f87663f8d9ac8cbc379596256f30c","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":7}}},{"hash":"6bd0efebc07159b11dc261fff9f34374aba05eec","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":12,"deletions":5}}},{"hash":"115693537e993d70f89024842dd6e170d584bf15","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"other":{"insertions":1,"deletions":1}}},{"hash":"463587f2747ec71359e71c28e88259af383f0d2d","isMergeCommit":false,"messageTitle":"Update ErrorHandler.java to be more defensive","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"other":{"insertions":1,"deletions":1}}},{"hash":"62cdd84658d7065539c5f991671b99913c12e384","isMergeCommit":false,"messageTitle":"Update Assertions and Logging for ErrorHandler.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":11,"deletions":1}}},{"hash":"16b0525ef78374b54dc7b6b5e274909efef28325","isMergeCommit":true,"messageTitle":"Merge branch \u0027JUnit\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"9bff5d167f55af981c3a47361f0ddd243349ef7e","isMergeCommit":false,"messageTitle":"Update gitignore","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":36,"deletions":0}}},{"hash":"976434bb6d811e51a8be416ce003b805086dd8cc","isMergeCommit":true,"messageTitle":"Merge pull request #33 from woodenclock/JUnit","messageBody":"Add Assertions\u0026Logging for Parser.java \u0026 ErrorHandler.java","fileTypesAndContributionMap":{}},{"hash":"9cab20433568b43e3f97459a5abd399dc9d95fd6","isMergeCommit":false,"messageTitle":"Update to conform coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":4}}}]},{"date":"2023-10-18","commitResults":[{"hash":"1304354f67117f4b44f29fb50d395bff627f33ef","isMergeCommit":true,"messageTitle":"Merge pull request #35 from woodenclock/master","messageBody":"Create LogHandler.java","tags":["v1.0"],"fileTypesAndContributionMap":{}},{"hash":"f2bf7121a54988b8aae718966e9936168a1f78c9","isMergeCommit":false,"messageTitle":"Update HelpCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":26}}},{"hash":"a775e5d8540fe1662258e81878bde359b7389aab","isMergeCommit":true,"messageTitle":"Merge pull request #37 from lctxct/master","messageBody":"Trim add command attributes","fileTypesAndContributionMap":{}},{"hash":"517a582de13b8da9c01cb9560e57eeb9cb900e04","isMergeCommit":true,"messageTitle":"Merge pull request #38 from woodenclock/master","messageBody":"Update HelpCommand","fileTypesAndContributionMap":{}}]},{"date":"2023-10-21","commitResults":[{"hash":"3ba93ef829aeb9749839687d188d1e98665dcaf1","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"88f1e79af130134d0e69cd5fc8ac3f4ee7ba4250","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"1e3ece0f8c482bc9b9d69e58d5dfa1ec8bf9c719","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"4be4b3bc4c835b3f228e6664f56f7c45fc5b6929","isMergeCommit":false,"messageTitle":"Update README.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7afb1c9045252a235b022ba229fba2f424758d0d","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"a28bd140e9ef8dd83c307f1dd2cbaf6a85324c55","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":1}}},{"hash":"1452811275c11a608f8c8efecf997fffbe3fe359","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":12,"deletions":2}}},{"hash":"6d645b691a546bc05707102ae2165ae79c140b68","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":0}}}]},{"date":"2023-10-22","commitResults":[{"hash":"931a82be6bb9716fce842f07f2a0634891c8d723","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"fc1314dd5fd8272f25bb0f0c4062ab3ef124c3d4","isMergeCommit":false,"messageTitle":"Create FileHandler class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":262,"deletions":69},"other":{"insertions":24,"deletions":13}}},{"hash":"49953cd354913432aa4e3ae852bd71aa269bb5b2","isMergeCommit":false,"messageTitle":"Update to conform to coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":8,"deletions":4}}},{"hash":"cdf125e1beca7bb3a4063330b725d59205edc5b2","isMergeCommit":true,"messageTitle":"Merge pull request #43 from woodenclock/feature/file-handler","messageBody":"Create FileHandler class","fileTypesAndContributionMap":{}},{"hash":"b8b831fd2eee00070db0641f2d18c427da06ae7e","isMergeCommit":false,"messageTitle":"Update HandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":46,"deletions":4}}}]},{"date":"2023-10-25","commitResults":[{"hash":"71c60292bc89991caef1a3695436d09286562b0e","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":132,"deletions":22}}},{"hash":"801e5200abe33a244de96df8786e2dbe7bfe8f46","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"de00a3076eb5eba44e4dcb92c1147683139bd577","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"a88ab74d5e7f56c212d229a48c3d1f69f4de57ad","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":8}}},{"hash":"8efa46d48a1f2460f950d0163096e1ed33dfb996","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":1}}},{"hash":"d62b0808a95f7e76fa753f360612e07f9e3104cd","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"70351e139f405fe75afebae3532b13cee21ac57f","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"7212664e4176144796e87e3434f4ddd17759744d","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"999431233aacdb145349641f962902670d3956bc","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":25,"deletions":13}}},{"hash":"8523bb7ed471238502b710348b84528fd6da0c94","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"6300da7aa03d3bd34ee1cef1ac57da6cd146ee0e","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"79ec23b44f524a07a16aa79097b4a71d4d5a361c","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"73c201d8f89d41325b3a74d623526c2b59ee31ee","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":7}}},{"hash":"fa7c26d503410ebeed06981e77762afd8973d192","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}},{"hash":"1c91472ae7643a1e14d269f55a9b64be4e5b32d9","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"9e9fd85fe63e51e4f72921b8e924a9f22962e1e8","isMergeCommit":true,"messageTitle":"Merge pull request #44 from lctxct/decouple-filehandler","messageBody":"Decouple filehandler","fileTypesAndContributionMap":{}},{"hash":"9113b6d5796af11bb360ce27272ce4a43233193a","isMergeCommit":true,"messageTitle":"Merge remote-tracking branch \u0027upstream/master\u0027","messageBody":"","fileTypesAndContributionMap":{}},{"hash":"1b69d279c88f149ead8710f208e350f538cb7a7d","isMergeCommit":false,"messageTitle":"Decouple the InputHandler class from EntryHandler class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":60,"deletions":47},"test-code":{"insertions":15,"deletions":33}}},{"hash":"2855de5b8de26166236c54831261d772078f2896","isMergeCommit":false,"messageTitle":"Create FindComamand Operation class","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":78,"deletions":3}}},{"hash":"f9c00b1fc91dabeaea48bcf7b66939df2a5cadc0","isMergeCommit":false,"messageTitle":"Fixed bug in FindCommand","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":16,"deletions":7}}},{"hash":"a2fef8e3b29c5a04fbe63d90fbef45e22fb3039d","isMergeCommit":false,"messageTitle":"Update to conform to coding standards","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"4dcafe9b3f12f35844fdae882657ff74e7ff973c","isMergeCommit":false,"messageTitle":"Delete EntryHandlerTest.java","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":0,"deletions":35}}},{"hash":"4d2cf0c635b94b39afd5686685817389a8f7a11f","isMergeCommit":true,"messageTitle":"Merge pull request #45 from woodenclock/master","messageBody":"Decouple the InputHandler class from EntryHandler class","fileTypesAndContributionMap":{}}]},{"date":"2023-10-26","commitResults":[{"hash":"d1790785abfc81cd517c6a30ae354f83829f31b3","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"f14878ef43b32d4f6ace8902a325b3d0f673cc65","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"fc7c5b14c74f279c9949f6a0c75adbd57fe64add","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"ef087c4e7da75d66c8ddb2bfe7fdbb7fbc43fc85","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":14,"deletions":4}}},{"hash":"594921c73d45b19c90ee33995dacd59893d330c9","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"e4a22d783560b1ed2f05ce2d7475a1de8240abdc","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"5a1e50d52da7261382aaf1afff40e2dd41dd18b6","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"9d8b5f5499e762f794e8e4a9546a3ab5abac8c64","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"b1a6375766d87c2cb0ee8f581008919daf1597fb","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"1e48ee6e8ccb0f62d4986a65d48f952d5abc08ad","isMergeCommit":false,"messageTitle":"Update FindCommand.java, erased print used for debugging","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":0,"deletions":4}}},{"hash":"5bc23eba9fb6ccbf703de844153e9d8a70326f49","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"2aabe5252b8721b13c6f1bc01343f366c7d4bba0","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"5b144293727c9669eef4fb7a3fb130262de7dc77","isMergeCommit":true,"messageTitle":"Merge pull request #47 from woodenclock/master","messageBody":"Update FindCommand.java, erased print used for debugging","fileTypesAndContributionMap":{}}]},{"date":"2023-10-27","commitResults":[{"hash":"57ea655be0101904e4e4896a56d269eb269d5659","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"9d5948c7728238f746ab462036e8e7228052fd03","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"c91cdfa7f37882e01a42b7c55cc1cd84bbc75bee","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":1}}},{"hash":"e8a7f527f27279ffc60b7044e6c6490253813216","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"2d94603aaf7ac8b4268f03c0727a9f069f989d45","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"16a5a67761528c9b8fbe8648b51df1ff88e64704","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"74787f82bda0e7105cf06e16571b87d8dbf03b55","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}}]},{"date":"2023-10-28","commitResults":[{"hash":"6ce9fbaa24fdd842c8f291108986b2deac66553a","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":8}}},{"hash":"eb0321b813089f0868700ccc31bb5438385f7ce7","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"d80b65a2c7a0e70d829823382e7b7a7c3e36cde2","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":22}}}]},{"date":"2023-10-29","commitResults":[{"hash":"ce4fcce49515f712cf651b6eecbb20dd61571cef","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":0,"deletions":1}}},{"hash":"611a90c0c6fd9da1d06889d18dbb296cdeac2c6b","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"2eac7e89b4fed923b03fcada875c4be390c53a60","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":3}}},{"hash":"a14b8b479b1006cc4d0aa7618e9a36324737a973","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":2}}},{"hash":"181ad4cb23ddc381e4e2a29efc3bdb9c63a413e8","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e1080b16b1e920bbc2abb08d554b8ba251104dce","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":1}}},{"hash":"2597af2a2f0e64029f5480e4326f93117bbf6af5","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"2ae2724282d1109842a73b773892eb3a07e573ca","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":4}}},{"hash":"8d9383af337d9471ed9a049aab43bb8ac12c1aa7","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}},{"hash":"060385fd1e89ec1a4729a5dbd533f1b9f4f608e4","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"073a4ec309a9d9008fdab4b5f106a50761797fed","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":7,"deletions":71}}},{"hash":"a9eb2742b0b5f8cc3f8d284f714496f3b0fa9730","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"76bb482a8343fce5d1d158b0ce7e21f852a58141","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"2345e47ffc5eb68f8197b68a7b1665ed961835fb","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":14,"deletions":14}}},{"hash":"e89f82832e022ae7c468b919e083722c59abebf2","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"50bdcd1c15c534c15a4eeaf9d8daa35f0a210426","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"6d81e802214fa27ed2d28e36f2d9ca53888ca912","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"6c00c908a887a0c8992443e7bdb240362efeb426","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"651039e21d0b65fe705af36b25f647e8fb56f054","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"70cc7886454dd7ba9a79eba19b4b8a56b9c9201f","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":1}}},{"hash":"58842c5494dc812495e8bbfe34d22d213114215c","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"9c6571ba3ce9c6ad1ec531daf4aecc56cb171351","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"b01023f7a8aa1c8bb26f59ceb0103cb8e34b2456","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":9,"deletions":2}}},{"hash":"72fb57b99c225cc3897679785e4efdec99ce5060","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":1}}},{"hash":"a947305e86c2914fa7875290926c682a676a485b","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"2f7520d069bfc07162a715eb4c3cb1d596122597","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"163f996f0404d39155c01eddbbced0794592605b","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":11,"deletions":3}}},{"hash":"ac83aa125df999e0b0619336f401ca3fad7e5495","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"1205b0fd11249db616a705a739936d38d5b8a02b","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"f35c6acfd6a7325d24e7eed72a409a83f412d5dc","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":1}}},{"hash":"df487785b54bf1a14003b3de8a1f1ef2fb8c37a2","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":3}}},{"hash":"f266228b0a2c6f7b009d15956cdd31ee930f0ffb","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"b59f34187079ec906132e0281e33061260c03259","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":3}}},{"hash":"6f268e710f65006826bf9e9aa6c114ad00e4b976","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"6eec5bad8d3db469c47df5c937821f6228a45e86","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"e203ad818030487b48ff07d998aa4313a965d2bd","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":7}}},{"hash":"65d6b05a1cd59431924a51c1ab2c7aa5003cf731","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":2,"deletions":2}}},{"hash":"93cccaccfec882329c3008f9cb3f86626b1e13d3","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":10,"deletions":5}}},{"hash":"9ab358dea1759da20e17f6e69afa226a9ce3f4c0","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"59d29f98700b1c20d3bd76807074d011fc163c91","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":6,"deletions":6}}},{"hash":"21adb7eb14887f7a43ad1fe69039db0627306e87","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":1}}},{"hash":"8eb136dd8247e797cb702261f987fe5a55a0663f","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"b0f714da3077dff001078572afa19c6105538437","isMergeCommit":false,"messageTitle":"Create ByeCommandTest.java","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":2},"test-code":{"insertions":0,"deletions":0}}},{"hash":"a853fe4ad9734a26cd67884fcf2edbbd604ddf82","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":2}}},{"hash":"7578737d271c9ff421224e23b2de063bc8cbd1f5","isMergeCommit":false,"messageTitle":"Update leesungmin.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":4,"deletions":4}}},{"hash":"87aaf65189640f6b9b97ce46d2e133a0d4626713","isMergeCommit":false,"messageTitle":"Delete ByeCommandTest","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":25,"deletions":7},"test-code":{"insertions":0,"deletions":0}}},{"hash":"1b3cffa905b350db82491dfae33c8535d5e56530","isMergeCommit":true,"messageTitle":"Merge pull request #96 from woodenclock/master","messageBody":"Create ByeCommandTest.java","fileTypesAndContributionMap":{}},{"hash":"d8ab73416e2eead55c3bb2d0229df9bdd86d707f","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":2}}},{"hash":"b4eb9042ebebf577e7d91ae043a9e4515b90256e","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"9872e9287dfacb27feb7ff47d5102e5abb54873a","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"5549e41d14b7ed410337651d7180e6bb68156cea","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":41,"deletions":12}}},{"hash":"57f7664df8c710b8732bfd7bc8deb3b37a743631","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":3,"deletions":3}}},{"hash":"9af0aa0b63b439cd2d603ea8ff478881814a853d","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":19,"deletions":19}}},{"hash":"25889acdac7630a56075f0afe7249a8492279445","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":26,"deletions":3}}},{"hash":"384b78c6a79bcba376d376e84b096cca7d540806","isMergeCommit":false,"messageTitle":"Update UserGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":0}}},{"hash":"19ae2556bccf3f607148d54a17387e6a2b72a3fa","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":1,"deletions":1}}},{"hash":"a8bbfe87e249d519ddb832ca7f5619a1ebc9ffe7","isMergeCommit":false,"messageTitle":"Update DeveloperGuide.md","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":2}}}]}],"tangzhenen":[{"date":"2023-10-13","commitResults":[{"hash":"533b7989a5a1ab5bb5320352563ef8ec26703a36","isMergeCommit":false,"messageTitle":"Add delete command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":19,"deletions":4}}},{"hash":"5a8687f571cd1e27f76be6509dbe561301672ebf","isMergeCommit":false,"messageTitle":"Update entry list","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":0}}},{"hash":"972d977c09e7acc98f20d0f7126538392192348f","isMergeCommit":false,"messageTitle":"Update Ui","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":1}}},{"hash":"3d2b111b51993622d4ee5a3533f64719aa479814","isMergeCommit":false,"messageTitle":"Bug fixes","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":9,"deletions":2}}},{"hash":"3294660fadf18a4228e61b926bdb7d1374e63746","isMergeCommit":false,"messageTitle":"Bug fix","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1}}}]},{"date":"2023-10-29","commitResults":[{"hash":"9e176d18484505711f4040c5ed8c19799c56ef32","isMergeCommit":false,"messageTitle":"update aboutUs","messageBody":"","fileTypesAndContributionMap":{"docs":{"insertions":5,"deletions":5}}},{"hash":"a4b0f1a8ed42cdc2230395cdad3661cdef7bc58e","isMergeCommit":false,"messageTitle":"Delete command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":10,"deletions":3},"test-code":{"insertions":39,"deletions":0}}},{"hash":"65c3f395560267925a4062ef616a8f407780d2d7","isMergeCommit":false,"messageTitle":"Add list command test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":62,"deletions":0}}},{"hash":"458f95225ed5fb0c085a998a5adb432be8b44179","isMergeCommit":false,"messageTitle":"Add help command test","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":76,"deletions":0}}},{"hash":"82a3b7fa9bd659457daad31eeb4b376f1d0c7182","isMergeCommit":false,"messageTitle":"Add user confirmation when deleting entry","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":26,"deletions":4}}},{"hash":"e4790ccd72b01c5b9bdc81cc5fd387ccd5e6aff2","isMergeCommit":false,"messageTitle":"update delete command testing","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":57,"deletions":12}}},{"hash":"374462d22c6457e37185fcf96f1c36e2ffae575c","isMergeCommit":false,"messageTitle":"update delete command test","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":1,"deletions":1},"test-code":{"insertions":6,"deletions":2}}},{"hash":"b599f17afa22d30fe0febf5b8fc691a410d52090","isMergeCommit":false,"messageTitle":"bug fixes","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":3,"deletions":2}}},{"hash":"e428fd3e5b4c0f5cbd78b932042185ce11b4738a","isMergeCommit":false,"messageTitle":"bug fix","messageBody":"","fileTypesAndContributionMap":{"test-code":{"insertions":2,"deletions":2}}},{"hash":"3844616655c954f11c64374fa2e382e065580c39","isMergeCommit":true,"messageTitle":"Merge pull request #97 from tangzhenen/master","messageBody":"Add testing for list, delete, help and extend delete command","fileTypesAndContributionMap":{}}]}],"lctxct":[{"date":"2023-10-16","commitResults":[{"hash":"c0a6facf1ef9e936416052a7d76eaf23255016fd","isMergeCommit":false,"messageTitle":"Add add command","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":48,"deletions":5}}},{"hash":"632e790bd87588b55a753b76eaaf7d4dccb54216","isMergeCommit":false,"messageTitle":"Fix checkstyle violations","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":2}}},{"hash":"4b26b50b548553c814feb4174ddda85dc03134fb","isMergeCommit":false,"messageTitle":"Fix thrown exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}},{"hash":"b61c4261525cf634b900f427e7ef9b882f00385a","isMergeCommit":false,"messageTitle":"Fix cause of date exception","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":3,"deletions":3}}},{"hash":"bc517ce6a252ddf3a72742a4fb8ed074cc1edbfa","isMergeCommit":true,"messageTitle":"Merge branch \u0027master\u0027 of github.com:lctxct/tp","messageBody":"","fileTypesAndContributionMap":{}}]},{"date":"2023-10-23","commitResults":[{"hash":"865340925053b521b9d91c616f26fbc04a762ba5","isMergeCommit":false,"messageTitle":"Decouple filehandler functions","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":40,"deletions":17}}},{"hash":"11d6042e07a6939cee64533690875a2366deb6c3","isMergeCommit":false,"messageTitle":"Move EntryHandler to main","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":2,"deletions":1}}}]},{"date":"2023-10-28","commitResults":[{"hash":"4394a0a78505bbb5df96ce7ff8c65e79b82cdcbc","isMergeCommit":false,"messageTitle":"Add input prompt","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":0}}},{"hash":"9a546b130db55a07862cad1fe776d47c1896a346","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":5,"deletions":3}}},{"hash":"71f0a2f9adea67936991bdb756b5b4812194ec27","isMergeCommit":true,"messageTitle":"Merge pull request #84 from lctxct/add-input-prompt","messageBody":"Add input prompt","fileTypesAndContributionMap":{}}]},{"date":"2023-10-29","commitResults":[{"hash":"7566680d6432f1327c9d79e97e0fce1256f94c50","isMergeCommit":false,"messageTitle":"Modify save file formatting","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":22,"deletions":13}}},{"hash":"59f0c98600743012db13cf717d528911d49e6c87","isMergeCommit":true,"messageTitle":"Merge pull request #85 from lctxct/modify-entry-loading","messageBody":"Modify save file formatting","fileTypesAndContributionMap":{}},{"hash":"7de3fcd9415ac19f9d1ca2b45d46eebdd6e02412","isMergeCommit":false,"messageTitle":"Update to use COMMAND_WORDs","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":47,"deletions":20}}},{"hash":"8331f9b1703d24dba16d1b68cc2d6ac016086694","isMergeCommit":false,"messageTitle":"Fix checkstyle","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":4,"deletions":2}}},{"hash":"580d519c695345b4e2e4dd3bd07726093db4e73e","isMergeCommit":true,"messageTitle":"Merge pull request #86 from lctxct/add-commandwords","messageBody":"Update to use COMMAND_WORDs","fileTypesAndContributionMap":{}},{"hash":"f90e278dc3d2f920b189e66bf9b80d86cf2c0479","isMergeCommit":false,"messageTitle":"Add execute()s to commands","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":49,"deletions":25}}},{"hash":"fa1e3af7807c5828627b64414f4234ab6df87908","isMergeCommit":true,"messageTitle":"Merge pull request #87 from lctxct/add-command-execute","messageBody":"Add execute()s to commands","fileTypesAndContributionMap":{}},{"hash":"314155a753a8959dc53f40c2b0301b55f4849166","isMergeCommit":false,"messageTitle":"Move routing functionality to EntryHandler","messageBody":"","fileTypesAndContributionMap":{"functional-code":{"insertions":41,"deletions":24}}},{"hash":"04b5df6d75fb2be3b92ae02d90f8395b6667ae16","isMergeCommit":true,"messageTitle":"Merge pull request #88 from lctxct/improve-command-routing","messageBody":"Move routing functionality to EntryHandler","fileTypesAndContributionMap":{}}]}]},"authorFileTypeContributionMap":{"imaginarys96":{"docs":61,"functional-code":204,"test-code":0},"woodenclock":{"docs":254,"functional-code":780,"test-code":22,"other":6},"tangzhenen":{"docs":2,"functional-code":44,"test-code":227},"lctxct":{"docs":0,"functional-code":226,"test-code":0}},"authorContributionVariance":{"imaginarys96":2105.1414,"woodenclock":41935.105,"tangzhenen":2623.1946,"lctxct":1725.1807},"authorDisplayNameMap":{"imaginarys96":"CS2113T-W11-2 YANG..REMY","woodenclock":"CS2113T-W11-2 LEE ..GMIN","tangzhenen":"CS2113T-W11-2 TANG..N EN","lctxct":"CS2113T-W11-2 LIEN..TING"}} diff --git a/archive.zip b/archive.zip index 7cd74f4..5d0a1e7 100644 Binary files a/archive.zip and b/archive.zip differ diff --git a/reposense-logs/reposense.log.0 b/reposense-logs/reposense.log.0 index c99ef81..7524992 100644 --- a/reposense-logs/reposense.log.0 +++ b/reposense-logs/reposense.log.0 @@ -1,24 +1,24 @@ -Oct 29, 2023 3:54:56 AM reposense.system.LogsManager addFileHandler +Oct 29, 2023 1:01:46 PM reposense.system.LogsManager addFileHandler INFO: Log temp folder has been successfully created -Oct 29, 2023 3:54:56 AM reposense.parser.CsvParser validateHeader +Oct 29, 2023 1:01:46 PM reposense.parser.CsvParser validateHeader INFO: Parsed header of CSV file, repo-config.csv, and recognized columns: Ignore Standalone Config, Repository's Location, Branch, Shallow Cloning, File formats, Ignore Glob List, Ignore Authors List, Find Previous Authors, Ignore Commits List -Oct 29, 2023 3:54:56 AM reposense.parser.CsvParser validateHeader +Oct 29, 2023 1:01:46 PM reposense.parser.CsvParser validateHeader INFO: Parsed header of CSV file, author-config.csv, and recognized columns: Author's Emails, Repository's Location, Author's GitHub ID, Branch, Author's Display Name, Ignore Glob List, Author's Git Author Name -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias choonsiang found. The alias will belong to the last author - ChoonSiang -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias barbaracwx found. The alias will belong to the last author - Barbaracwx -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias oppa1 found. The alias will belong to the last author - MrOPPA1 -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias choonsiang found. The alias will belong to the last author - ChoonSiang -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias barbaracwx found. The alias will belong to the last author - Barbaracwx -Oct 29, 2023 3:54:56 AM reposense.model.AuthorConfiguration checkDuplicateAliases +Oct 29, 2023 1:01:47 PM reposense.model.AuthorConfiguration checkDuplicateAliases WARNING: Duplicate alias oppa1 found. The alias will belong to the last author - MrOPPA1 -Oct 29, 2023 3:54:56 AM reposense.parser.CsvParser validateHeader +Oct 29, 2023 1:01:47 PM reposense.parser.CsvParser validateHeader INFO: Parsed header of CSV file, group-config.csv, and recognized columns: Globs, Repository's Location, Group Name -Oct 29, 2023 3:54:56 AM reposense.git.GitConfig getGlobalGitLfsConfig +Oct 29, 2023 1:01:47 PM reposense.git.GitConfig getGlobalGitLfsConfig WARNING: Could not get global git lfs config java.lang.RuntimeException: reposense.system.CommandRunnerProcessException: Error returned from command git config --global --list on path . : fatal: unable to read config file '/home/runner/.gitconfig': No such file or directory @@ -34,313 +34,313 @@ fatal: unable to read config file '/home/runner/.gitconfig': No such file or dir at reposense.system.CommandRunner.runCommand(CommandRunner.java:21) ... 3 more -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner spawnCloneProcess -INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-2/tp.git... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T17-3/tp.git... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner spawnCloneProcess -INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-4/tp.git... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner spawnCloneProcess +INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-2/tp.git... +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T17-4/tp.git... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner spawnCloneProcess +INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-4/tp.git... +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-W12-4/tp.git to complete... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T17-4/tp.git to complete... +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-W12-2/tp.git to complete... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:47 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T17-3/tp.git to complete... -Oct 29, 2023 3:54:56 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T17-4/tp.git to complete... -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner waitForCloneProcess INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-2/tp.git completed! -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T18-1/tp.git... -Oct 29, 2023 3:54:57 AM reposense.report.ReportGenerator analyzeRepos +Oct 29, 2023 1:01:48 PM reposense.report.ReportGenerator analyzeRepos INFO: [1/17] Analyzing https://github.com/AY2324S1-CS2113-W12-2/tp.git (master)... -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T18-1/tp.git to complete... -Oct 29, 2023 3:54:57 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-W12-2/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:54:57 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-2/tp.git (master)... -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner waitForCloneProcess INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-4/tp.git completed! -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-F11-3/tp.git... -Oct 29, 2023 3:54:57 AM reposense.report.ReportGenerator analyzeRepos +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T18-1/tp.git to complete... +Oct 29, 2023 1:01:48 PM reposense.report.ReportGenerator analyzeRepos INFO: [2/17] Analyzing https://github.com/AY2324S1-CS2113-W12-4/tp.git (master)... -Oct 29, 2023 3:54:57 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:48 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-F11-3/tp.git to complete... -Oct 29, 2023 3:54:57 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:48 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-W12-2/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:48 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-2/tp.git (master)... +Oct 29, 2023 1:01:48 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-W12-4/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:54:57 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:48 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-4/tp.git (master)... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-3/tp.git completed! -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-1/tp.git... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-W12-1/tp.git to complete... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-4/tp.git completed! -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner spawnCloneProcess -INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-3/tp.git... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-1/tp.git completed! -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner spawnCloneProcess +INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-W12-3/tp.git... +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-W12-3/tp.git to complete... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-3/tp.git completed! +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T18-2/tp.git... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:49 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T18-2/tp.git to complete... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-3/tp.git completed! -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-4/tp.git completed! +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T18-3/tp.git... -Oct 29, 2023 3:54:58 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T18-3/tp.git to complete... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-1/tp.git completed! -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-3/tp.git completed! +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113T-W11-1/tp.git... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-1/tp.git completed! +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113T-W11-1/tp.git to complete... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-W12-3/tp.git completed! -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T18-4/tp.git... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T18-4/tp.git to complete... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-3/tp.git completed! -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-2/tp.git completed! -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-F11-1/tp.git... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:50 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-F11-1/tp.git to complete... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-3/tp.git completed! +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-F11-2/tp.git... -Oct 29, 2023 3:54:59 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-F11-2/tp.git to complete... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113T-W11-1/tp.git completed! -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-4/tp.git completed! +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T17-2/tp.git... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T17-2/tp.git to complete... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-1/tp.git completed! -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-T18-4/tp.git completed! -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner spawnCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113T-W11-1/tp.git completed! +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner spawnCloneProcess INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113T-W11-2/tp.git... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner spawnCloneProcess -INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T17-1/tp.git... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113T-W11-2/tp.git to complete... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-2/tp.git completed! -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-1/tp.git completed! +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner spawnCloneProcess +INFO: Cloning in parallel from https://github.com/AY2324S1-CS2113-T17-1/tp.git... +Oct 29, 2023 1:01:51 PM reposense.report.RepoCloner waitForCloneProcess INFO: Waiting for cloning of https://github.com/AY2324S1-CS2113-T17-1/tp.git to complete... -Oct 29, 2023 3:55:00 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:51 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-W12-2/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:51 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-W12-4/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:52 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-F11-2/tp.git completed! +Oct 29, 2023 1:01:52 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-W12-2/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:52 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113T-W11-2/tp.git completed! +Oct 29, 2023 1:01:52 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-2/tp.git completed! +Oct 29, 2023 1:01:52 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-W12-4/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:52 PM reposense.report.RepoCloner waitForCloneProcess +INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-1/tp.git completed! +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-W12-2/tp.git (master) completed! -Oct 29, 2023 3:55:00 AM reposense.report.ReportGenerator analyzeRepos -INFO: [3/17] Analyzing https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-W12-4/tp.git (master) completed! -Oct 29, 2023 3:55:00 AM reposense.report.ReportGenerator analyzeRepos -INFO: [4/17] Analyzing https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-2/tp.git completed! -Oct 29, 2023 3:55:00 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113T-W11-2/tp.git completed! -Oct 29, 2023 3:55:01 AM reposense.report.RepoCloner waitForCloneProcess -INFO: Cloning of https://github.com/AY2324S1-CS2113-T17-1/tp.git completed! -Oct 29, 2023 3:55:01 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-T17-4/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:01 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... -Oct 29, 2023 3:55:01 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-T17-3/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:01 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... -Oct 29, 2023 3:55:01 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... -Oct 29, 2023 3:55:01 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... -Oct 29, 2023 3:55:01 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-4/tp.git (master) completed! -Oct 29, 2023 3:55:01 AM reposense.report.ReportGenerator analyzeRepos -INFO: [5/17] Analyzing https://github.com/AY2324S1-CS2113-T18-1/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator analyzeRepos +INFO: [3/17] Analyzing https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator analyzeRepos +INFO: [4/17] Analyzing https://github.com/AY2324S1-CS2113-T18-1/tp.git (master)... +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-T18-1/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:02 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:52 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T18-1/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-3/tp.git (master) completed! -Oct 29, 2023 3:55:02 AM reposense.report.ReportGenerator analyzeRepos -INFO: [6/17] Analyzing https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-F11-3/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:02 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... -Oct 29, 2023 3:55:02 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:52 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-T17-3/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:52 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... +Oct 29, 2023 1:01:54 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T18-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:54 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T18-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:54 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-T18-1/tp.git (master) completed! -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepos -INFO: [7/17] Analyzing https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-W12-1/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:03 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:54 PM reposense.report.ReportGenerator analyzeRepos +INFO: [5/17] Analyzing https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... +Oct 29, 2023 1:01:54 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-F11-3/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:54 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... +Oct 29, 2023 1:01:54 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... +Oct 29, 2023 1:01:54 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-3/tp.git (master)... +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-3/tp.git (master) completed! +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator analyzeRepos +INFO: [6/17] Analyzing https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-T17-4/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:55 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... +Oct 29, 2023 1:01:55 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:55 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-F11-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-F11-3/tp.git (master) completed! -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepos -INFO: [8/17] Analyzing https://github.com/AY2324S1-CS2113-W12-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator analyzeRepos +INFO: [7/17] Analyzing https://github.com/AY2324S1-CS2113-W12-3/tp.git (master)... +Oct 29, 2023 1:01:55 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-W12-3/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:03 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:55 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113-W12-1/tp.git (master) completed! -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator analyzeRepos -INFO: [9/17] Analyzing https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:56 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... +Oct 29, 2023 1:01:56 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-4/tp.git (master)... +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-4/tp.git (master) completed! +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator analyzeRepos +INFO: [8/17] Analyzing https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-W12-1/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:56 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... +Oct 29, 2023 1:01:56 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-W12-3/tp.git (master)... -Oct 29, 2023 3:55:03 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-T18-3/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:03 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:56 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-W12-3/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-W12-3/tp.git (master) completed! -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator analyzeRepos -INFO: [10/17] Analyzing https://github.com/AY2324S1-CS2113-T18-2/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator analyzeRepos +INFO: [9/17] Analyzing https://github.com/AY2324S1-CS2113-T18-2/tp.git (master)... +Oct 29, 2023 1:01:56 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-T18-2/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:04 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:56 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T18-2/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113-T18-3/tp.git (master) completed! -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator analyzeRepos -INFO: [11/17] Analyzing https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:04 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:57 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... +Oct 29, 2023 1:01:57 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-W12-1/tp.git (master)... +Oct 29, 2023 1:01:57 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113-W12-1/tp.git (master) completed! +Oct 29, 2023 1:01:57 PM reposense.report.ReportGenerator analyzeRepos +INFO: [10/17] Analyzing https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... +Oct 29, 2023 1:01:57 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-T18-3/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:57 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... +Oct 29, 2023 1:01:57 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T18-2/tp.git (master)... -Oct 29, 2023 3:55:04 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:58 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T18-2/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-T18-2/tp.git (master) completed! -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepos -INFO: [12/17] Analyzing https://github.com/AY2324S1-CS2113-T18-4/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepos +INFO: [11/17] Analyzing https://github.com/AY2324S1-CS2113-T18-4/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-T18-4/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:05 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:58 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T18-4/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master) completed! -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepos -INFO: [13/17] Analyzing https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-F11-1/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:05 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:58 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T18-3/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113-T18-3/tp.git (master) completed! +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepos +INFO: [12/17] Analyzing https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:58 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T18-4/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:58 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T18-4/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-T18-4/tp.git (master) completed! -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepos +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator analyzeRepos +INFO: [13/17] Analyzing https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... +Oct 29, 2023 1:01:58 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-F11-1/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:58 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... +Oct 29, 2023 1:01:59 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... +Oct 29, 2023 1:01:59 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master)... +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113T-W11-1/tp.git (master) completed! +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator analyzeRepos INFO: [14/17] Analyzing https://github.com/AY2324S1-CS2113-F11-2/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-F11-2/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:05 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:01:59 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-F11-2/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:59 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:01:59 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-F11-1/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-F11-1/tp.git (master) completed! -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator analyzeRepos -INFO: [15/17] Analyzing https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113-T17-2/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:05 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... -Oct 29, 2023 3:55:05 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator analyzeRepos +INFO: [15/17] Analyzing https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... +Oct 29, 2023 1:01:59 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:01:59 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... +Oct 29, 2023 1:01:59 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-F11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:02:00 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-F11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-F11-2/tp.git (master) completed! -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator analyzeRepos -INFO: [16/17] Analyzing https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator updateRepoConfig -INFO: https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:06 AM reposense.authorship.FileInfoExtractor extractTextFileInfos -INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.commits.CommitInfoExtractor extractCommitInfos -INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator analyzeRepos +INFO: [16/17] Analyzing https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator updateRepoConfig +INFO: https://github.com/AY2324S1-CS2113-T17-2/tp.git (master) does not contain a standalone config file. +Oct 29, 2023 1:02:00 PM reposense.authorship.FileInfoExtractor extractTextFileInfos +INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... +Oct 29, 2023 1:02:00 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:02:00 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.commits.CommitInfoAnalyzer analyzeCommits -INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113T-W11-2/tp.git (master) completed! -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator analyzeRepos +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator analyzeRepos INFO: [17/17] Analyzing https://github.com/AY2324S1-CS2113-T17-1/tp.git (master)... -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator analyzeRepo -INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-2/tp.git (master) completed! -Oct 29, 2023 3:55:06 AM reposense.report.ReportGenerator updateRepoConfig +Oct 29, 2023 1:02:00 PM reposense.report.ReportGenerator updateRepoConfig INFO: https://github.com/AY2324S1-CS2113-T17-1/tp.git (master) does not contain a standalone config file. -Oct 29, 2023 3:55:06 AM reposense.authorship.FileInfoExtractor extractTextFileInfos +Oct 29, 2023 1:02:00 PM reposense.authorship.FileInfoExtractor extractTextFileInfos INFO: Extracting relevant file info from https://github.com/AY2324S1-CS2113-T17-1/tp.git (master)... -Oct 29, 2023 3:55:07 AM reposense.commits.CommitInfoExtractor extractCommitInfos +Oct 29, 2023 1:02:01 PM reposense.commits.CommitInfoExtractor extractCommitInfos +INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... +Oct 29, 2023 1:02:01 PM reposense.commits.CommitInfoAnalyzer analyzeCommits +INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-2/tp.git (master)... +Oct 29, 2023 1:02:01 PM reposense.report.ReportGenerator analyzeRepo +INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-2/tp.git (master) completed! +Oct 29, 2023 1:02:02 PM reposense.commits.CommitInfoExtractor extractCommitInfos INFO: Extracting commits info for https://github.com/AY2324S1-CS2113-T17-1/tp.git (master)... -Oct 29, 2023 3:55:07 AM reposense.commits.CommitInfoAnalyzer analyzeCommits +Oct 29, 2023 1:02:02 PM reposense.commits.CommitInfoAnalyzer analyzeCommits INFO: Analyzing commits info for https://github.com/AY2324S1-CS2113-T17-1/tp.git (master)... -Oct 29, 2023 3:55:07 AM reposense.report.ReportGenerator analyzeRepo +Oct 29, 2023 1:02:02 PM reposense.report.ReportGenerator analyzeRepo INFO: Analysis of https://github.com/AY2324S1-CS2113-T17-1/tp.git (master) completed! -Oct 29, 2023 3:55:07 AM reposense.report.ReportGenerator generateReposReport +Oct 29, 2023 1:02:02 PM reposense.report.ReportGenerator generateReposReport INFO: The report is generated at /home/runner/work/tp-dashboard/tp-dashboard/reposense-report -Oct 29, 2023 3:55:07 AM reposense.RepoSense main -INFO: Elapsed processing time: 11.40 second(s) +Oct 29, 2023 1:02:02 PM reposense.RepoSense main +INFO: Elapsed processing time: 16.02 second(s) diff --git a/summary.json b/summary.json index ec7ac3b..621d899 100644 --- a/summary.json +++ b/summary.json @@ -1 +1 @@ -{"repoSenseVersion":"056fa5fcd2","reportGeneratedTime":"Sun Oct 29 11:54:56 2023 UTC+08:00","reportGenerationTime":" 11.25 second(s)","zoneId":"UTC+08:00","reportTitle":"CS2113 tP Code Dashboard","repos":[{"location":{"location":"https://github.com/AY2324S1-CS2113T-W11-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113T-W11-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113T-W11-1/tp[master]","outputFolderName":"AY2324S1-CS2113T-W11-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113T-W11-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113T-W11-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113T-W11-2/tp[master]","outputFolderName":"AY2324S1-CS2113T-W11-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-1/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-2/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-3/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-4/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-1/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-2/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-3/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-4/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-1/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-2/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-3/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-4/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-1/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-2/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-3/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-3_tp_master"}],"errorSet":[],"sinceDate":"2023-09-22","untilDate":"2023-10-29","isSinceDateProvided":true,"isUntilDateProvided":false,"supportedDomainUrlMap":{"NOT_RECOGNIZED":{"BRANCH":"","REPO_URL":"UNSUPPORTED","BASE_URL":"UNSUPPORTED","HISTORY_PATH":"","COMMIT_PATH":"","BLAME_PATH":""},"github":{"BRANCH":"tree/$BRANCH","REPO_URL":"https://github.com/$ORGANIZATION/$REPO_NAME/","BASE_URL":"https://github.com/","HISTORY_PATH":"commits/$BRANCH/$FILE_PATH","COMMIT_PATH":"commit/$COMMIT_HASH","BLAME_PATH":"blame/$BRANCH/$FILE_PATH"}}} +{"repoSenseVersion":"056fa5fcd2","reportGeneratedTime":"Sun Oct 29 21:01:47 2023 UTC+08:00","reportGenerationTime":" 15.81 second(s)","zoneId":"UTC+08:00","reportTitle":"CS2113 tP Code Dashboard","repos":[{"location":{"location":"https://github.com/AY2324S1-CS2113T-W11-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113T-W11-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113T-W11-1/tp[master]","outputFolderName":"AY2324S1-CS2113T-W11-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113T-W11-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113T-W11-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113T-W11-2/tp[master]","outputFolderName":"AY2324S1-CS2113T-W11-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-1/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-2/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-3/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-W12-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-W12-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-W12-4/tp[master]","outputFolderName":"AY2324S1-CS2113-W12-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-1/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-2/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-3/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T17-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T17-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T17-4/tp[master]","outputFolderName":"AY2324S1-CS2113-T17-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-1/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-2/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-3/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-3_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-T18-4/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-T18-4","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-T18-4/tp[master]","outputFolderName":"AY2324S1-CS2113-T18-4_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-1/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-1","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-1/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-1_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-2/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-2","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-2/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-2_tp_master"},{"location":{"location":"https://github.com/AY2324S1-CS2113-F11-3/tp.git","repoName":"tp","organization":"AY2324S1-CS2113-F11-3","domainName":"github"},"branch":"master","displayName":"AY2324S1-CS2113-F11-3/tp[master]","outputFolderName":"AY2324S1-CS2113-F11-3_tp_master"}],"errorSet":[],"sinceDate":"2023-09-22","untilDate":"2023-10-29","isSinceDateProvided":true,"isUntilDateProvided":false,"supportedDomainUrlMap":{"NOT_RECOGNIZED":{"BRANCH":"","REPO_URL":"UNSUPPORTED","BASE_URL":"UNSUPPORTED","HISTORY_PATH":"","COMMIT_PATH":"","BLAME_PATH":""},"github":{"BRANCH":"tree/$BRANCH","REPO_URL":"https://github.com/$ORGANIZATION/$REPO_NAME/","BASE_URL":"https://github.com/","HISTORY_PATH":"commits/$BRANCH/$FILE_PATH","COMMIT_PATH":"commit/$COMMIT_HASH","BLAME_PATH":"blame/$BRANCH/$FILE_PATH"}}}