Skip to content

abrahamTesfu/amortizations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java code re-factor exercise originalCode is AmortizationScheduleOld.java using OO best practice

Assumptions:

since we are dealing with financial data, we need to have a data-structure with better accuracy in calculation can have larger bit than the normal 64bit double.

  • use BigDecimal

    we need to be able to use/demo object oriented design - Object/classes: Loan,Money,Schedule,constants/Enums. - separation of concerns, avoid object creation detail either in the client/or test, use a factory which will deal with that detail - use utility class for validation, as they are not part of the bean. - have custom exception class, Instead of throwing direct java exceptions like IllegalArrgumentExcepion. - presentation is a separate concern of it's own, move it to a different class MyConsole. - Move the test client to AmortizationScheduleTest.java. - Make code readable and self documented.

Further Improvements

    - add Unit tests.
    - add UI using web or some other form.

=================================================================================

About

paypal high jump exercise

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages