Assignment 2: Parse Numerals in Squeak

You are strongly advised to complete this assignment working in pairs.

Write code to parse numerals (text strings) into numbers, as shown in the following example:

The blue methods reversed and sum are already defined in the image. Your assignment is to write Squeak methods explode, digitValue, pairedWithPowersOf10, pairwiseProduct, and parseAsNumeral so that

'146' parseAsNumeral
evaluates to 146. You should add these methods to existing classes.

Write SUnit tests for these methods. The test methods should go in a new class called TestParseNumeral

How will you be graded? Here is a grading rubric that describes exactly what we will be looking for in your assignment. Read it!

File out your code as a Monticello Package (.mcz file), and submit via email (to juncao), as an attachment. If you can't make it work, write some text explaining where you got stuck, and submit that. In either case, don't forget to add text giving the names of BOTH students who worked on the assignment.