// Arup Guha
// Code Framework to fill out to test 2010 AP CS FR Problem 3
// 4/1/2016

public class Trail {
	
	private int[] markers;
	
	public Trail(int[] elevation) {
		markers = elevation;
	}
	
	// Fill this in for part A - returns true iff this trial
	// from location start to location end is level, meaning
	// that the difference between the lowest and highest
	// points on trail[start..end] is 10 or fewer meters.
	public boolean isLevelTrailSegment(int start, int end) {
		
	}
	
	// Fill this in for part B - returns true iff this trail
	// is difficult, meaning that is has 3 sets of consecutive
	// markers that differ by 30 or more meters.
	public boolean isDifficult() {
		
	}
	
	public static void main(String[] args) {
		
		int[] elevation = {100, 150, 105, 120, 90, 80, 50, 75, 75, 70, 80, 90, 100};
		
		Trail thisTrail = new Trail(elevation);
		
		// This is their test.
		if (thisTrail.isLevelTrailSegment(7,10))
			System.out.println("This part of the trail is level.");
		
		// I added this so we could see something that isn't level.
		if (!thisTrail.isLevelTrailSegment(7,11))
			System.out.println("But adding segment 11 makes it not level.");
			
		// This is their test again.
		if (thisTrail.isDifficult())
			System.out.println("This trail is difficult.");
			
		// I added this one so we have one easy trail to test.
		int[] easyTrail = {90, 110, 81, 51, 80, 110, 139, 120, 100};
		Trail easy = new Trail(easyTrail);
		
		if (!easy.isDifficult())
			System.out.println("And this trail is easy!");
	}
}