/*********************************************
 * The Road Less Travelled: an experiment
 * by Mark Rich
 * 2/25/2001
 * for CS302 as an illustration of if statements
 *********************************************/
class Road {

    // Our main method takes care of everything, 
    public static void main(String[] args) {

	// 80% of the time, when faced with these two roads
	// A and B, a person will go down Road B.  This makes
	// Road A the less travelled road.
	double chanceRoadB = 0.8;
	
	// This will loop 30 times through our program. 
	// We'll learn about these soon.
	for (int i = 0; i < 30; i++) {

	    // Each person gets a new random number and decides
	    // which way to go
	    double rand = Math.random();
	    
	    // Let the user know what iteration we're on
	    System.out.print("Person " + (i + 1) + " : ");

	    // rand is greater than 0.8 only 20% of the time
	    if (rand > chanceRoadB ) {
		System.out.print("Road A - ");
		System.out.println("You took the road less travelled!");
	    }

	    // otherwise, rand falls in the 80% range, and we
	    // travel down the well-trod road.
	    else {
		System.out.print("Road B - ");
		System.out.println("You are a vile conformist!");
	    }
	}
    }
}
