finished code for quiz4 in chapter5,MatarialMeasure.java