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

JED Coweb Assignment 2

Refactoring (1 point)
Answer the following questions on refactoring.

Briefly, describe what refactoring is and why would you do it. In your description, include two signs that code should be refactored and how you would go about refactoring the code.




Tracing Code (1 point)
1 + 2 3 & #8211; Cascade expected ->4 factorial.

a := #(1 2 3 4 5) #(1 2 3 4 5)

a select: [:i | i odd] #(1 3 5)

b := a #(1 2 3 4 5)

a := a reversed #(5 4 3 2 1)

b collect: [:i | i i] #(1 4 9 16 25)

a perform: #at: withArguments: #(4) 2

Link to this Page