From the course: Practical Test-Driven Development for Java Programmers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Understanding the business logic

Understanding the business logic

- So let's have a look what this business logic is trying to do then. The key thing it's trying to do is calculate the amount the customer needs to repay. Now, I pointed out in the starting work space there was a pdf file, which actually gives a work example of what the business logic is trying to do. So, I'm going to just talk through that now, although you might want to refer to the pdf file at the end of this chapter, when I give you a few tasks to try for yourself. So here's the worked example. The customer wants to borrow a 1,000 dollars, or pounds, or euros, whatever currency it is, and they want to pay it back over 24 months. And their going to be charged a rate of interest, in this instance, it's 7%. But first what needs to happen, is we have to calculate something called the applicable rate. And before we look for how that here, I'll leave you to read through it. Once we have the applicable rate, we calculate the total that's repayable by multiplying the amount that's…

Contents