Im in an intro to java programming course and we're doing a project in Bluej where we need to use automated testing to run our code. The test code is given and cannot be changed, and we have to write code and run the tests successfully. Mine is all running smoothly except for this last part. Here is a snippet from the test code:
And here is the method I wrote for it. It compiles but when I run it through the test I get a failed error that says "expected:<160> but was:<180>" I thought I had the formula correct but I guess not.
I'm not sure what I'm doing wrong here. Any insight would be awesome. Thanks in advance!
It's only fair to note, however, that it's very easy to confuse percentage (often an integer from 0-100, inclusive wiith a percentage value (same thing, but divided by 100). So one has to keep that in mind when designing the application code. And the tests, of course!
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.