Roy from Orientalent. - #95
Open
royqiu2022 wants to merge 5 commits into
Open
Conversation
1. Refactor multiple if statements for enum judgment. 2. Refactor hard code for car type. 3. Refactor multiple if statements for fee judgment, add a map to store the date range and corresponding fee,if the date passed in is under a date range, then give back the related fee. 4. Refactor the holiday logic, remove multiple if statement, put all of holidays to a List, if the date passed in is one of date in this List, means it is a holiday. 5. Simply the logic to count the fee for one hour period. 6. Add factory to generate the free toll fee cars instance by enum TollFreeVehicles. 7. Add all of test cases. 8. Add log. 9. the applications should not be only handle date for 2013, if the year changed, just update the holiday List. 10. Next step, can update holiday List and fee setting to config file. if any requirement changed or year changed,we just need to update the confige file.
2. update time and fee mapping to config file. 3. Add a class to handle date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://date.nager.at/PublicHoliday/Country/SE/2020