import javax.swing.*;
import java.util.Random;
import java.text.DecimalFormat;

public class SangiorgioP3 
{
    
    public static void main(String[] args) 
    { Resident r1 = new Resident();
      Resident r2 = new Resident();
      Resident r3 = new Resident("Joe Jones", "1 Second Avenue", "345-3232", 500.9);
      Random rn = new Random();
 //     DecimalFormat dFormat = new DecimalFormat("#0.00"); // two digits to right of the decimal pt, rounded up
                                                          // the # means no leading zeros added
  //    DecimalFormat dFormatCommas = new DecimalFormat("#,##0.00"); // two digits to right of the decimal pt, rounded up
                                                          // with commas every three digits
   //   DecimalFormat dPercent = new DecimalFormat("#,##0.00%"); // two digits to right of the decimal pt, rounded up
      
      r2.show();
      r3.show();
	  r1.input();
	  r1.show();
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  
    
    // formatting numeric outoput
//      System.out.println("d1 = " + dFormat.format(d1));  // uses the dFormat object
//      System.out.println("d1 = $" + dFormatCommas.format(d1));  // commas included
//      System.out.println("d2 = $" + dFormatCommas.format(d2));  // adds trailing zero
//      System.out.println("d3 = $" + dFormatCommas.format(d3));  // adds trailing zero
//      System.out.println("d4 = " + dPercent.format(d4));  // shifts number left 2 places adds % sign
    
        
      int n = rn.nextInt(3);
    // the switch statement for decisions on ordinal values (int or characters, char)
    switch(n)  // selection determines the "position" of the switch
    {  case '1':
    	  System.out.println("The Winner of the Tax Lottery is: \nTom of 1 Smith Street");
    	  break;  // break out of the switch statement (don't do the next case)	
       case '2':
    	  System.out.println("The Winner of the Tax Lottery is: \nMs. Smith of 1 First Street");
    	  break;
       case '3':
    	  System.out.println("The Winner of the Tax Lottery is: \nMr. Jones of 1 Second Avenue");
    	  break;
       default:  // not a t, b, or c choice	 		
    }// end of the switch statement	    
 
    
    
    // comparing non-string objects
//        if(b1.equals(b2))
//        	System.out.println("b1 is identical to b2");
//        else
//        	System.out.println("b1 and b2 are different");	
    
    
   
   
    }
    
   
}
