This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
So this project requires me to create a class that mimics flipping a coin. I am having some trouble with my methods. For example, when I try to run the Coin tester, I get errors on the coin1.getNumTails() and coin.1reset(); sections of the Coin Tester program. I'll attach my Coin class so you can tell me what I'm doing wrong.
Besides the fact that CoinTester cannot be compiled (as you posted it) the code should work without errors.
Though, that statement in the constructor of the Coin class is not really meaningful to me - you declared String variable local to the constructor and initialized it to empty string. Why would you do that, since you can't use it anywhere outside the constructor?
Edit: And why getNumHeads() and getNumTails() are declared to return String? Wouldn't be more appropriate to return integer?
The quieter you are, the more you are able to hear.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com