






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Final Exam Review - Summer 2002
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.
I expect the final exam in Summer 2002 CS2340 to be 6-8 questions like each of the below. 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 are posted. Barbara Ericson
Virtual Machines
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 Sum02 Final Exam Review: Virtual Machines
You're advising a team of developers who are considering adopting XP. Being an expert on XP, please answer their questions.
- "XP programmers don't document their code!?! How can their code still be readable after they write it?"
- "What in the world do they mean that code written by an individual has to be thrown away? What other kind of code is there?"
- "Integrating daily sounds like we'll spend all our time in integration. How can we make daily integration work more smoothly?"
- "Is there any evidence that this really works?"
Post comments, discussion, answers at Sum02 Final Exam Review: eXtreme Programming
Design Patterns
- What is a design pattern?
- Where did design patterns come from?
- Name one design pattern and explain when you would want to use it.
Post comments, discussion, answers at Design Patterns #2
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?
- This class is the main class and handles many of the tasks.
- We named the Warehouse class Ware becuase it is easier to type.
- We are getting tons of code written becuase there are things we can just copy from similar classes.
- 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.
- 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.
- We had a guy who wanted to create about 10 classes but we found a way to do it in only 3!
- 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 Sum02 Final Exam Review: OO Design Evaluation
Extending your Drawing Editor
You want to extend your drawing editor so that it can be used by radiologist to mark-up a chest x-ray. The radiologist wants to load in a chest-xray and then add a shape (like a circle, polygon, etc) on an interesting spot in the x-ray. Then they want to annotate the shape with a sound file that describes what is interesting about the shape. They might also want to annotate the shape with the location and finding. Locations and findings can both have parents and children. For example a location is "Lungs". It has the parent "Chest". It has the children "Left Lung" and "Right Lung".
- One tool that you are missing is a pen-like tool that will create a shape starting with the first mouse down and following the mouse until a mouse release. The shape will be a series of connected lines. How would your design change to add this tool?
- Redraw the UML diagram to add the new classes you will need.
Post comments, discussion, answers at Sum02 Final Exam Review: drawingEditor
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.
d. Can you use the MVC Paradigm in Morphic? Why or why not?
e. Name at least one commercial UI package today that is based on the MVC paradigm.
Post comments, discussion, answers at Sum02 Final Exam Review: MVC vs. Morphic
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 Sum02 Final Exam Review: Choosing your collection objects
Multimedia Programming in Squeak
Recall that you can play three notes in Squeak like this:
(AbstractSound noteSequenceOn:
(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 Sum02 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 Sum02 Final Exam Review: Whiz-O Toys
Helping the Video Game Industry
Given your experience with designing and
implementing epic adventure games, you have been hired as a
consultant to Electronic Arts as they develop their response to
the Myst series of adventure games.
- (5 points) The computer game and video game industry is enormous these days. EA realizes that there are two different potential markets for these games: The 12-18 year old market (low-budget, intense competition with movie industry), and the growing 25-40 year old market (can afford more expensive hardware). EA wants to know if they can have one user interface for both of these markets, or should they think about two user interfaces. How would you help them answer this question? What should they do before they start designing their user interface(s)?
- (5 points) Time passes, and now EA has some storyboards of the game and its interface. They want to know now, before they start coding and without spending too much money, if they're on the right path or have come up with a completely awful interface. What would you recommend they do and why?
- (10 points) EA is considering using a Model-View-Controller (MVC) structure for implementing the user interface for their new game. For example, if the user opens the Arkenchest, all the objects in the room touched by the evil ArkenLord should begin to glow. Trace out for EA the flow of messages in an MVC structure (assuming an object-oriented language, and that all objects in the visible world are View objects) between the user's opening the Arkenchest and the glowing of the objects.
- (5 points) EA used Squeak for their implementation, especially for the multimedia and portability aspects. Now they're looking to optimize some features. For example, parsing the 3-D objects is taking too long. Name at least two things that EA could try in order to speed up their code.
Post comments, discussion, answers at Sum02 Final Exam Review: Helping the Video Game Industry.
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 Sum02 Final Exam Review: Designing Alarms.
Link to this Page
- Reviews last edited on 24 July 2007 at 2:44 pm by balladeer.cc.gatech.edu