Correct way to use double type to represent money quantities
I was assigned a project where I had to create a class that received money quantities asdouble numbers and that implemented a method returning a quantity of money as double. I have to use this scheme as we have no seen other data types in class.
My question is, what can I do to make sure that the value I'm returning is adouble number that looks like money. For example, I don't want my method to return 10.78889332., I want it to return 10.79. How can I do that? Is there any intended method for that?
Can I let this issue like that and then take care of it in the test class by formating the output of the method when using it. I think this approach is not correct.
Thanks for your time.

