Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Midterm Review - Spring 2003
Our Midterm will have 5 questions. Not suprisingly there are 5 major topics we have covered:
- Basic Smalltalk Coding and Syntax
- Design Principles
- Design Artifacts
- Smalltalk GUI Programming (MVC and Morphic)
So whats important about history?
Well the following are typical questions:
-1. What is the name of Alan Kay's dog?
-2. Write the first 300 lines of code for Sketchpad.
-3. Write the complete BNF grammar for Simula.
Just kidding. What is important to know from Chapter 1? You should know enough about the history of OO to discuss it intelligently and to show your understanding of two major threads.
1. How did we get to OO? If you see a newsgroup post claiming OO concepts were developed in the nineties and are a fad, how would you respond? Are they a fad or is there more to OO than just a hyphenated buzz-word?
2. People often talk about verb-oriented versus noun-oriented thinking when they contrast the functional languages like C, COBOL or FORTRAN and OO langauges like Java and Smalltalk. What is the significance of the verb/noun comparison?
Discuss History Here
Everybody's favorite-> the obligatory coding question. Looking over the old midterms all the good coding questions have already been taken! Still expect a possible two part question. Part a will be a coding question using collections. Part b will be a demonstration of your knowledge of smalltalk evaluation sequences much like question 2 of the first quiz. For example:
- a. Write workspace code to solve the following problem.
Write a method stringToHex: that takes as input a string of positive integers separated by spaces (e.g. ’12 13 14’) and returns a collection of the hexadecimal equivalents of each of the numbers in the string (e.g., an OrderedCollection('16rC' '16rD' '16rE')). Hints: Strings understand findTokens: which inputs a string of delimeters (e.g., ‘ ‘ to specify a space) and returns a collection of strings that were separated by any of those delimeters (e.g., (’12’ ‘13’ ‘13’). Hint2: Integers understand hex. Hint3: Strings understand asNumber.
- b. Show in the order messages are sent, the receiver, message and parameters for the following line of smalltalk code. Finally, provide the output that would display on the Transcript.
Transcript show: 'The answer is ';show: (3+55) odd ; cr.
Discuss Coding Answer here
I will not ask you to regurgitate from memory definitions of all the principles we talked about. Instead you will most likely be required to perform a design critique. I will give some CRC cards and/or UML pictures. You will critique the design specifiying what is good and bad about it in light of the design principles we discussed in class. For example, Figure 5-2 of the text on the initial clock design. If someone presented that design to you what is good about it, and what is bad about it. Make sure your answer uses correct design terms: abstraction, coupling, cohesion, encapsulation, information hiding, open-closed principle, delegation, etc.
Discuss Design Principles Here
This question will basically be a small design exercise. I will probably give you a small problem, ask you to identify classes make a couple of CRC cards, draw a class diagram and walk through a scenario.
A hospital has two types of employees, exempt and non-exempt. Exempt employees draw no overtime regarless of how many hours they may work. Instead they receive a set monthly salary. Non-exempt employees are paid an hourly rate for the first 40 hours they work, and then are paid 1.5 times their hourly rate for any additional hours. Hospital volunteers receive no pay, but a record of the hours worked by each is maintained. Information is kept about all these people such as their name, address and phone number. Every two weeks each person gets a printout of their hours worked and if they are not volunteers, their pay amount. The IT department has asked you to do an OOA of this part of the system. Develop some candidate classes, create one scenario and then walk through that scenario with CRC cards annotating them with the appropriate information.
Discuss Design Artifacts Here
Almost certainly this question will ensure you understand MVC (as a programming paradigm–not a smalltalk GUI toolkit). I won't ask you to code a PluggableTextMorph from memory. It would be useful to know what pluggable components are, how they are used. How do these "canned" buttons know what to do when they are pressed? How does a text morph know what text it is supposed to display? You should be able to answer these questions in light of the MVC philosophy.
Discuss GUI Here
Links to this Page