{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CoinSolution - one in the lab manual the if statement that...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution to Using the Coin Class Exercise The Coin class (with the isHeads method): Coin.java Completed Runs.java NOTE: The version of Coin.java in Listing 5.4 of Lewis and Loftus (and the version of Coin.java above) has a method isHeads() that returns true if the coin face is heads. Using that version of Coin.java (rather than the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: one in the lab manual) the if statement that updates the run length should start: if (myCoin.isHeads()) rather than if (myCoin.getFace() == myCoin.HEADS)...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online