/** 
 * Adds get minute and get hour functionality over the original stopwatch class and
 * changes the functionality such that calling start resets the start time
 *  
 * @author Dave 
 * @date January 18, 2010 
 */ 
public class ModifiedStopWatch extends StopWatch{ 
	
	public static void main(String[] args){
		StopWatch stopWatch = new StopWatch();
		ModifiedStopWatch modifiedSW = (ModifiedStopWatch)stopWatch;
	}
	
	/** 
	 * creates a functioning Stopwatch2
	 */ 
	public ModifiedStopWatch(){
		super();
	} 

	/**
	 * Modified start method that resets the start time when it is called even if the stopwatch
	 * is already running
	 */
	public void start(){
		System.out.println("here baby");
		running = true;
		startTime = System.nanoTime ();
	}
	
	/**
	 * @return returns the time elapsed on the stopwatch in seconds
	 */
	public int getSeconds(){
		//
		return (int)getTime()/1000000000;
	}
	
	/**
	 * @return returns the time elapsed on the stopwatch in minutes
	 */
	public int getMinutes(){
		return (int)getSeconds()/60;
	}
	
	/**
	 * @return returns the time elapsed on the stopwatch in hours
	 */
	public int getHours(){
		return getMinutes()/60;
	}
}