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

Fall01 Final Exam Review: Cellular Web-browser

Back to Final Exam Review - Fall2001



CFHserver
|
|
| hasA
URLdatabase
| xx
|
v 1
BCObject
| \
| \
v v
BCMLObject BCIObject

b) What other UML diagrams are there other than sequence diagrams? Are you refering to CRC cards?
CRC is not in UML. The other big one is UseCases. I'm pretty sure 2335 covers State Diagrams and collaboration diagrams. Webb


c)
store: objects forURLs: urls
1 to: objects size do: [:index |
    current _ objects at: index.
    (current isBCML) ifTrue: [
         database storeDocument: current forURL: (urls at: index).
    ] ifFalse: [
         database storeImage: current forURL: (urls at: index).
    ].
].

Matt Quigley

A)
uml_for_final.txt

B)
Choice: Sequence Diagram

What does it show?: a sequence of interaction between classes. This would show the process for storing a bcml document or bci using actual method calls from the system.

Why: Since we were given only the storing/retrieving region of the class diagram, it's really the only other UML diagram we can create accurately (or at least the only other one that would be accurate and INTERESTING). This would answer many initial questions raised when creating the class diagram (such as how to store and retrieve BCobjects). Not to mention, itís a set up for part C :-).

EW Looney


Should the URL dataBase talk to the BCObject? From the drawings of the two Umls above, it dosen't. But since it takes in a BCIObject or a BCMLObject, (granted that it is passed them via CFHServer) should not that alone make it talk to the BCObject directly. Perhaps it may need some info about the BCObject when it is storing it in the URL and as a result will have to acess some of the data. Or is it just a "dumb" class that just takes and stores? I would think that both CFHServer and URLDatabase will talk to BCObject.

Emeka Okonkwo
Doesn't do: in an OrderedCollection give you the object instead of the index? That's why doWithIndex: exists. Of course, I may be wrong.
-Brandon Yarbrough

Hahaha! You're right about that Bradon, I believe that do: does indeed give you the object and not the element. Wonder how i missed that too. OH well, here is the correction to Matts code:


c)
store: objects forURLs: urls
index := 0.
1 to: objects size do: [:current |
       index := objects indexOf:current.
    (current isBCML) ifTrue: [   
         database storeDocument: current forURL: (urls at: index).
    ] ifFalse: [
         database storeImage: current forURL: (urls at: index).
    ].
].


I believe this should work.

Or you could use doWithIndex instead of do: in original Matt code, like you said...though i never did see that method or use it...but i believe you.

Emeka Okonkwo


Even though the final's in 30 minutes, just wanted to say that the original code would be correct because 1 to: objects size do: [..] is equivalent to 1 to: 3 do: [..]. Try this code:

x _ OrderedCollection  new.
x add: '1'. x add: '2'. x add: '3'.
1 to: x size do: [:i | Transcript show: i printString.].


Matt Quigley


ewplore
explore

Link to this Page