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

Final Exam Review - Spring 2004

Topics to expect on the final exam:



Review Questions


Some of the questions below are from actual final exams in 2390 and 2340. 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.



eXtreme Programming



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


The SUnit testing framework


See SUnit.ppt

a. What is an object-oriented framework?

b. Why is unit testing of O-O programs so important that someone built a testing framework explicitly to support this task?

c. Explain how SUnit works as a framework to provide testing capabilities.


Post comments, discussion, answers at Spring 2004 Final Exam Review: SUnit


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 Spring 2004 Final Exam Review: Squeak Code

Language Choices:



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 Spring 2004 Final Exam Review: Language Choices.

Virtual Machines



a. Give three reasons that one might use a virtual machine (and compiling to native code) instead of a compiler to compile directly to machine code.

b. Give a good reason why you might add a primitive to a VM.

c. How are the Java and Squeak VM's similar. How are they different?

d. What is one algorithm that is used for garbage collection?

e. Is it a good idea to use a VM when doing 3D graphics? When doing applications that you want to be secure?

f. What takes up the majority of code (and probably execution time) in a primitive written for a virtual machine?


Post comments, discussion, answers at Spring 2004 Final Exam Review: Virtual Machines


Design Patterns


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 Spring 2004 Final Exam Review: Design Patterns.


HCI Design



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 Spring 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 Spring 2004 Final Exam Review: OO Design Evaluation


Design



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 Spring 2004 Final Exam Review: Design


Link to this Page