View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Midterm Review - Summer 2007

Previous semester's reviews are good to practice on. Here are a few other questions:

1. Coding:
Write a smalltalk method collectionFact: aCollection which receives an OrderedCollection of integers as parameter and returns an OrderedCollection which is is the factorial of each integer. Recall that OrderedCollection has many useful messages including(do: , collect: , select: , reject: , size, add:, remove:, includes: ). You may assume the parameter collection always contains integers and is not nil. For example: collectionFact: (1,2,3,4) would return (1,2,6,24).

2. Stereotypes:
Be able to match a class description to its applicable stereotype.

3. Messages
For the following statement, list the sequence of messages in the order they occur and fill in the table:
2 abs to: 7 + 6 do: [ :i | Transcript show: 'hi' ; show: i printString ; cr. ]


Link to this Page