Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Spring 2006 Final Exam Review
Due: Last Day of Class
For this CoWeb assignment, you will complete a final exam review. On your Who's Who page, answer one or more of the questions below. You will need to answer enough questions to get you to a total of 4 points. So, you can do the large design question or a combination of smaller questions. The TAs will be grading for effort and the quality of the answers. You should be able to use your fellow classmates' answers to study for the final exam. Make sure that you clearly indicate which question(s) you are answering.
History of Object-Oriented Programming (1 Point)
Pick two of the following four people and briefly describe one of their main contributions to object-oriented programming and design: Kent Beck, Ward Cunningham, Alan Kay, and Ivan Sutherland. (Note: Do not describe more than two.)
Collection Classes (1 Point)
Answer the following questions on the different collection classes available in Squeak.
- How do OrderedCollection and Set differ?
- How do OrderedCollection and Array differ? Why would you use one over the other?
- How do you use a Dictionary? Why is accessing a Dictionary so fast?
Questionnaires (1 Point)
Questionnaires are a common technique for evaluating human-computer interaction. If you were designing a questionaire, what are three things that you need to watch out for to ensure the validity of your findings. Why are each of these a problem? How do you avoid them or keep their influence to a minimum?
Usability (2 Points)
You've learned about three usability evaluation techniques in this class: heuristic evaluation, cognitive walkthrough, and observing users. Compare and contrast two of these. What are the strengths of each approach? What are the weaknesses? When are they appropriate to use? Why would you choose one over the other?
Design Patterns (2 Points)
(Part A) Besides its name, name three characteristics commonly used to describe design patterns. For each characteristic, describe what it is and why it is useful? (Part B) Observer, Adaptor, and Factory are three design patterns described in this class. For two of these three, briefly describe them using the characteristics you chose.
Frameworks (2 Points)
- Why are frameworks useful?
- What is the difference between a framework and a class library?
- List two of the Squeak frameworks covered in this class and what they provide.
- Explain two of the reasons that a framework is difficult to develop.
Blocks in Virtual Machines (2 Points)
The following two instance methods on the Number class both compute whether the number (self) is greater than one number and less than another:
The following table shows how long it takes for these methods to execute for different numbers:
(Part A) Why is it that the first two expressions take the same amount of time to run (0.00143 ms), whereas the last two expressions differ in run time?
The byte codes for the two methods follows:
(Part B) Given these byte codes, explain why the block expressions are faster to execute than the parenthesis expressions.
(Part C) In the blockGreaterThan:andLessThan: method, the message and: is sent to the object returned from (self > greaterThan) with an argument of [self < lessThan]. At least, that’s the way the Smalltalk syntax would lead you to believe. In reality (in the byte code), you can see that there is no and: message sent. Why is this so?
Language Features (2 Points)
Squeak is perhaps the least well documented programming language you will ever use; however, Smalltalk and the Morphic GUI compensate for this by being pokable (easy to explore). There are many language features and tools for exploring Squeak. For four of these, name them, describe how you use them, and explain why they are useful.
Object-Oriented Language Design (2 Points)
OO programming languages differ quite a bit in their philosophy, purpose, and implementation. The following five questions ask you to examine some design choices for creating an OO language. Answer only two of the following:
- Java, C++, and C# have primitive types. Eiffel, Ruby, and Smalltalk do not. What are the advantages and disadvantages of having primitive types?
- C++ and Java are statically typed. Objective-C and Smalltalk are dynamically typed. What are the trade-offs of static and dynamic typing?
- Most OO languages run on a virtual machine. Java and Smalltalk do. C++ does not. What are the advantages and disadvantages of using a virtual machine for OO programming?
- Smalltalk blocks are closures. They combine a piece of code with a lexical environment. Other OO-languages that have closures are Ruby and Eiffel. Java and C++ do not. What are the advantages of having closures? Why do some languages not have closures?
Garbage Collection (3 Points)
(Part A) What are the advantages and disadvantages to using garbage collection? (Part B) Explain how reference counting works. Include an example. (Part C) Explain how mark and sweep works. Include an example. (Part D) What problems of garbage collection do generational scavenging and “stop and copy” address? How do they address them?
Analysis and Design (4 Points)
Design a virtual fish tank. Your virtual fish tank should be as much like a real fish tank as possible. The fish should be able to do common fish things (swim, eat, die, breathe). The fish tank can contain a number of fish. Like a normal fish tank, there should be a pH level and an oxygen level. The fish should be able to do things that affect those levels and be affected by those levels. If there is not enough oxygen, fish die. If the pH is not in range, fish die. Additionally, the fish need to be fed and the oxygen level needs to be regulated. (Part A) For your design, first do an object-oriented analysis using CRC cards. (Part B) Then, create a UML diagram of your fish tank, based on that analysis.
Links to this Page