View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

MP7 Discussion

Q: An-Hoe Shih - June 23, 2007 - Is there a way to tell whether an object is the last object of a ReferenceStream? I tried the atEnd method but it seems to always return false. I also tried to just call next and check if it returns nil, but this does not work either since getting pass the last object will result in an error.


Q: Jeffrey Votteler - June 20, 2007 - Is there a file missing from MP7 page (/cs598rej/uploads/weirdspacing.txt)?

A: Nicholas Chen - June 20, 2007 - I have fixed it. The previous uploader made a typo "wierd" instead of "weird" which is why it was not found.


Q: Joshua Lintz - June 22, 2006 - If there is punctuation in the middle of a word such as "hel,lo world", should it divide it into two words? Should that string produce a bag with 3 elements(hel lo world) or 2(hello world)? I will assume that it should be 3 for now.

A: Paul Adamczyk - June 23, 2006 - I was trying to warn you against counting the number of angels dancing on the pin, but apparently I failed. I would not bother to consider such bizarre cases. If you do so anyway, just make up your own rules, so if 3 works better for you, 3 it is.


Q and A: Paul Adamczyk - June 22, 2006 - How comprehensive should the tests be? Should we account for all special characters? NO. Pick just the most popular ones. You will not be graded based on the number of special characters you can handle, but rather based on how well your tests cover the cases you do implement.


Q: Ryan Senior - June 22, 2006 - By creating a "test suite", do you mean that we should just create more test cases? Or is there an actual class or something that is a "Test Suite"? I know in JUnit there is such a thing as a Test Suite, so I just wanted to make sure I was writing the right thing...

A: Paul Adamczyk - June 22, 2006 - Just write more tests. BTW, Squeak also has a class TestSuite that serves the same purpose as in JUnit.


Elaine Savino - June 22,2006 - If our tests use other files that we create, how should we send those as part of our hand-in?


Paul Adamczyk - June 22, 2006 - Include the name of the file and the contents as plain text (no attachments) in the submission email. Clearly mark the name of the file and where the contents begin and end, so that I can reconstruct it on the other side.


Elaine Savino - June 22,2006 - Part 1: Since the instructions say "Implement a WordStream class that takes a string and produces a stream of words" is it OK if the return of the instance creation method is a ReadStream, since this is inherently a read-only stream that can be used in the standard way (i.e. you can automatically send it the message 'next').


Paul Adamczyk - June 22, 2006 - The instance creation method should create an instance of WordStream. That's required by definition. How you implement the WordStream class is up to you. You could use a ReadStream as an instance variable of your class and write methods such as next that call the corresponding methods on the ReadStream.


Elaine Savino - June 22,2006 - Part 3: Can we use the StringManipulator dollarValue: method that we created for HW6 for this purpose? I think this would be good reuse, but just wanted to check if we can build off of one assignment to another.


Paul Adamczyk - June 22, 2006 - Reuse of code between assignments is a good practice and I encourage it.


Des Iorgova - June 21,2006 - Part 3: Isn't findDollarWords: supposed to return the dollar amount of a given text vs. a collection which includes words?


Paul Adamczyk - June 22, 2006 - It should return a collection of "dollar words" i.e. words that score 100 points.


Des Iorgova - June 20, 2006 - Is there a difference between a class method and a script in SmallTalk?

Paul Adamczyk - June 21, 2006 - I don't believe that "script" is a part of the Smalltalk language. It's a method where you instantiate and set up connections between some objects. There are no specific rules about the type of the method (instance or class) or its location.


Link to this Page