/**
  class showing what a "Throw" looks like
   @author  Elizabeth Adams
	@version 1.0  - September 24, 2008
*/

public class Throw
{
      // class fields
	   private final int firstThrow;
		private final int secondThrow;		private final int point;
		
		/*  
		   explicit value constructor for Throw
			@param first is the first Die's roll
			@param second is the second Die's roll 
      */
		
		 Throw (int first, int second)
		 {
		   this.firstThrow = first;
			this.secondThrow = second;
			this.point = this.firstThrow + this.secondThrow;
		 } // end constructor

       /*
		   this method returns the first Throw of a Throw object
			@return integer value between 1 and 6
       */
       public int getFirstThrow()
		 {
		    return this.firstThrow;
		 } // end getFirstThrow

       /*
		   method returns the second Throw of a Throw object
			@return integer value between 1 and 6
       */
       public int getSecondThrow()
		 {
		    return this.secondThrow;
		 } // end getSecondThrow

       /*
		   method returns the point value a Throw object
			@return the sum of firstThrow and secondThrow
       */

       public int getPoint()
		 {
		    return this.point;
		 } // end getPoint
		 
       /* 
		   method returns the Values of the object
			@return the throws and the point
	    */
       public String toString()
		 {
		   String temp;
			temp = "Thows are  " + this.getFirstThrow() +
			       "and  " + this.getSecondThrow() +
					 " and points are " + this.getPoint();
			return temp;
		  } // end toString
         
		 /**
		    method determines if 2 throws are equal
			 @return boolean value
		 */
		 public boolean equals (Throw a)
		 {
		   boolean answer;
			answer = false;
		   if (this.getFirstThrow() == a.getFirstThrow() &&
			    this.getSecondThrow() == a.getSecondThrow() &&
				 this.getPoint() == a.getPoint()) 
       			answer  = true;
			return answer;
		}// end equals
   }// end class