Import JJIO Class ManyMax2 -- Name jmotil -- Does Maximum of 5 ints, using Max3s Routine bigMax (none) is private Boxes a,b,c,d,e,f,g ofType int -- Does compute the max of 5 ints Start Outputln "Enter 5 values " Input a Outputln a Input b Outputln b Input c Outputln c Input d Outputln d Input e Outputln e Set f = max3 (a,b,c) Set g = max3 (d,e,f) Outputln "The maximum of 5 values is " Output g Outputln " " EndRoutine bigMax Function max3 (p,q,r) ofType int is public Slot p ofType int Slot q ofType int Slot r ofType int Box result ofType int -- return value Box temp ofType int -- local temporary -- Does return maximum of 3 ints p,q,r Set temp = max2 (p,q) Set result = max2 (r,temp) EndFunction max3 Function max2 (x,y) ofType int is public Slot x ofType int Slot y ofType int Box result ofType int -- Does return maximum of 2 ints x,y If (x < y) then Set result = y Else Set result = x EndIf EndFunction max2 EndClass ManyMax2