[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
OO’s systems should be very easy to customize. Ideally, centralized controllers are verboten. If there are special cases, they need to be specializations in leaf classes.
So, this week, we’ll try to specialize the processing you wrote to last year.
Perform the weekly set up instructions for project 2, homework c. If you find that you are missing any files, copy them over from 2/b.
CAUTION: do not
cp 2/b/* as that may copy the magic .svn directory into 2/b (thus messing
up your repo). Copy them over the old-fashioned way (e.g. cp ../a/gold.lisp .
)
then svn add
them.
Report:
(main)
, this time
with the "dramatic chords" you code below;
deftest
s for all parts of the following.
At least five tests per team member spread out if files with member names.
Consider the following list of atoms in the sci fi grammar:
-> Understand extraGalactic AndAre WantSomething extraterestrial AndTakeAFewAndLeave WantWomen fallsIntoSun AndThen Which freezes Attack WhichEtc giant Beings Whichetc hungry ButEtc aCrowdOfPeasants invent Catestrophe aCuteLittleKidConvinces isAttackedBy Catestrophes aPriestTalksToThemOfGod isRescuedBy Collision almostEverybody isStruckByAGiant Denomument? and killed Denoument andAre lookUponUsAsASourceOfNo Denoument? andAreNot lunar DenoumentOrHappyEnding andIsDestroyed martian Dine andMagicallySaved misunderstandUs DoSomething andTheyDie not Earth andTheyGetMarriedAndLiv radioactive EndSadOrHappy andTheyLeave reptiles Ending andTheyTurnIntoDisgusti scientists Extraterestrial areFriendly soScientistsInventAWeap Floater asteroid soTheyEatUs GoOn be soTheyKillUs HappyEnding blobs soTheyPutUsUnderABenign Hungry bugs somePeople IsStressed burnsUp superbeings Killer but the Killers butIsSaved theAirForce PossibleMegaDeath butIsSavedBy theArmy Rescued butMisunderstood theAtomBomb Resuced butTheyDieFromCatchingA theCoastGuard Saved by theMarines Science can theNavy SeEtc cloud theyFallInLoveWithThisB Sizes comet tiny SoEtc dies understandUsAllTooWell Some discover us SomeOne earth wantOurWomen, SomeSaved eat whichFails Start enormous whichKillsThem TryToKill everybody whichTurnsThemIntoDisgu UnderStand everybodyDies who
Note that if some of these atoms are used in any Hollywood blockbuster, there there will be side-effects. For example:
Your job is to code up those side-effects, in an object-oriented manner.
(defun sidefx (sym fx) (setf (get sym 'fx) fx)) ;e.g. (sidefx 'butTheyDieFromCatchingACold "ah, tissue! (thud)") (sidefx 'PossibleMegaDeath}: "oh no!!! (screaming)")
Now you can check if a symbol has side effects;
(defun sidefxp (sym) "if no sidefex, just return empty string" (or (get sym 'fx nil) ""))
phrase->instance
function that generates
either *loud* or *humble* instances. Yes, this code will
need an "if" statement but "if"s outside of OO land are unavoidable.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 19, 2011 using texi2html 5.0.