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
From the course: Practical Test-Driven Development for Java Programmers
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Loading up the final case study4m 32s
-
(Locked)
Understanding the project structure8m 18s
-
(Locked)
Understanding the business logic4m 13s
-
(Locked)
Adding Mockito3m 3s
-
(Locked)
Setting up the tests6m 25s
-
(Locked)
The need for spying7m 46s
-
(Locked)
Challenge 61m 15s
-
(Locked)
Walkthrough 6, part 14m 34s
-
(Locked)
Walkthrough 6, part 27m 43s
-
(Locked)