正在加载图片...
6.001, Spring Semester, 2005--Quiz Il 11 Part 4 30 points This problem explores a small ob ject-oriented world, consist ing of Document s, Folders and Cabi- nets. The propert ies of the classes(defined by the code below are as follows a document is an object with a name, and a number of sheets a Folder is a collection of document s a Cabinet is a struct ure t hat can hold Folders It behaves as if it were a giant folder (define (crelte-dace dent nIde sneets) (crelte-instIhce dace dent nIde s neets)) (define ( dacedent self nlde sneets (let ((raat-pItt (raat-aohect self))) (dlke-nIndle ndacedent (dlk e-detnads ngAMe (IIdodd(nLde nIqyTALL (lIdodD( instiLled) IyHEETy (lLdodD()sneets)) raat-pIfrt))) (define (fal lf nlde) (let((raat-pIft (raat-aohect self)) (contents no)) dlke-nIdler nfalder (dke-detnmads gAME (ILCodD() nIde n :OqTEqTy (IIdodDO cantent s nADD-THIq3(IIdodD(tint (dp(ILcodD(tint)(Bsk tiint nqAME))ca nDO:UMEqTy(lIdodD() (fald-rit nrt +0 (drp (lIdodD(dac)s)cantents))) (crest (define (cloinet self nlde (let ((raat-pItt (raat-aohect self) (falder-pIft (falder self nLde))) dlke-detna ngAMe (lLdodD￾       ￾￾  !  )% 0 <%  % 0 17 ,& %%  %& %  07 %! ) %  ) %%% ?= 0. )  0,B  % ,%2 ￾   %  0 1 ,)  &   0  %)%! ￾   %    %! ￾  0 %  % )  ) %!  0)-% %   ,   ! ￾ ￾      ￾       ￾ ￾     ￾ ￾￾ ' ￾ )   ￾#    ￾#  *+,- ￾ ￾  "*./+00 ￾ ￾  .1--/. ￾ ￾   ' ￾ ￾   ￾ ￾￾ ' ￾ )   ￾  ￾ ￾#   ￾#  *+,- ￾ ￾  23*/-*/. ￾ ￾  +44 /1"*5 ￾ ￾ ￾  ￾    ￾' ￾ ￾ ￾#  *+,-  4326,-*/. ￾ ￾ ￾  ( & ￾' ￾ ￾ %   ' ￾ ￾    ￾     ￾ ￾    ￾ ￾￾ ' ￾ )   ￾ ' ￾   ￾#    ￾#  *+,- ￾ ￾ 
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有