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

Chris Gordon

Hi there!!!

Writing Code (1 Point)
fibonacci: n 
	(n >= 0)
		ifTrue: [(n = 0) | (n = 1)
			ifTrue: [^1]
			ifFalse: [^(self fibonacci: n - 2) + (self fibonacci: n - 1)]]
		ifFalse: [self error: 'Please enter a number greater than or equal to zero.'].



Tracing Code (1 point)
| data onlyPositiveNumbers | = creates 2 local variables named "data" and "onlyPositiveNumbers".

data := OrderedCollection withAll: #(1 2 3 -4 -5 'error' 6 -7 999 2). = data's pointer now points to an OrderedCollection with the unordered elements
         {1, 2, 3, -4, -5, 'error', 6, -7, 999, 2}.

onlyPositiveNumbers := [:i | (i isKindOf: Number) and: [i positive]]. = onlyPositiveNumbers's pointer now points to a block. This block eliminates all
         elements of any set that are not numbers, and then it eliminates all negatice numbers too. This leaves behind a set containing only positive
         numbers.

data := data select: onlyPositiveNumbers. = data's pointer now points to the "select" of the previous data set that conforms to the onlyPositiveNumbers'
         block, which means data now points to a set containing {1, 2, 3, 6, 999, 2}.  The "select" message takes a block and executes it if possible.

data := data copyUpTo: 999. "not including" = data's pointer now points to the numbers of the previous data set that came before the 999 entry, which
         means data points to a set containing {1, 2, 3, 6}.

Transcript show: data average = Calculates the average of data's set and prints the result to the Transcript. The answer is 3.25.


Co-Web Assignment 3


History of Object-Oriented Programming (1 point):

Ward Cunningham: He invented the WIKI, CRC cards, XP programming, and many patterns for design. He’s the father of modern Object-Oriented Design.

Ivan Sutherland: He made the first Graphical User Interface (Sketchpad) at MIT. Introduction of the GUI into the computer world led to a drastic need for Object-Oriented programming. Ivan’s program was a cornerstone in the birth of OO programming and design.


Collection Classes (1 point):

1. How do the OrderedCollection and the Set differ?

An OrderedCollection’s contents are ordered, contain repeats, and can be referenced by indexes. A Set’s contents are not ordered and are not repeated.

2. How do the OrderedCollection and the Array differ? Why would you use one over the other?

An OrderedCollection has no fixed length (can grow or shrink with each addition or subtraction of contents) while an Array does have a fixed length. An OrderedCollection is preferred in cases where a random uncontrollable number of elements may be added and referenced in the course of the program. If the number of elements is known or there is a known maximum number for the elements, then the array would be preferable because it is faster and easier to execute code on array elements.

3. How do you use a Dictionary? Why is it so fast?

To use a dictionary you define a ‘key’ when you want to store an element within the dictionary. Then you can retrieve the element later using the ‘key’ as a reference. Dictionaries are fast because there is no traversing of an array or collection. A dictionary only cares about the specific element you are looking for and does not need to traverse the entire volume of its contents to find it.


Questionnaires (1 Point):

1. Specific Questions
The question “Do you have a computer?” will not be specific enough for someone who owns multiple computers. To avoid questions that are not specific enough, you can make the test closed format. When listing the answers for the question, you may notice that it is not specific enough.

2. Prestige Bias
People answer questions a certain way in order to promote themselves, leading to inaccurate results. This can be combated by not asking personal questions, but some people will tend to see the most trivial questions as personal. The best way to combat this is to make the questionnaire anonymous, which disallows the participant to promote themselves.

3. Language
Regional dialect, jargon, slang, and foreign words can have the effect of confusing and misleading the participant, thus leading to inaccurate results. This can only be combated through third-party editing by a person who differs greatly from you in upbringing, ethnicity, and regional dialect.


Usability (2 Points):

Heuristic Evaluation

A heuristic evaluation has a small group of evaluators independently examine an interface and judge its compliance with recognized usability principles. The evaluation is mainly formative and qualitative, and is most appropriate to use when certain features speak to some of the heuristics that you have chosen. A list of his heuristics can be found online at http://www.useit.com/papers/heuristic/heuristic_list.html.

Strengths:
Good for programs in the design process
Good for qualitative analysis

Weaknesses:
The system must be able to be judged by a rather specific list of heuristics

Cognitive Walkthrough

A cognitive walkthrough evaluates a program for ease of use by an intended user, and it seeks to discover if a user could easily learn the unique aspects of the program through exploration. It requires a fairly detailed prototype, and the evaluator must also know what the intended audience for the system is.

Strengths:
Lets you the ease of use and exploration of a program
Focused on the end user

Weaknesses:
It requires a detailed prototype or a finished product
The intended audience must be known and well defined

Comparison

You would want to change evaluations throughout the life of a program, and while you would not utilize both of these evaluations at once, they will both be used. A Heuristic Evaluation would be used extensively at first (during the design phase mainly) and then as the program takes shape it will be used less and less. It is at this time (when the program is close to finished) that a cognitive walkthrough would be used to determine any changes to be made.




Links to this Page