Midterm Review

  1. The WhizO Toy Company is working on their first video game: A fighting game with dinosaurs. The figure below shows the result of their object-oriented analysis of the problem:

    But the WhizO programmers are still pretty new at this --- they're not sure that they've done this right. Critique their OOA diagram and identify problems with it. (Hint: Yes, there is at least one.) You are welcome to use the back of this page as well.

    Post your answers, comments, questions, concerns, etc. here

  2. Describe the relationship between:

    I expect to see the following terms used in the above descriptions:

    Post your answers, comments, questions, concerns, etc. here

  3. Below is the Smalltalk instance method which appears in the Dinosaur class:
    attack: target
    	| location |
    	location := target position.
    	self aim: location.
    	self useWeapon.
    

    This code might be used like this:

    | aRaptor aPtero |
    aRaptor := Raptor new.
    aPtero := Pterodactyl new.
    aRaptor attack: aPtero.
    

    Post your answers, comments, questions, concerns, etc. here

  4. Below is the Smalltalk instance method which appears in the Raptor class:
    useWeapon
    	self extendClaws.
    	self strike.
    

    Post your answers, comments, questions, concerns, etc. here

  5. Be able to explain the all-caps words in the following contexts:

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  6. You are creating a simulation of an engine with a particular emphasis on modeling the flow of fuel through the engine (e.g., if we were to cause a clogged fuel line, our model would show a lack of fuel to the carburetor and pistons).

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  7. Consider the Vending Machine simulation discussed in class. The list below identifies the classes which were the central ones in implementing the Vending Machine.
    Classes
    CashDevice
    CashDeviceViewContainer
    DisplayBox
    DisplayBoxController
    DispensingHolder
    Item
    ItemViewContainer
    ModelValueViewContainer
    

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  8. Below is one method from the Vending Machine simulation.
    dispense: itemToDispense 
    
    	self isEmpty ifTrue: [^false].
    
    
    	(self itemIsDispensable: itemToDispense) ifFalse:
    		 [^false].
    
    
    	self printItem:  itemToDispense .
    
    
    	self activateDispenser.
    
    
    	self disconnectWithItem: itemToDispense.
    
    
    	^true
    

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  9. You have been asked to create a simulation of an airport with a particular emphasis on modeling the flow of airplanes (e.g., how long does an airplane have to wait to land or to take-off?) Identify and Describe at least FIVE classes that you would need to (1) create the Problem Domain component and (2) create the Human Interface component.

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  10. 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:

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96

  11. Okay, you've sold them. WhizO is now starting several software development projects using an object-oriented approach. You've been hired as the Answer Person for the teams. Help the programmers with these problems:

    Post your answers, comments, questions, concerns, etc. here

    Discussion from 2390 WINTER '96