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

Summer 2001 Final Review

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.

There is a discussion area for each problem – go ahead and try to answer them, and see if others agree with you! Lex Spoon and the TA's will correct any outright errors, but otherwise this is your area.

Programming A Sensor Management System

You are building a new kind of sensor management system. Your system is going to be accepting a continuous stream of data which will be the merged data from many sensors. Your application must make appropriate sense of it. Your stream will be a series of two byte integers (i.e., in the range of 0-65536), which you will read using next off the stream accessed by the global variable SensorStream. That is, SensorStream next will always return an integer between 0 and 65536. Answers can be written below or on the back.

a. The integer value 0 will actually be a flag value indicating a Character Display Message. A reading of 0 is telling you that the next two readings are to be interpreted as an X and Y value and the third reading will be the ASCII value for a character. So, the readings 0 10 100 65 would tell you to put an ASCII capital A at the position 10, 100 on the screen. Write the Squeak code to read the first 100 readings off of SensorStream and process any Character Display Messagescontained in those readings. (Hint: Character value: returns a character for a given ASCII value, Strings understand the message displayAt: which takes a Point.)

b. Some key events require you to correlate readings from multiple sensors. For example, a sound sensor gets triggered with random noise, but if the sound sensor gets triggered multiple times and the motion sensor in the same room gets
triggered, that indicates an alarm must be thrown. Readings in the range of 1-255 indicate that the corresponding sound sensor has gone off. Readings in the range of 256-511 indicate that the corresponding motion sensor has gone off. For example, a value of 1 indicates that sound sensor 1 has been triggered, and a value of 256 indicates that motion sensor 1 has been triggered.

Write code to read 100 values off SensorStream. If values between 1 and 255 come in, record the value and the number of times that that value has appeared (e.g., "5 appeared three times"). If a value between 256 and 511 comes in, put up "ALARM!" in a notifier if the corresponding sound sensor has gone off more than three times. (Hint: Object understands inform: that takes a string, then pops up a notifer with the string.) Besides writing the code, also tell me which data structure you used for recording and quickly finding the values and why you made that choice.

Post comments, discussion, answers at Sum01 Final Exam Review: Sensor Management System.

Virtual Machines

Post comments, discussion, answers at Sum01 Final Exam Review: Virtual Machines.


Post comments, discussion, answers at Sum01 Final Exam Review: Garbace Collection.

Optimization Strategies

What is wrong with each of the following optimization strategies?

Post comments, discussion, answers at Sum01 Final Exam Review: Optimization Strategies.

Optimization: Collection Differences

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?

Post comments, discussion, answers at Sum01 Final Exam Review: Collection Differences.

Language Differences

What OO language would you choose to implement the following systems, and why?

  1. You are writing a device auto-detection system for an operating system. The system manages a list of device drivers, and at the user's request can attempt to automatically detect what devices are present on the system.
  2. You are writing a web-based registration system, similar to Georgia Tech's Banner, that records the official records of all students, faculty, and staff of a university, and which can be queried with a web browser.
  3. You are writing the MPEG decoder for a consumer handheld movie player that holds movies on MPEG-encoded DVD's. The device will be mass-produced, and the software isn't very complicated.
  4. You are developing a professional movie editting system, and you wish to write a prototype to test the user interface. The prototype will only be used for about a month, and the entire functionality doesn't need to be implemented.
  5. You are writing the client for an online gaming network. The client will execute within people's web browsers for convenience. Typical games are chess, backgammon, spades, and go fish.

Post comments, discussion, answers at Sum01 Final Exam Review: Language Differences.

OO Theory

Post comments, discussion, answers at Sum01 Final Exam Review: OO Theory.

OO Theory: Message Lookup

Post comments, discussion, answers at Sum01 Final Exam Review: Message Lookup.

OO From a Manager's Perspective

You are a consultant to the WhizO Toy Company ("Makers of toys for tots of all ages"). WhizO is considering a shift to an object-oriented software development process. If they do make such a shift, you're in for big bucks as the consultant who leads the way. First step is to respond to the specific concerns of the Manager of their Software Development unit:

  1. "We usually have multiple teams of developers working on different parts of the programs at once. How does object-orientation help us with that?"
  2. "We rely heavily on simulation when developing sophisticated toys. What would be absolutely perfect would be if we could take parts of our simulation and use it in the code for the real toy. Can we do that? How?"
  3. "What happens if we develop add-ons for a toy, like a new Laser Gun for our Omega Video Game System? Or if we develop a new variation on a toy, like the Phaser Range Finder Gun (which is like the Laser Gun)? Can O-O help our productivity in doing this?"

Post comments, discussion, answers at Sum01 Final Exam Review: Whiz-O Toys.

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.

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. Did you know that older folks have trouble with reading
smaller text?"

c. "All of us felt that usual 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."

Post comments, discussion, answers at Sum01 Final Exam Review: HCI Design.


Name one other UML diagram besides a class diagram, and describe what it's good for.

Post comments, discussion, answers at Sum01 Final Exam Review: UML.

Design Patterns

a. What is the difference between Factory Method and Abtsract Factory?
b. What is the difference between Adapter and Decorator?

c. Name two reasons why it might be useful for a professional programmer
to study design patterns. Give one reason why it might in fact be

Post comments, discussion, answers at Sum01 Final Exam Review: Design Patterns.

Design Patterns in Tools for Space Scientists

You are going to be designing a suite of tools for space scientists. Your scientists are going to need to work with three kinds of documents:

a. Explain how one (your choice which one) Design Pattern would be useful in building this application. Draw a UML class diagram of the portion of your design where the design pattern would be useful. (Note: You are not drawing the whole class diagram, nor are you showing me the structure of the Design Pattern. Rather, you are showing me a few classes in your application whose design would be based on the Design Pattern youíve selected.)

b. The Space Scientists think this object-oriented stuff is just silly. "Fortran was good enough for my advisor and for me and for my students," they say. "Why not just use that?" What are the advantages of object-oriented design and programming for this problem?

Post comments, discussion, answers at Sum01 Final Exam Review: Tools for Space Scientists.

Designing with Model View Controller

Suppose you are designing a Hopping Mania, a jump-and-run computer game where the hero must jump from platform to platform without falling between the cracks to their doom. If the hero ever steps on a rock, then it gets in their shoe and they can only run half as fast for 10 seconds. Having taken CS 2340 at Georgia Tech, you decide to design the system using the Model-View-Controller architecture.

Describe the classes you would use to support the following features (on the test, you would be asked to sketch a UML diagram, but you can simply list the classes for the online problem):

For each of the following scenarios, describe which classes from your design are involved, and what messages they would send to each other:

Pay particular attention to interactions between the user interface and the rest of the system. You must use an MVC design. You may assume that any reasonable widgits are already available in the system. e.g., you may assume that there is already a widgit for displaying bitmap images, but you may not assume that there is a HappingMania widgit already written.

Post comments, discussion, answers at Sum01 Final Exam Review: Hopping Mania.

Links to this Page