Dec-21-2020, 11:04 PM
(This post was last modified: Dec-21-2020, 11:04 PM by deanhystad.)
(Dec-21-2020, 09:15 PM)benante3 Wrote: Hey man,trust me, your judgmental post doesn't really help.I did bothered to test the program more than once,I couldn't figure out what the problem was,that's why I asked.If you have some issues with yourself just don't answer at allYou were under the impression that your program worked, and couldn't understand why it didn't pass. A test with overtime and a different rate would show that your program was not computing the correct value. Once you knew that I'm sure you would quickly zero in on the problem. I am not being judgmental, just saying that proper testing is how you find problems. You obviously did not test the code very well or you would have found the problem yourself. Make more test cases to exercise all the code. This code requires a minimum of 6 tests. Time = 40 hours, time < 40 hours, time > 40 hours. Each time computed with two different rates. I would also test with time = 0 and rate = 0. If this was real code you would also test for negative cases and you would test the input.