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

Teddy's CoWeb Assignment 3

Method Dispatch (1 point)

The difference between method dispatching and method overloading is that method dispatching is done at run-time on the dynamic types of the argument, while method overloading is done statically at compile time.

For example, in Java, these two method headers demonstrate method overloading:
int plus (int x, int y)
int plus (int x, float y)

While in Lisp, the following two lines of code will do the same thing, but is all done at run time, so it is method dispatch:
(+ 1 2)
(+ 1 2.0)

Extreme Programming (1 point)

Pair programming is a programming practice in which two programmers sit side by side on the same computer and code together. As one person is coding or driving, the other is trying to think about how the code can be used or how it will affect the system, and tries to provide help for the driver. He is called the navigator. Usually, the two switch roles every so often. It is used in extreme programming because it increases software quility without impacting time to deliver.

Unit testing in extreme programming is used in order to make sure that all the code works correctly. Unit tests are usually written before the main program is, so coding is usually done when all the tests pass.

Design Patterns (1 point)

Factory:

Factory is a design pattern in which an interface is defined for creating an object, but you allow subclasses to actually create the object, dependent on what object is needed at the time. What is done, is that you pass the type of object you want to the creator class, and then depending on what object needs to be created, the creator class tells the ConcreteCreator to create the object that is needed. This is very simply shown in the following UML diagram:

Thanks to Wikipedia



Link to this Page