Summary
The first topic we covered in this chapter was the BigDecimal
class. Floating point values as processed by modern FPUs have issues when moving from decimal to binary and back again. This can be critical in the field of accounting where every penny must balance. As a class, BigDecimal
objects are not as easy to use as primitives, but it is the need for absolute accuracy that mandates their use.
As I stated at the start of this chapter, testing is a critical task that every programmer should be doing. You should be delivering code that works as expected in almost every situation it is used for. Unit tests do not prove that the program’s logic is necessarily correct. This is usually tested by the QA team who are testing the execution of the program.
While writing this book, I came across a research paper that looked at unit testing. You can find the link in the Further reading section. It focused on Java and C# developers who used integrated development environments...