highLow

Category: Programming
Author: Jessica Miller
Book Chapter: 5.2
Problem: highLow
Write a method highLow that takes a number, an integer, as a parameter and returns whether or not the number has alternating "high" and "low" digits. 0 through 4 are "low" digits and 5 through 9 are "high" digits. Your method should return true if the number passed alternates between "high" and "low" digits, and false if not. You may assume the number passed is positive. If the number passed consists of a single digit, highLow should return true. 

Note: highLow returns true if the number alternates starting with a "high" digit or starting with a "low" digit. What is important is that the digits alternate. For example, both 9292 and 2929 passed to highLow should return true.