Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Final Exam Review - Sp2000
I expect the final exam in CS2340 to be 6-8 questions like each of the below. Some of the questions below are from actual final exams in 2390. 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 are posted.
Redesigning the Personal Newspaper
Cox Communications (parent company of the AJC) has hired you to do your personal newspaper project again, but for them, as a real product (implented in Squeak, still, of course! :-). Reconsider the design decisions that you made this term and describe how you would design it again.
a. How would you parse? Use the built-in HtmlParser or build a new one in T-Gen from scratch or build one recursive descent or what? Give a rationale for your choice.
b. How will you handle specification of new news sources for your system? Configuration files? Classes? Interpreter? What?
c. What design patterns might you use that we discussed in class?
d. Design the classes for your system. Draw a UML class diagram.
Post comments, discussion, answers at Sp00 Final Exam Review: Redesigning the Personal Newspaper
Designing Networked Games
You are responsible for design and development of a new video game based on the Rugrats cartoon series on Nickelodeon. The video game will allow players to take on the roles of Tommy, Chuckie, Angelica, Phil, and Lil, and then interact to work through puzzles. The players will sit all over the network, and it's desirable to be entirely cross-platform. You must make several technical decisions up front.
a. Do you use a virtual machine? Why or why not?
b. How do you want to transmit the images of Tommy, Chuckie, and the rest? Some of your teams want to send around 3-D models of them, and others want to use Flash. What do you think and why?
c. There will be need for various kind of audio in this game: Background music based on the cartoon, recordings of the voices. What formats do you think you would want to use and why?
Post comments, discussion, answers at Sp00 Final Exam Review: Design Networked Games
Choosing your collection objects
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 Sp00 Final Exam Review: Choosing your collection objects
Transposing a Dictionary
Imagine that you have a dictionary that looks like this:
|Key ||Value |
|Fred || Wilma |
|Barney || Betty |
|George || Martha |
|Ozzie || Harriet |
And you want to create the transpose of the dictionary so that it looks like this:
|Key ||Value |
|Wilma || Fred |
|Betty || Barney |
|Martha || George |
|Harriet || Ozzie |
Do it in one line of code.
Post comments, discussion, answers at Sp00 Final Exam Review: Transposing a Dictionary
MVC vs. Morphic
a. Name an application where MVC is preferable to Morphic.
b. Name an application where Morphic is preferable to MVC.
c. Identify three major design differences between Morphic and MVC.
Post comments, discussion, answers at Sp00 Final Exam Review: MVC vs. Morphic
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 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 Sp00 Final Exam Review: HCI Design
A. What are the strengths and weaknesses of the Model-View-Controller structure for user interfaces? Give me an example of an application where MVC would really help, and another where MVC wouldn't help.
B. What are the strengths and weaknesses of an object-oriented approach? Give me an example of a project where using OOA/D/P is the right idea, and an example where it's a bad idea.
C. What are the strengths and weaknesses of Squeak vs. Java? Give me an example where using Squeak is a good idea and one where it's a bad idea, and one where Java is a good idea and one where it's a bad idea.
Post comments, discussion, answers at Sp00 Final Exam Review: Tradeoffs
a. Factory Method and Abstract Factory design patterns are quite similar. How are they similar and how are they different?
b. How are the Adapter and Bridge patterns similar and different?
Post comments, discussion, answers at Sp00 Final Exam Review: Design Patterns
Multimedia Programming in Squeak
Recall that you can play three notes in Squeak like this:
(FMSound soundNamed: 'brass1')
from: #((c4 1.0 500) (d4 1.0 500) (e4 1.0 5000))) play
"Triplet are note, duration, and volume"
(a) Recall, too, how to move a Pen, from wherever the Pen appears when first created.
Write the Squeak code to draw a box, where you play C in the fourth octave during the first line, D in the second, E in the third, and F in the fourth – as a clarinet.
(b) Recall that moving a Morph involves setting its bounds: to a new rectangle. Recall that you change the color of a Morph with a color: command.
Write the Squeak code to move a red EllipseMorph. Start it at 0,0 and play C; then go to 0,100 and play a D; then go to 100,100 and play an E; and finally go to 100,0 and play an F.
Post comments, discussion, answers at Sp00 Final Exam Review: Multimedia Programming in Squeak
Whiz-O Toys: 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:
- "We usually have multiple teams of developers working on different parts of the programs at once. How does object-orientation help us with that?"
- "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?"
- "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 Sp00 Final Exam Review: Whiz-O Toys
a. Give three reasons why it may make sense to use a virtual machine instead of native code in an application or device.
b. Identify two features of the Java HotSpot and Squeak virtual machines that are common between them, and two other features that are different.
c. What takes up the majority of code (and probably execution time) in a primitive written for a virtual machine?
Post comments, discussion, answers at Sp00 Final Exam Review: Virtual Machines
Design an Alarm System: Design an alarm system for installation in homes or businesses. You may assume that someone else is creating sensors and the mechanism to trigger alarms. You have to create the software to respond to alarms and to alert authorities.
- For any kind of alarm, you need to send all the alerts necessary for a given alarm. For example, for all fire alarms, the fire department is always called. The head of the house or business is always called for all alarm, and one or more "local experts" might also be called. For example, if there is a fire or intruder in the warehouse, the warehouse manager should also be called.
- You need to respond to Intruders by sounding the audio alarm in the vicinity. Assume that you just send the message trigger to the audio alarm object and it will sound.
- You need to respond to Fire by triggering the sprinklers in the vicinity, if available. Assume that you just send the message trigger to the sprinklers object.
- Your system is pretty sophisticated with respect to alerting authorities. It can handle IP or phone messaging. You can assume that the messaging is handled by another piece of the system. You need to provide the address of the authority (i.e., either a phone number or an email address) and the message to be sent (which should include, for example, the kind of alarm and the alarm vicinity).
Draw the UML class diagram for this class structure. (You don't have to add more features than what's described.) Note: Partial credit will be given, so err on the side of too much, not too little. In your analysis, be sure to address:
- What classes do you need? What service do each need to provide? What attributes do each need to know?
- Where are there generalization-specialization relationships? Where are there part-whole relationships?
Post comments, discussion, answers at Sp00 Final Exam Review: Design an Alarm System
Note! This is an important one!
Displaying the Current Status. You must now provide an interface for your alarms: An AlarmStatusView that shows that status (triggered by a sensor or still waiting) of each alarm.
How do you implement View/Model communication? How would you change your Alarm class(es) to implement this feature? Be sure to tell me (a) how the AlarmStatusView finds out an alarm being triggered and (b) how it finds the vicinity of the triggered alarm to display.
Post comments, discussion, answers at Sp00 Final Exam Review: Displaying Alarm Status
Links to this Page