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

Jason Spain

Uploaded Image: Image009.jpg

Hello,

I am a transfer student, and this is my 5th semester here at Georgia Tech.
So far I have really enjoyed the "Tech experience", I suppose.
I am married and have a 5 month old daughter.

Coweb Assignment 1:



Writing Code (1 point):

fibonacci: nthIndex
    "Return the nth Fibonacci number in the Fibonacci series"
    (nthIndex < 0) ifTrue: [self error: 'Message input must be greater than or equal to 0'].
    ((nthIndex = 0) or: [nthIndex = 1]) ifTrue: [^1].
    (nthIndex > 1) ifTrue: [^((self fibonacci: (nthIndex - 2)) + (self fibonacci: (nthIndex - 1)))].


Language Features (1 point):

1. System Browser: You can open the System Browser from the tools menu on the right of the Squeak Desktop. On the left you can select a class category, then left middle select a class, right middle type of method, and on the right are the methods. The System Browser is useful because you can browse every class in your image and their methods. Many of the classes and methods have documentation comments that tell you what they are used for.

2. Heirarchy Browser: The Heirarchy Browser is similar to the System Browser, except instead of class categories and classes on the left, their is a list of every parent class for the class in question. You reach the heirarchy class by clicking the heirarchy button on the System Browser. The Heirarchy Browser is useful because if you can't find a method in a certain class that does what you want it to do, you can search through parent classes to find a method that is inherited by the child class.

3. Method Finder: To use the Method Finder, click on the Tools tab and drag the method finder to the desktop. enter the search string and press enter. This brings up a list of methods that contain the search string, and when you click on any of the methods, a list of classes pops up telling you what classes have a method by that name. This is useful if you what to use a method that does something but you are not sure what class to use, or you know that you want to use a class from a certain type of class category, but you're not sure which one to use, such as deciding between an OrderedCollection or a Set.

4. Workspace: Another way to find out what some code is supposed to do is to try it out in the workspace. The workspace is located in the Tools tab. To use it, just type in the code you want to try and and hit alt+d to execute it. That way if some method or class is not commented (a lot of them aren't) and you can't quite tell from the code what they are exactly supposed to do, you can test them out in the workspace to see.


Coweb Assignment 2:



Using Finding Tools in Squeak:


1. Implementors of: The implementors of browser can be very useful to see how different classes implement the same method name. Many method names are commonly used in Squeak, and by seeing how different classes implement the same method name, often you can get a general idea of the overall purpose of methods with a particular name. For example, the send method is a very commonly used method name in many Squeak classes. By researching how different classes implement the send method, you can get an idea that usually send is used to perform some actions repeatedly over small increments of time. There are several ways to access the implementers of window. Probably the most inefficient is to search through the classes in a System Window until you find the method name you are looking for, selecting the method, and then pressing the Implementors button, as shown below.

Uploaded Image: implem1.jpg

However, there is a much quicker way to access the implementors of window from the System Browser. You don't have to search through any classes at all. Just open up a System Browser, and yellow click (right click in windows with a 2 button mouse) on the method pane on the right side of the System Browser. This will bring up a menu, from which you can select "implementors of...".

Uploaded Image: implem2.jpg

Type the method name you are looking for and press enter.

Uploaded Image: implem3.jpg

This will bring up the Implementors of Window, from which you can browse the code for that method in every class that implements it.

Uploaded Image: implem4.jpg

Another way to bring up the Implementors of Window for a particular method name is from the Message Names window. Simply type in the method name you are looking for and click search.

Uploaded Image: implem5.jpg

Then you can scroll down to that method name and select it.

Uploaded Image: implem6.jpg

Click on the Implementors button to access the Implementors of window.

Uploaded Image: implem7.jpg

2. Senders of: The Senders of window is similar to the Implementors of window, except instead of showing you classes that define and implement a method name, and the implementation code for the method, the Senders of window shows you what classes use the method, and all of the code where that message name is sent to objects that implement it. Sometimes even after seeing how the code for a method name is implemented in different classes, you may still have questions about what the method does or what it is used for. Sometimes it is even more helpful to see how a method is used in several classes, rather than just the method definitions. Seeing how other classes use a method can be an invaluable tool in helping you determine how to use it in your own code. The Senders of window is accessed in the exact same way as the Implementors of window, except by selecting the Senders button or "senders of..." menu item instead of the Implementors button or menu item, so I won't go the the details of how to access it again, but there are screenshots provided below to further illustrate its use.

From the System Browser

Uploaded Image: send1.jpg

Uploaded Image: send2.jpg

From the yellow button menu of the method pane of the System Browser

Uploaded Image: send3.jpg

Uploaded Image: send4.jpg

Uploaded Image: send5.jpg

From the Message Names window

Uploaded Image: send6.jpg

Uploaded Image: send7.jpg

3. Method Finder: The method finder works exactly the same as the Message Names window, except it doesn't have buttons for opening up the Implementors of, Senders of, Hierarchy Browser, etc. Like the Message Names Window, the Method Finder displays every method that contains the entered search string as part of its name. This can be useful if you want to search for a method that does a certain thing, or has anything to do with a certain thing you want to accomplish, For example, say you want to eveluate a string as Squeak code. You don't know what method to use or what class might contain it, but you open up the Method Finder and type in evaluate and press enter. From here, you see that the Compiler has a class method named eveluate. You click on this method name, and a System Browser showing the Compilers evaluate method pops up. From here, you can see that it takes a string and executes it as Squeak code. You have found what you are looking for. To use the Method Finder, simply type in a search string and press enter.

Uploaded Image: method1.jpg

Fro this example our search string was once again step. As you can see, every method name that contains the substring "step" in its name is displayed in the middle left panel. Once you select a method name in this pane, every class that defines a method with that name is displayed in the upper right panel.

Uploaded Image: method2.jpg

By clicking on a particular class name in the right panel, a System Browser pops up displaying that class's definition and implementation for the method you selected.

Uploaded Image: method3.jpg


Coweb Assignment 3:


Analysis and Design:


Part A: Object Oriented Analysis



Scenarios:

John bought a fish tank and some fish and he took really good care of them. He fed them every day, replaced his air pump and filtration system every six months, changed the filters on his filtration system every week, and and put pH treatments in the water when necessary. Some fish died of old age, but none died for lack of being taken care of by John.

Suzy bought a fish tank and some fish and after awhile she stopped paying attention to the pH indicator, and forgot to put pH treatments in the water. Her fish died.

Jimmy bought a fish tank and some fish, and after a few months of not changing the filter, there was way to much fish poop in the water, which affected the pH levels and was toxic, and his fish died.

Joe bought a fish tank and some fish, and after a year, his air pump broke, and he didn't replace it quickly enough. His fish suffocated and died.

Juley bought a fish tank, and a whole crap load of fish to put in it. She figured the more the better, right? She did everything right, just like John did, but nothing she could do could keep enough oxygen in the tank, keep the water clean enough, or keep the pH levels in balance because there were just too many fish in too small of a tank. Her fish died.

Object Brainstorming:

owner
tank
water
filtration system
air pump
pH indicator
pH treatment
fish

CRC Analysis:

Uploaded Image: fishtank1.png

Uploaded Image: fishtank2.png

Part B: Object Oriented Design



UML Diagrams:


Uploaded Image: fishtankuml.png

Links to this Page