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 - Summer 2003

The final will be cumulative, but with a strong focus on material in the second half of the class. Below are questions that are similar to the ones that will appear.

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.

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 Summer 2003 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 Summer 2003 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 Summer 2003 Final Exam Review: Design Patterns.


a. Identify a use where Arrays are the best choice, where Bags are the best choice, and where Dictionaries are the best choice.

b. For figuring out if an element is in the Collection, Sets are much, MUCH faster than Arrays. Why?

c. When are OrderedCollections much slower than Arrays? When are OrderedCollections almost the same speed as Arrays? What causes OrderedCollections to be slower?

d. If my Squeak program is slow how can I find out what parts are taking the most time?

e. Should you worry about speed when doing the design of your program? Why or why not?

Post comments, discussion, answers at Summer 2003 Final Exam Review: Optimization.

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 Summer 2003 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 becuase 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 Summer 2003 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 Summer 2003 Final Exam Review: Design

Design Process

You are the consultant brought in to correct the design process at a large company. What comments would you have for each of the following past failures and what would you suggest as improvements?

a. We used the waterfall method of development on our last project and gathered requirements by asking users questions for 2 days and delivered the software after 1 year and found that they didn't want to use the software.

b. We don't have the money to buy lots of expensive UML tools for doing UML, so we didn't do any UML diagrams. You should be able to
figure out the design from reading the code.

c. We don't want to refactor the system because we are afraid we will break something.

d. We keep finding methods and attributes that we will need when we do the user scenarios and we don't know which class to put them in.

Post comments, discussion, answers at Summer 2003 Design Process

Links to this Page