Smalltalk-prj-statement

Smalltalk-prj-statement - CSE324 SPR2011 Smalltalk...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE324 SPR2011 Smalltalk Assignment Due: No later than April 28 th , 23:59pm. Write Smalltalk code for the "squeak" interpreter to perform the following (in order) : A) Main assignment (100 pts): i) Declare the following objects as instances of the class " OrderedCollection ", each of size 100 elements: a1 and a2 . ii) Declare the following objects as instances of the class " SortedCollection ", each of size 100 elements: s1 , s2 , and s3 . iii) Initialize a1 to (8 1 2 3 4 5 77 99 33 10 11 22 33 44 55 66 7 2 3 4 7 8 0). iv) In the last 10 items of a1 : a) detect odd numbers and store them in a2 (in the order you found them), and b) as you are detecting them, add them up and store their summation in object " oddSum ". v) Sort the items in a1 (in ascending order) and place the result in s1 . vi) Sort the items in a1 (in descending order) and place the result in s2 . vii)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/23/2011 for the course CSE 324 taught by Professor Soliman during the Spring '11 term at NMT.

Page1 / 2

Smalltalk-prj-statement - CSE324 SPR2011 Smalltalk...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online