Smalltalk Exercises 1: Squeak 1. Given 3 integers, produce a list consisting of the smallest and largest. 2. Given 3 integers, produce a list of the three in sorted order. inisqueak -> to start Squeak ! Object methodsFor: 'algorithms' ! findpair: num2 and: num3 " (FileStream oldFileNamed: 'exer1.st') fileIn 4 findpair: 12 and: 10 -> (4 12) " | tempList | tempList := OrderedCollection new. tempList add: num3. tempList add: num2. tempList add: self. ^tempList. ! Example functions max3: num2 and: num3 " (FileStream oldFileNamed: 'exer1.st') fileIn 4 max3: 12 and: 10 " self > num2 ifTrue: [ self > num3 ifTrue: [ ^self ] ifFalse: [ ^num3 ] ] ifFalse: [ num2 > num3 ifTrue:[ ^num2 ] ifFalse: [ ^num3 ] ]. ! max3 "(FileStream oldFileNamed: 'exer1.st') fileIn #(4 12 10) max3 -> 12 " | num2 num3 | num2 := self at: 2. num3 := self at: 3. (self first) > (self at: 2) ifTrue: [ (self first) > (self at: 3) ifTrue: [ ^self first ] ifFalse: [ ^(self copyFrom: 3) first ] ] ifFalse: [ (self at:2) > num3 ifTrue:[ ^num2 ] ifFalse: [ ^num3 ] ]. !!