CoinTest - System.out.println("Coin one is...

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

View Full Document Right Arrow Icon
public class CoinTest{ public static void main(String[] args){ Coin coin1, coin2, coin3, coin4; coin1 = new Coin(); coin2 = new Coin(); coin3 = new Coin(); coin4 = new Coin(); coin1.Toss(); coin2.Toss(); coin3.Toss(); coin4.Toss(); System.out.println(" Zero is equal to tails and One is equal to heads" );
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("Coin one is " + coin1.getNumber()); System.out.println("Coin two is " + coin2.getNumber()); System.out.println("Coin three is " + coin3.getNumber()); System.out.println("Coin four is " + coin4.getNumber()); } }...
View Full Document

Ask a homework question - tutors are online