/**
 * Demonstrates the role of brackets in "if" statements.
 * 
 * @author Terry Sergeant
 * @version In Class Demo
*/

import java.util.Scanner;

public class Brackets
{
	public static void main(String [] args)
	{
		Scanner cin= new Scanner(System.in);  // input from console
		double hours,pay;
	 
		System.out.print("How many hours worked: ");
		hours= cin.nextDouble();

		if (hours <= 40)
	   //System.out.println("You lazy person");  // SECOND: add this line ... what happens?
			pay= 0.0;
		else
	   //System.out.println("Great job");  // FIRST: add this line ... how does behavior change?
		pay= 1000.0;

		System.out.println("You have earned $"+pay);
	}
}

