Hi, I'm having a little trouble with exercise 86. I could totally use some help. Anyone think I'm off to a good start? What do I need to accomplish? I think it has to do with rounding...
Here are the instructions:
Complete the following definitions for the overloaded one-argument static method money that returns a String representing its argument as an amount of money. For example, if the input is the double 2.5, then it returns the String "$2.50"; if the input is the int 6, then it returns the String "$6.00"; and if the input is the String "6.125" then it returns the String "$6.13". Hint: Define the money( double d ) version first. Then define the other versions by changing their argument into a double and returning the result of applying the double version to the transformed argument. Note: When the input is a String you may need to use Double.parseDouble.
Here is my code:
Thanks for the help! I really appreciate it!