Write code that accomplishes the following tasks: Consider two array lists that can hold objects of the class Coin, which appears. One list is named myList and contains several of these objects, while the other list is empty and is named yourList. One at a time, remove a coin from myList and toss it. If the result of the toss is heads, the coin is yours to keep: Place it into yourList. If the coin toss is tails, you must return the coin to myList in the same position from which you removed it. After all coins have been tossed once, compute the total value of the coins in each list.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here