Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Final Exam Review - Fall 2004
Topics to expect on the final exam:
- Most significant things since the last exam
- Virtual machines
- Optimizing Squeak
- Language choices
- Extreme programming
- Important course topics
- Coding in Squeak
- O-O Analysis
- O-O Design (including frameworks)
- Testing (O-O testing concepts, test planning, using SUnit)
- User Interfaces (design, implementation, evaluation)
Some of the questions below are from actual final exams in previous semesters. I recommend working together to figure out the solutions. I will check up on the discussions, but I won't provide answers where no questions or answers to the samples are posted.
You're advising a team of developers who are considering adopting XP. Being an expert on XP, please answer their questions in one or two sentences.
a) "If we don’t write a specification, how will we know if the software being developed matches our needs?"
b) "Computer are cheap and people are expensive. How can it possibly make sense to waste time watching someone else write code?"
c) "We like to think about the future evolution of a system as we are doing the design. Isn’t that the prudent thing to do? What does XP have to offer that works better than planning ahead?"
Post comments, discussion, answers at Spring 2004 Final Exam Review: eXtreme Programming
When a subclass is implemented based on a parent class that is already considered “tested,” it is not uniformly necessary to retest all of the methods of the parent. Indicate with a “yes” or “no” in the provided blanks which of the following circumstances require retesting at least some of the methods defined in the parent.
a) _____ Methods of the subclass access and change only instance variables defined in the subclass.
b) _____ Methods of the subclass access parent class instance variables plus access and change subclass instance variables.
c) _____ Methods of the subclass access and change both subclass and parent class instance variables.
d) _____ Methods of the subclass call methods of the parent class.
e) _____ Methods of the subclass define or override methods used by other methods defined in parent class.
Post comments, discussion, answers at Fall 2004 Final Exam Review: O-O Testing
You have been given the task of testing the new TI-4x calculator. It supports the four cardinal operations (addition, subtraction, multiplication, and division) and both integer and decimal values. The display contains enough spaces for 10 numbers with no scientific notation wrap-over.
Give four good, simple tests which would test most of the functionality. “Simple” means that the test involves only a single operator. Be sure to take into consideration edge conditions, any potential branches of program flow, and physical constraints of the device. Explain what aspects of the calculator’s operation are being tested by each test case.
An example of a test would be: 84 + 6 = 90, which tests integers and addition.
Put your answers/comment/questions at Fall 2004 Final Exam Review: Test Planning
Writing Squeak Code
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.
Put your answers/comment/questions at Fall 2004 Final Exam Review: Squeak Code
For each of the applications below, you are to pick the language of your choice for implementing the application (e.g., Smalltalk in general, Squeak in specific, Java, C, C++, Ada, Visual Basic, Fortran, Lisp, Assembler, etc.) and provide your rationale! We don't have a right answer in mind for each of these, but we are looking for true, reasonable statements in your rationale. (E.g., ``I'm going to pick C++ because it is the least likely to crash" would be a bad answer.)
A. You're building a claims-entry system for a large insurance firm. You have to run on whatever platform the insurance agent may purchase. New claims forms are defined by the company fairly frequently-usually several a month. You want people to be able to fill out the forms via the internet. The system must be able to grow to handle millions of users and it must be secure.
B. You're building a new video game based on the movie "Finding Nemo" to run only on Windows boxes with hardware acceleration. You're going to be distributing the code on CD. You'll have a small, hand-picked group of developers who are expert in your language of choice. There is intense pressure to have the game out by summer's end, so you only have a month or two to implement the complete game.
C. You are writing the software to control a nuclear power plant. THE SYSTEM MUST NOT CRASH! The software doesn't have to be developed very quickly and it does have to be well tested.
D. You're writing the operating system for a new computer.
E. You are writing a fairly simple application for a small company that mostly needs some simple processing and a nice GUI. They have a self-taught programmer who will be maintaining it.
F. You are developing a system for children to teach them about science by having an environment that they can write small programs in without having to do lots of typing. The kids should be able to make simulations of things like objects falling due to gravity.
Post comments, discussion, answers at Fall 2004 Final Exam Review: Language Choices.
a) Why are VMs usually stack-based architectures? Why not have registers?
b) Give two reasons for implementing a language using a VM rather than by compiling it to C, which can be compiled for almost any machine.
Indicate whether the following statements are True (T) or False (F):
c) ___ Executing native code is faster then executing bytecodes for any kind of operation.
d) ___ Garbage collection is more easily implemented using a VMs because programmers don’t have access to native machine addresses.
e) ___ One reason that a highly optimized Dictionary collection is available in Smalltalk is because the virtual machine depends on the same mechanism for good performance.
f) ___ Java can be compiled to Smalltalk bytecodes.
g) ___ Smalltalk can be compiled to Java bytecodes.
Post comments, discussion, answers at Fall 2004 Final Exam Review: Virtual Machines
a. What are design patterns? How are they different from frameworks?
b. I am building a Word Processor and need to support unlimited undo of actions. What design pattern might I use to assist me in designing a good solution?
c. I am building a graphical user interface framework and need to subclass the window abstraction and the window implementation. What design pattern could I use?
d. I am limited to how many database connections I can have. What design pattern helps me limit the number of objects I can create?
e. I want to have several objects that "watch" another object and take action when the object changes. What design pattern will help?
Post comments, discussion, answers at Fall 2004 Final Exam Review: Design Patterns.
A company has just designed a user interface that was an utter disaster. You have been brought in as an HCI consultant to explain what they did wrong. For each of the below quotes from the companies engineers, respond and explain what they should have done. What UI principle(s) did they violate?
a. "We used it ourselves for over a week! We really loved it! I can't understand why we're getting all these nasty letters from our users!"
b. "We wanted to save on screen real estate so we used 9 point text throughout the user interface. Well, now it turns out that all these Senior Citizens homes bought our software. They seem to be having trouble reading the text".
c. "All of us felt that OK and Cancel buttons in the lower right hand corner were boring. So instead, if you click at the top of the dialog box, it closes as if you did 'OK,' and if you click at the bottom, it closes as if you clicked 'Cancel.' What's that? No, we didn't use any labels – they would just take up screen real estate."
d. "We wanted the text to stand out so we made all text red."
e. "The users seem to be getting stuck on one screen even though the information they need to answer questions was two screens back. Can't they just remember things?"
Post comments, discussion, answers at Fall 2004 Final Exam Review: HCI Design
OO Design Evaluation
You were hired to review the design and make suggestions for improvements on some object-oriented software. What would you say to each of the following and how would you fix any problems?
a. This class is the main class and handles many of the tasks.
b. We named the Warehouse class Ware becuase it is easier to type.
c. We are getting tons of code written becuase there are things we can just copy from similar classes.
d. We had one class inherit from another because the one class needed to access some information in the other class, but we had a problem that some of the inherited methods didn't make sense so we overrode them.
e. We have a type attribute in the Payment class and then we case (switch) on the type to handle billing by credit card, purchase order, create a bill, etc.
f. We put most of the code into class methods and that way we don't need to create objects to do the work.
Post comments, discussion, answers at Fall 2004 Final Exam Review: OO Design Evaluation
Draw the UML class diagram for the following requirements:
Design the software for the following vending machine. The vending machine must take coins and/or bills and dispense items that the user pushes buttons to select. The vending machine validates the money and displays the current total in the display window. The customer pushes a button which tells an item dispenser to dispense an item. If the customer has entered enough money for the item the vending machine will dispense the item and any change. The item dispensers must track the number of items in them and e-mail the supplier for the item (via the internet) to let the supplier know that they need more of that type of item when the number of items reaches a reorder level. The vending machine must know it's location, and model number. There are two kinds of items. Items that need to be kept cold and those that don't. All items know their price. Cold items also know what temperature they need to be kept at.
Post comments, discussion, answers at Fall 2004 Final Exam Review: Design
Links to this Page
- Reviews last edited on 24 July 2007 at 2:44 pm by balladeer.cc.gatech.edu
- Previous CS2340 Terms last edited on 15 May 2007 at 8:27 am by balladeer.cc.gatech.edu