Changeset 8406 in project


Ignore:
Timestamp:
02/12/08 08:30:00 (10 years ago)
Author:
felix
Message:

updated html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • yasos/yasos.html

    r8359 r8406  
    99
    1010
     11
     12 
    1113 
    1214 
     
    2830
    2931
     32
     33 
     34 
    3035 
    3136 
     
    5560
    5661
     62
    5763 
    5864<div>
     
    6672
    6773
     74
    6875   
    6976<p><span style="font-weight: bold; font-family: 'Arial';">yasos</span></p>
     
    7582
    7683
     84
    7785   
    7886<p>"Yet another Scheme Object System"</p>
     
    8492
    8593
    86    
    87 <p></p>
     94
     95   
     96<p></p>
     97
    8898
    8999
     
    95105   
    96106<p><span style="font-weight: bold; font-family: 'Arial';">Description:</span></p>
     107
    97108
    98109
     
    114125
    115126
    116    
    117 <p></p>
     127
     128   
     129<p></p>
     130
    118131
    119132
     
    132145
    133146
     147
    134148   
    135149<p><span style="font-family: 'Arial';">Kenneth Dickey</span></p>
     
    141155
    142156
     157
    143158   
    144159<p><span style="font-family: 'Arial';">ported to CHICKEN by Juergen Lorenz</span></p>
     
    150165
    151166
    152    
    153 <p></p>
     167
     168   
     169<p></p>
     170
    154171
    155172
     
    168185
    169186
     187
    170188   
    171189<ul>
     
    177195
    178196
     197
    179198    <li>&nbsp;<span style="font-family: 'Arial';">1.0 </span>    </li>
    180199
     
    185204
    186205
     206
    187207   
    188208</ul>
     
    194214
    195215
     216
    196217   
    197218<p style="margin-left: 0pt; text-indent: 0in;"><span style="font-weight: bold; font-family: 'Arial';">Usage:</span></p>
     
    203224
    204225
     226
    205227   
    206228<p style="margin-left: 0pt; text-indent: 0in;"><span style="font-style: italic; font-family: 'Arial';">(require-extension syntax-case yasos)</span></p>
     
    212234
    213235
     236
    214237   
    215238<p style="margin-left: 0pt; text-indent: 0in;"></p>
     
    221244
    222245
     246
    223247   
    224248<p style="margin-left: 0pt; text-indent: 0in;"><span style="font-weight: bold; font-family: 'Arial';">Download:</span></p>
     
    230254
    231255
     256
    232257   
    233258<p style="margin-left: 0pt; text-indent: 0in;"><span style="font-family: 'Arial';">yasos.egg</span></p>
     
    239264
    240265
     266
    241267   
    242268<p style="margin-left: 0pt; text-indent: 0in;"></p>
     
    248274
    249275
     276
    250277   
    251278<p style="margin-left: 0pt; text-indent: 0in;"><span style="font-weight: bold; font-family: 'Arial';">Documentation:</span></p>
     
    257284
    258285
     286
    259287   
    260288<p style="margin-left: 0pt; text-indent: 0in;"></p>
     
    266294
    267295
     296
    268297   
    269298<ul>
     
    275304
    276305
     306
    277307    <li>&nbsp;<span style="font-family: 'Arial';">(define-operation (opname self arg ...) default-body)</span></li>
    278308
     
    283313
    284314
     315
    285316    <li>&nbsp;<span style="font-family: 'Arial';">(define-predicate opname)</span></li>
    286317
     
    291322
    292323
     324
    293325    <li>&nbsp;<span style="font-family: 'Arial';">(object ((name self arg ...) body) ...)</span></li>
    294326
     
    299331
    300332
     333
    301334    <li>&nbsp;<span style="font-family: 'Arial';">(object-with-ancestors ((ancestor1 init1) ...) operation ...)</span></li>
    302335
     
    307340
    308341
     342
    309343    <li>&nbsp;<span style="font-family: 'Arial';">(operate-as component operation self arg ...)</span>&nbsp;    </li>
    310344
     
    315349
    316350
     351
    317352   
    318353</ul>
     
    324359
    325360
    326    
    327 <p></p>
     361
     362   
     363<p></p>
     364
    328365
    329366
     
    335372   
    336373<p style="text-align: left; margin-right: 0in;"><span style="font-weight: bold; font-family: 'Arial';">Examples:</span></p>
    337 
    338 
    339 
    340 
    341 <p style="text-align: left; margin-right: 0in; font-style: italic;"><span style="font-family: 'Arial';">;;; file yasos-examples.scm</span></p>
    342 
    343 
    344 
    345 
    346 
    347 
    348 
    349    
    350     <span style="font-style: italic;">(declare (unit yasos-examples))<br>
    351 
    352 
    353 
    354 
    355 (require-extension syntax-case yasos format)<br style="font-style: italic;">
    356 
    357 
    358 
    359 
    360 </span>
    361 <span style="font-style: italic;">&nbsp;</span><span style="text-decoration: underline;"></span><br>
    362 
    363 
    364 
    365 
    366 <p style="text-align: left; margin-right: 0in;">;;---------------------</p>
    367 
    368 
    369 
    370 
    371 
    372 
    373 
    374    
    375 <p style="text-align: left; margin-right: 0in;">;; general operations</p>
    376 
    377 
    378 
    379 
    380 
    381 
    382 
    383    
    384 <p style="text-align: left; margin-right: 0in;">;;---------------------</p>
     374;;;===============<br>
     375;;;file yasos-examples.scm<br>
     376;;;===============<br>
     377<br>
     378(declare (unit yasos-examples))<br>
     379(require-extension syntax-case yasos format)<br>
     380<br>
     381;;----------------------------<br>
     382;; general operations<br>
     383;;----------------------------<br>
     384<br>
     385(define-operation (print-obj obj port)<br>
     386&nbsp; (format port<br>
     387&nbsp;&nbsp;&nbsp; ;; if an instance does not have a print-obj operation..<br>
     388&nbsp;&nbsp;&nbsp; (if (instance? obj) "#&lt;INSTANCE&gt;~%" "#&lt;NOT-AN-INSTANCE: ~s&gt;~%") obj))<br>
     389<br>
     390(define-operation (size-obj obj)<br>
     391&nbsp; ;; default behavior<br>
     392&nbsp; (cond<br>
     393&nbsp;&nbsp;&nbsp; ((vector? obj) (vector-length obj))<br>
     394&nbsp;&nbsp;&nbsp; ((list? obj) (length obj))<br>
     395&nbsp;&nbsp;&nbsp; ((pair? obj) 2)<br>
     396&nbsp;&nbsp;&nbsp; ((string? obj) (string-length obj))<br>
     397&nbsp;&nbsp;&nbsp; ((char? obj) 1)<br>
     398&nbsp;&nbsp;&nbsp; (else<br>
     399&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (error "Operation not supported: size-obj" obj))))<br>
     400<br>
     401;;----------------------<br>
     402;; point interface<br>
     403;;----------------------<br>
     404<br>
     405(define-predicate point?) ;; answers #f&nbsp; by default<br>
     406(define-operation (x obj))<br>
     407(define-operation (y obj))<br>
     408(define-operation (set-x! obj new-x))<br>
     409(define-operation (set-y! obj new-y))<br>
     410<br>
     411;;--------------------------------<br>
     412;; point implementation<br>
     413;;--------------------------------<br>
     414<br>
     415(define (make-point the-x the-y)<br>
     416&nbsp; (object<br>
     417&nbsp;&nbsp;&nbsp; ((point? self) #t) ;; yes, this is a point object<br>
     418&nbsp;&nbsp;&nbsp; ((x self) the-x)<br>
     419&nbsp;&nbsp;&nbsp; ((y self) the-y)<br>
     420&nbsp;&nbsp;&nbsp; ((set-x! self val)<br>
     421&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! the-x val)<br>
     422&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the-x)<br>
     423&nbsp;&nbsp;&nbsp; ((set-y! self val)<br>
     424&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! the-y val)<br>
     425&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the-y)<br>
     426&nbsp;&nbsp;&nbsp; ((size-obj self) 2)<br>
     427&nbsp;&nbsp;&nbsp; ((print-obj self port)<br>
     428&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format port "#&lt;point: ~a ~a&gt;~%" (x self) (y self)))))<br>
     429<br>
     430;;-----------------------------------------<br>
     431;; 3D point interface additions<br>
     432;;-----------------------------------------<br>
     433<br>
     434(define-predicate point-3d?) ;; #f by defualt<br>
     435(define-operation (z obj))<br>
     436(define-operation (set-z! obj new-z))<br>
     437<br>
     438;;------------------------------------<br>
     439;; 3D point implementation<br>
     440;;------------------------------------<br>
     441<br>
     442(define (make-point-3d the-x the-y the-z)<br>
     443&nbsp; (object-with-ancestors ( (a-point (make-point the-x the-y)) )<br>
     444&nbsp;&nbsp;&nbsp; ((point-3d? self) #t)<br>
     445&nbsp;&nbsp;&nbsp; ((z self) the-z)<br>
     446&nbsp;&nbsp;&nbsp; ((set-z! self val) (set! the-z val) the-z)<br>
     447&nbsp;&nbsp;&nbsp; ;; override inherited size-obj and print-obj operations<br>
     448&nbsp;&nbsp;&nbsp; ((size-obj self) 3)<br>
     449&nbsp;&nbsp;&nbsp; ((print-obj self port)<br>
     450&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format port "#&lt;3d-point: ~a ~a ~a&gt;~%" (x self) (y self) (z self)))))<br>
     451<br>
     452;;;-----------------------<br>
     453;; person interface<br>
     454;;------------------------<br>
     455<br>
     456(define-predicate person?)<br>
     457(define-operation (name obj))<br>
     458(define-operation (age obj))<br>
     459(define-operation (set-age! obj new-age))<br>
     460(define-operation (ssn obj password)) ;; Social Security # is protected<br>
     461(define-operation (new-password obj old-passwd new-passwd))<br>
     462(define-operation (bad-password obj bogus-passwd)<br>
     463&nbsp; ;; assume internal (design) error<br>
     464&nbsp; (error (format #f "Bad Password: ~s given to ~a~%"<br>
     465&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bogus-passwd<br>
     466&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj obj #f))))<br>
     467<br>
     468;;----------------------------------<br>
     469;; person implementation<br>
     470;;----------------------------------<br>
     471<br>
     472(define (make-person a-name an-age a-ssn the-password)<br>
     473&nbsp; (object<br>
     474&nbsp;&nbsp;&nbsp; ((person? self) #t)<br>
     475&nbsp;&nbsp;&nbsp; ((name self) a-name)<br>
     476&nbsp;&nbsp;&nbsp; ((age self) an-age)<br>
     477&nbsp;&nbsp;&nbsp; ((set-age! self val) (set! an-age val) an-age)<br>
     478&nbsp;&nbsp;&nbsp; ((ssn self password)<br>
     479&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (equal? password the-password)<br>
     480&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a-ssn<br>
     481&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bad-password self password)))<br>
     482&nbsp;&nbsp;&nbsp; ((new-password self old-passwd new-passwd)<br>
     483&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cond<br>
     484&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((equal? old-passwd the-password) (set! the-password new-passwd) self)<br>
     485&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (else (bad-password self old-passwd))))<br>
     486&nbsp;&nbsp;&nbsp; ((bad-password self bogus-passwd)<br>
     487&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format #t "Bad password: ~s~%" bogus-passwd)) ;; let user recover<br>
     488&nbsp;&nbsp;&nbsp; ((print-obj self port)<br>
     489&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format port "#&lt;Person: ~a age: ~a&gt;~%" (name self) (age self)))))<br>
     490<br>
     491;;;---------------------------------------------------------------<br>
     492;; account-history and bank-account interfaces<br>
     493;;----------------------------------------------------------------<br>
     494<br>
     495(define-predicate bank-account?)<br>
     496(define-operation (current-balance obj pin))<br>
     497(define-operation (add obj amount))<br>
     498(define-operation (withdraw obj amount pin))<br>
     499(define-operation (get-pin obj master-password))<br>
     500(define-operation (get-account-history obj master-password))<br>
     501<br>
     502;;----------------------------------------------<br>
     503;; account-history implementation<br>
     504;;----------------------------------------------<br>
     505<br>
     506;; put access to bank database and report generation here<br>
     507(define (make-account-history initial-balance a-pin master-password)<br>
     508&nbsp; ;; history is a simple list of balances -- no transaction times<br>
     509&nbsp; (letrec <br>
     510&nbsp;&nbsp;&nbsp; ((history (list initial-balance))<br>
     511&nbsp;&nbsp;&nbsp;&nbsp; (balance (lambda () (car history))) ; balance is a function<br>
     512&nbsp;&nbsp;&nbsp;&nbsp; (remember<br>
     513&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (lambda (datum) (set! history (cons datum history)))))<br>
     514&nbsp;&nbsp;&nbsp; (object<br>
     515&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((bank-account? self) #t)<br>
     516&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((add self amount) ;; bank will accept money without a password<br>
     517&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (remember (+ amount (balance)))<br>
     518&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; print new balance<br>
     519&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format #t "New balance: $~a~%" (balance)))<br>
     520&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((withdraw self amount pin)<br>
     521&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (cond<br>
     522&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((not (equal? pin a-pin)) (bad-password self pin))<br>
     523&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((&lt; (- (balance) amount) 0)<br>
     524&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format <br>
     525&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #t<br>
     526&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     527"No overdraft~% Can't withdraw more than you have: $~a~%"<br>
     528&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (balance)))<br>
     529&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (else<br>
     530&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (remember (- (balance) amount))<br>
     531&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format #t "New balance: $~a~%" (balance)))))<br>
     532&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((current-balance self password)<br>
     533&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (or (eq? password master-password) (equal? password a-pin))<br>
     534&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format #t "Your Balance is $~a~%" (balance))<br>
     535&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bad-password self password)))<br>
     536&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;; only bank has access to account history<br>
     537&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((get-account-history self password)<br>
     538&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (eq? password master-password)<br>
     539&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; history<br>
     540&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bad-password self password))))))<br>
     541<br>
     542;;;------------------------------------------<br>
     543;; bank-account implementation<br>
     544;;-------------------------------------------<br>
     545<br>
     546(define (make-account a-name an-age a-ssn a-pin initial-balance master-password)<br>
     547&nbsp; (object-with-ancestors<br>
     548&nbsp;&nbsp;&nbsp; ((customer (make-person a-name an-age a-ssn a-pin))<br>
     549&nbsp;&nbsp;&nbsp;&nbsp; (account (make-account-history initial-balance a-pin master-password)))<br>
     550&nbsp;&nbsp;&nbsp; ((get-pin self password)<br>
     551&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (if (eq? password master-password)<br>
     552&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a-pin<br>
     553&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bad-password self password)))<br>
     554&nbsp;&nbsp;&nbsp; ((get-account-history self password)<br>
     555&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (operate-as account get-account-history self password))<br>
     556&nbsp;&nbsp;&nbsp; ;; our bank is very conservative...<br>
     557&nbsp;&nbsp;&nbsp; ((bad-password self bogus-passwd)<br>
     558&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format #t "~%CALL THE POLICE!!~%"))<br>
     559&nbsp;&nbsp;&nbsp; ;; protect the customer as well<br>
     560&nbsp;&nbsp;&nbsp; ((ssn self password)<br>
     561&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (operate-as customer ssn self password))<br>
     562&nbsp;&nbsp;&nbsp; ((print-obj self port)<br>
     563&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (format port "#&lt;Bank-Customer ~a&gt;~%" (name self)))))<br>
     564<br>
     565;;; eof yasos-examples.scm<br>
     566<br>
     567<p style="text-align: left; margin-right: 0in;">;;;============<br>
     568;;; file: yasos-test.scm<br>
     569;;;============</p>
     570<p style="text-align: left; margin-right: 0in;">(declare (uses yasos-examples))<br>
     571(define main<br>
     572&nbsp; (lambda ()<br>
     573&nbsp;&nbsp;&nbsp; (let<br>
     574&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((p2 (make-point 1 2))<br>
     575&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (p3 (make-point-3d 4 5 6))<br>
     576&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (fred&nbsp; (make-person&nbsp; "Fred"&nbsp; 19 "573-19-4279" 'FadeCafe))<br>
     577&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (sally (make-account "Sally" 26 "629-26-9742" 'FeedBabe 263 'bank-password)))<br>
     578&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "(size-obj p2) =&gt; ~a (size-obj p3) =&gt; ~a~%" (size-obj p2) (size-obj p3))<br>
     579&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj 'mist #t)<br>
     580&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj p2 #t)<br>
     581&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "(point? p2) =&gt; ~A (point-3d? p2) =&gt; ~A~%" (point? p2) (point-3d? p2))<br>
     582&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj p3 #t)<br>
     583&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "(point? p3) =&gt; ~A (point-3d? p3) =&gt; ~A~%" (point? p3) (point-3d? p3))<br>
     584&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj fred #t)<br>
     585&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Fred's ssn: ~a~%" (ssn fred 'FadeCafe))<br>
     586&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Fred: person? ~a bank-account? ~a~%" (person? fred) (bank-account? fred))<br>
     587&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print-obj sally #t)<br>
     588&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Sally's&nbsp; ssn: ~a~%" (ssn sally 'FeedBabe))<br>
     589&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Sally: person? ~a bank-account? ~a~%" (person? sally) (bank-account? sally))<br>
     590&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (current-balance sally 'FeedBabe)<br>
     591&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (add sally 200)<br>
     592&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (add sally 300)<br>
     593&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (withdraw sally 400 'FeedBabe)<br>
     594&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Account history of Sally: ~a~%" (get-account-history sally 'bank-password))<br>
     595&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (withdraw sally 150 (get-pin sally 'bank-password))<br>
     596&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Account history of Sally: ~a~%" (get-account-history sally 'bank-password))<br>
     597&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Bad password for Fred:~%")<br>
     598&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ssn fred 'bogus)<br>
     599&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (printf "Bad password for Sally:")<br>
     600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ssn sally 'bogus)<br>
     601&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (void) <br>
     602) ) )&nbsp;&nbsp; <br>
     603</p>
     604<p style="text-align: left; margin-right: 0in;">(main)</p>
     605<p style="text-align: left; margin-right: 0in;">;;; eof yasos-test.scm<br>
     606</p>
     607
    385608
    386609
     
    399622
    400623
    401    
    402 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (print-obj obj port) </span></p>
    403 
    404 
    405 
    406 
    407 
    408 
    409 
    410    
    411 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;"> &nbsp;&nbsp;&nbsp; (format port </span></p>
    412 
    413 
    414 
    415 
    416 
    417 
    418 
    419    
    420 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;"> &nbsp;&nbsp;&nbsp;&nbsp; ;; if an instance does not have a print-obj operation..</span></p>
    421 
    422 
    423 
    424 
    425 
    426 
    427 
    428    
    429 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;"> &nbsp;&nbsp;&nbsp;&nbsp; (if (instance? obj) "#&lt;INSTANCE&gt;~%" "#&lt;NOT-AN-INSTANCE: ~s&gt;~%") </span></p>
    430 
    431 
    432 
    433 
    434 
    435 
    436 
    437    
    438 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;"> &nbsp;&nbsp;&nbsp;&nbsp; obj))</span></p>
    439 
    440 
    441 
    442 
    443 
    444 
    445 
    446    
    447 <p style="text-align: left; margin-right: 0in;"></p>
    448 
    449 
    450 
    451 
    452 
    453 
    454 
    455    
    456 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (size-obj obj)</span></p>
    457 
    458 
    459 
    460 
    461 
    462 
    463 
    464    
    465 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ;; default behavior</span></p>
    466 
    467 
    468 
    469 
    470 
    471 
    472 
    473    
    474 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (cond </span></p>
    475 
    476 
    477 
    478 
    479 
    480 
    481 
    482    
    483 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((vector? obj) (vector-length obj))</span></p>
    484 
    485 
    486 
    487 
    488 
    489 
    490 
    491    
    492 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((list? obj) (length obj))</span></p>
    493 
    494 
    495 
    496 
    497 
    498 
    499 
    500    
    501 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; ((pair? obj) 2)</span></p>
    502 
    503 
    504 
    505 
    506 
    507 
    508 
    509    
    510 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; ((string? obj) (string-length obj))</span></p>
    511 
    512 
    513 
    514 
    515 
    516 
    517 
    518    
    519 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((char? obj) 1)</span></p>
    520 
    521 
    522 
    523 
    524 
    525 
    526 
    527    
    528 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (else </span></p>
    529 
    530 
    531 
    532 
    533 
    534 
    535 
    536    
    537 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; (error "Operation not supported: size-obj" obj))))</span></p>
    538 
    539 
    540 
    541 
    542 
    543 
    544 
    545    
    546 <p style="text-align: left; margin-right: 0in;"></p>
    547 
    548 
    549 
    550 
    551 
    552 
    553 
    554    
    555 <p style="text-align: left; margin-right: 0in;"></p>
    556 
    557 
    558 
    559 
    560 
    561 
    562 
    563    
    564 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;----------------</span></p>
    565 
    566 
    567 
    568 
    569 
    570 
    571 
    572    
    573 <p style="text-align: left; margin-right: 0in;">;; point interface</p>
    574 
    575 
    576 
    577 
    578 
    579 
    580 
    581    
    582 <p style="text-align: left; margin-right: 0in;">;;----------------</p>
    583 
    584 
    585 
    586 
    587 
    588 
    589 
    590    
    591 <p style="text-align: left; margin-right: 0in;"></p>
    592 
    593 
    594 
    595 
    596 
    597 
    598 
    599    
    600 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-predicate point?) ;; answers #f&nbsp; by default</span></p>
    601 
    602 
    603 
    604 
    605 
    606 
    607 
    608    
    609 <p style="text-align: left; margin-right: 0in; font-style: italic;">(define-operation (x obj))</p>
    610 
    611 
    612 
    613 
    614 <p style="text-align: left; margin-right: 0in; font-style: italic;">(define-operation (y obj))</p>
    615 
    616 
    617 
    618 
    619 <p style="text-align: left; margin-right: 0in; font-style: italic;">(define-operation (set-x! obj new-x))</p>
    620 
    621 
    622 
    623 
    624 <p style="text-align: left; margin-right: 0in; font-style: italic;">(define-operation (set-y! obj new-y))</p>
    625 
    626 
    627 
    628 
    629 
    630 
    631 
    632    
    633 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;---------------------</span></p>
    634 
    635 
    636 
    637 
    638 
    639 
    640 
    641    
    642 <p style="text-align: left; margin-right: 0in;">;; point implementation</p>
    643 
    644 
    645 
    646 
    647 
    648 
    649 
    650    
    651 <p style="text-align: left; margin-right: 0in;">;;---------------------</p>
    652 
    653 
    654 
    655 
    656 
    657 
    658 
    659    
    660 <p style="text-align: left; margin-right: 0in;"></p>
    661 
    662 
    663 
    664 
    665 
    666 
    667 
    668    
    669 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define (make-point the-x the-y)</span></p>
    670 
    671 
    672 
    673 
    674 
    675 
    676 
    677    
    678 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (object</span></p>
    679 
    680 
    681 
    682 
    683 
    684 
    685 
    686    
    687 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((point? self) #t) ;; yes, this is a point object</span></p>
    688 
    689 
    690 
    691 
    692 
    693 
    694 
    695    
    696 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((x self) the-x)</span></p>
    697 
    698 
    699 
    700 
    701 
    702 
    703 
    704    
    705 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((y self) the-y)</span></p>
    706 
    707 
    708 
    709 
    710 
    711 
    712 
    713    
    714 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((set-x! self val)</span></p>
    715 
    716 
    717 
    718 
    719 
    720 
    721 
    722    
    723 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (set! the-x val)</span></p>
    724 
    725 
    726 
    727 
    728 
    729 
    730 
    731    
    732 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; the-x)</span></p>
    733 
    734 
    735 
    736 
    737 
    738 
    739 
    740    
    741 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((set-y! self val)</span></p>
    742 
    743 
    744 
    745 
    746 
    747 
    748 
    749    
    750 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (set! the-y val)</span></p>
    751 
    752 
    753 
    754 
    755 
    756 
    757 
    758    
    759 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; the-y)</span></p>
    760 
    761 
    762 
    763 
    764 
    765 
    766 
    767    
    768 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((size-obj self) 2)</span></p>
    769 
    770 
    771 
    772 
    773 
    774 
    775 
    776    
    777 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((print-obj self port)</span></p>
    778 
    779 
    780 
    781 
    782 
    783 
    784 
    785    
    786 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format port "#&lt;point: ~a ~a&gt;~%" (x self) (y self)))))</span></p>
    787 
    788 
    789 
    790 
    791 
    792 
    793 
    794    
    795 <p style="text-align: left; margin-right: 0in;"></p>
    796 
    797 
    798 
    799 
    800 
    801 
    802 
    803    
    804 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;-----------------------------</span></p>
    805 
    806 
    807 
    808 
    809 
    810 
    811 
    812    
    813 <p style="text-align: left; margin-right: 0in;">;; 3D point interface additions</p>
    814 
    815 
    816 
    817 
    818 
    819 
    820 
    821    
    822 <p style="text-align: left; margin-right: 0in;">;;-----------------------------</p>
    823 
    824 
    825 
    826 
    827 
    828 
    829 
    830    
    831 <p style="text-align: left; margin-right: 0in;"></p>
    832 
    833 
    834 
    835 
    836 
    837 
    838 
    839    
    840 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-predicate point-3d?) ;; #f by defualt</span></p>
    841 
    842 
    843 
    844 
    845 
    846 
    847 
    848    
    849 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (z obj))</span></p>
    850 
    851 
    852 
    853 
    854 
    855 
    856 
    857    
    858 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (set-z! obj new-z))</span></p>
    859 
    860 
    861 
    862 
    863 
    864 
    865 
    866    
    867 <p style="text-align: left; margin-right: 0in;"></p>
    868 
    869 
    870 
    871 
    872 
    873 
    874 
    875    
    876 <p style="text-align: left; margin-right: 0in;"></p>
    877 
    878 
    879 
    880 
    881 
    882 
    883 
    884    
    885 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;------------------------</span></p>
    886 
    887 
    888 
    889 
    890 
    891 
    892 
    893    
    894 <p style="text-align: left; margin-right: 0in;">;; 3D point implementation</p>
    895 
    896 
    897 
    898 
    899 
    900 
    901 
    902    
    903 <p style="text-align: left; margin-right: 0in;">;;------------------------</p>
    904 
    905 
    906 
    907 
    908 
    909 
    910 
    911    
    912 <p style="text-align: left; margin-right: 0in;"></p>
    913 
    914 
    915 
    916 
    917 
    918 
    919 
    920    
    921 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define (make-point-3d the-x the-y the-z)</span></p>
    922 
    923 
    924 
    925 
    926 
    927 
    928 
    929    
    930 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (object-with-ancestors ( (a-point (make-point the-x the-y)) )</span></p>
    931 
    932 
    933 
    934 
    935 
    936 
    937 
    938    
    939 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((point-3d? self) #t)</span></p>
    940 
    941 
    942 
    943 
    944 
    945 
    946 
    947    
    948 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((z self) the-z)</span></p>
    949 
    950 
    951 
    952 
    953 
    954 
    955 
    956    
    957 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((set-z! self val) (set! the-z val) the-z)</span></p>
    958 
    959 
    960 
    961 
    962 
    963 
    964 
    965    
    966 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;; override inherited size-obj and print-obj operations</span></p>
    967 
    968 
    969 
    970 
    971 
    972 
    973 
    974    
    975 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((size-obj self) 3)</span></p>
    976 
    977 
    978 
    979 
    980 
    981 
    982 
    983    
    984 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((print-obj self port)</span></p>
    985 
    986 
    987 
    988 
    989 
    990 
    991 
    992    
    993 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    994 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format port "#&lt;3d-point: ~a
    995 ~a ~a&gt;~%" (x self) (y self) (z self)))))</span></p>
    996 
    997 
    998 
    999 
    1000 
    1001 
    1002 
    1003    
    1004 <p style="text-align: left; margin-right: 0in;"></p>
    1005 
    1006 
    1007 
    1008 
    1009 <p style="text-align: left; margin-right: 0in;"></p>
    1010 
    1011 
    1012 
    1013 
    1014 
    1015 
    1016 <p style="text-align: left; margin-right: 0in;">;;------------------</p>
    1017 
    1018 
    1019 
    1020 
    1021 
    1022 
    1023 
    1024    
    1025 <p style="text-align: left; margin-right: 0in;">;; person interface</p>
    1026 
    1027 
    1028 
    1029 
    1030 
    1031 
    1032 
    1033    
    1034 <p style="text-align: left; margin-right: 0in;">;;------------------</p>
    1035 
    1036 
    1037 
    1038 
    1039 
    1040 
    1041 
    1042    
    1043 <p style="text-align: left; margin-right: 0in;"></p>
    1044 
    1045 
    1046 
    1047 
    1048 
    1049 
    1050 
    1051    
    1052 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-predicate person?)</span></p>
    1053 
    1054 
    1055 
    1056 
    1057 
    1058 
    1059 
    1060    
    1061 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (name obj))</span></p>
    1062 
    1063 
    1064 
    1065 
    1066 
    1067 
    1068 
    1069    
    1070 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (age obj))</span></p>
    1071 
    1072 
    1073 
    1074 
    1075 
    1076 
    1077 
    1078    
    1079 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (set-age! obj new-age))</span></p>
    1080 
    1081 
    1082 
    1083 
    1084 
    1085 
    1086 
    1087    
    1088 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (ssn obj password)) ;; Social Security # is protected</span></p>
    1089 
    1090 
    1091 
    1092 
    1093 
    1094 
    1095 
    1096    
    1097 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (new-password obj old-passwd new-passwd))</span></p>
    1098 
    1099 
    1100 
    1101 
    1102 
    1103 
    1104 
    1105    
    1106 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (bad-password obj bogus-passwd)</span></p>
    1107 
    1108 
    1109 
    1110 
    1111 
    1112 
    1113 
    1114    
    1115 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ;; assume internal (design) error</span></p>
    1116 
    1117 
    1118 
    1119 
    1120 
    1121 
    1122 
    1123    
    1124 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (error (format #f "Bad Password: ~s given to ~a~%" </span></p>
    1125 
    1126 
    1127 
    1128 
    1129 
    1130 
    1131 
    1132    
    1133 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; bogus-passwd</span></p>
    1134 
    1135 
    1136 
    1137 
    1138 
    1139 
    1140 
    1141    
    1142 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (print-obj obj #f))))</span></p>
    1143 
    1144 
    1145 
    1146 
    1147 
    1148 
    1149 
    1150    
    1151 <p style="text-align: left; margin-right: 0in;"></p>
    1152 
    1153 
    1154 
    1155 
    1156 
    1157 
    1158 
    1159    
    1160 <p style="text-align: left; margin-right: 0in;">;;----------------------</p>
    1161 
    1162 
    1163 
    1164 
    1165 
    1166 
    1167 
    1168    
    1169 <p style="text-align: left; margin-right: 0in;">;; person implementation</p>
    1170 
    1171 
    1172 
    1173 
    1174 
    1175 
    1176 
    1177    
    1178 <p style="text-align: left; margin-right: 0in;">;;----------------------</p>
    1179 
    1180 
    1181 
    1182 
    1183 
    1184 
    1185 
    1186    
    1187 <p style="text-align: left; margin-right: 0in;"></p>
    1188 
    1189 
    1190 
    1191 
    1192 
    1193 
    1194 
    1195    
    1196 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define (make-person a-name an-age a-ssn the-password)</span></p>
    1197 
    1198 
    1199 
    1200 
    1201 
    1202 
    1203 
    1204    
    1205 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (object</span></p>
    1206 
    1207 
    1208 
    1209 
    1210 
    1211 
    1212 
    1213    
    1214 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((person? self) #t)</span></p>
    1215 
    1216 
    1217 
    1218 
    1219 
    1220 
    1221 
    1222    
    1223 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((name self) a-name)</span></p>
    1224 
    1225 
    1226 
    1227 
    1228 
    1229 
    1230 
    1231    
    1232 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((age self) an-age)</span></p>
    1233 
    1234 
    1235 
    1236 
    1237 
    1238 
    1239 
    1240    
    1241 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((set-age! self val) (set! an-age val) an-age)</span></p>
    1242 
    1243 
    1244 
    1245 
    1246 
    1247 
    1248 
    1249    
    1250 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((ssn self password)</span></p>
    1251 
    1252 
    1253 
    1254 
    1255 
    1256 
    1257 
    1258    
    1259 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (if (equal? password the-password)</span></p>
    1260 
    1261 
    1262 
    1263 
    1264 
    1265 
    1266 
    1267    
    1268 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a-ssn</span></p>
    1269 
    1270 
    1271 
    1272 
    1273 
    1274 
    1275 
    1276    
    1277 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (bad-password self password)))</span></p>
    1278 
    1279 
    1280 
    1281 
    1282 
    1283 
    1284 
    1285    
    1286 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((new-password self old-passwd new-passwd)</span></p>
    1287 
    1288 
    1289 
    1290 
    1291 
    1292 
    1293 
    1294    
    1295 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (cond</span></p>
    1296 
    1297 
    1298 
    1299 
    1300 
    1301 
    1302 
    1303    
    1304 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1305 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((equal?
    1306 old-passwd the-password) (set! the-password new-passwd) self)</span></p>
    1307 
    1308 
    1309 
    1310 
    1311 
    1312 
    1313 
    1314    
    1315 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (else (bad-password self old-passwd))))</span></p>
    1316 
    1317 
    1318 
    1319 
    1320 
    1321 
    1322 
    1323    
    1324 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((bad-password self bogus-passwd)</span></p>
    1325 
    1326 
    1327 
    1328 
    1329 
    1330 
    1331 
    1332    
    1333 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format #t "Bad password: ~s~%" bogus-passwd)) ;; let user recover</span></p>
    1334 
    1335 
    1336 
    1337 
    1338 
    1339 
    1340 
    1341    
    1342 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((print-obj self port)</span></p>
    1343 
    1344 
    1345 
    1346 
    1347 
    1348 
    1349 
    1350    
    1351 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format port "#&lt;Person: ~a age: ~a&gt;~%" (name self) (age self)))))</span></p>
    1352 
    1353 
    1354 
    1355 
    1356 
    1357 
    1358 
    1359    
    1360 <p style="text-align: left; margin-right: 0in;"></p>
    1361 
    1362 
    1363 
    1364 
    1365 
    1366 
    1367 
    1368    
    1369 <p style="text-align: left; margin-right: 0in;"></p>
    1370 
    1371 
    1372 
    1373 
    1374 
    1375 
    1376 
    1377    
    1378 <p style="text-align: left; margin-right: 0in;">;;------------------------------------------------</p>
    1379 
    1380 
    1381 
    1382 
    1383 
    1384 
    1385 
    1386    
    1387 <p style="text-align: left; margin-right: 0in;">;; account-history and bank-account interfaces</p>
    1388 
    1389 
    1390 
    1391 
    1392 
    1393 
    1394 
    1395    
    1396 <p style="text-align: left; margin-right: 0in;">;;------------------------------------------------</p>
    1397 
    1398 
    1399 
    1400 
    1401 
    1402 
    1403 
    1404    
    1405 <p style="text-align: left; margin-right: 0in;"></p>
    1406 
    1407 
    1408 
    1409 
    1410 
    1411 
    1412 
    1413    
    1414 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-predicate bank-account?)</span></p>
    1415 
    1416 
    1417 
    1418 
    1419 
    1420 
    1421 
    1422    
    1423 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (current-balance obj pin))</span></p>
    1424 
    1425 
    1426 
    1427 
    1428 
    1429 
    1430 
    1431    
    1432 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (add obj amount))</span></p>
    1433 
    1434 
    1435 
    1436 
    1437 
    1438 
    1439 
    1440    
    1441 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (withdraw obj amount pin))</span></p>
    1442 
    1443 
    1444 
    1445 
    1446 
    1447 
    1448 
    1449    
    1450 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (get-pin obj master-password))</span></p>
    1451 
    1452 
    1453 
    1454 
    1455 
    1456 
    1457 
    1458    
    1459 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define-operation (get-account-history obj master-password))</span></p>
    1460 
    1461 
    1462 
    1463 
    1464 
    1465 
    1466 
    1467    
    1468 <p style="text-align: left; margin-right: 0in;"></p>
    1469 
    1470 
    1471 
    1472 
    1473 
    1474 
    1475 
    1476    
    1477 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;-------------------------------</span></p>
    1478 
    1479 
    1480 
    1481 
    1482 
    1483 
    1484 
    1485    
    1486 <p style="text-align: left; margin-right: 0in;">;; account-history implementation</p>
    1487 
    1488 
    1489 
    1490 
    1491 
    1492 
    1493 
    1494    
    1495 <p style="text-align: left; margin-right: 0in;">;;-------------------------------</p>
    1496 
    1497 
    1498 
    1499 
    1500 
    1501 
    1502 
    1503    
    1504 <p style="text-align: left; margin-right: 0in;">;; put access to bank database and report generation here</p>
    1505 
    1506 
    1507 
    1508 
    1509 
    1510 
    1511 
    1512    
    1513 <p style="text-align: left; margin-right: 0in;"></p>
    1514 
    1515 
    1516 
    1517 
    1518 
    1519 
    1520 
    1521    
    1522 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define (make-account-history initial-balance a-pin master-password)</span></p>
    1523 
    1524 
    1525 
    1526 
    1527 
    1528 
    1529 
    1530    
    1531 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; ;; history is a simple list of balances -- no transaction times</span></p>
    1532 
    1533 
    1534 
    1535 
    1536 
    1537 
    1538 
    1539    
    1540 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (letrec&nbsp;</span></p>
    1541 
    1542 
    1543 
    1544 
    1545 
    1546 
    1547 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((history (list initial-balance)) </span></p>
    1548 
    1549 
    1550 
    1551 
    1552 
    1553 
    1554 
    1555    
    1556 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; (balance (lambda () (car history))) ; balance is a function</span></p>
    1557 
    1558 
    1559 
    1560 
    1561 
    1562 
    1563 
    1564    
    1565 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (remember </span></p>
    1566 
    1567 
    1568 
    1569 
    1570 
    1571 
    1572 
    1573    
    1574 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (lambda (datum) (set! history (cons datum history)))))</span></p>
    1575 
    1576 
    1577 
    1578 
    1579 
    1580 
    1581 
    1582    
    1583 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (object</span></p>
    1584 
    1585 
    1586 
    1587 
    1588 
    1589 
    1590 
    1591    
    1592 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((bank-account? self) #t)</span></p>
    1593 
    1594 
    1595 
    1596 
    1597 
    1598 
    1599 
    1600    
    1601 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((add self amount) ;; bank will accept money without a password</span></p>
    1602 
    1603 
    1604 
    1605 
    1606 
    1607 
    1608 
    1609    
    1610 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (remember (+ amount (balance)))</span></p>
    1611 
    1612 
    1613 
    1614 
    1615 
    1616 
    1617 
    1618    
    1619 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;; print new balance</span></p>
    1620 
    1621 
    1622 
    1623 
    1624 
    1625 
    1626 
    1627    
    1628 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format #t "New balance: $~a~%" (balance))) </span></p>
    1629 
    1630 
    1631 
    1632 
    1633 
    1634 
    1635 
    1636    
    1637 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((withdraw self amount pin)</span></p>
    1638 
    1639 
    1640 
    1641 
    1642 
    1643 
    1644 
    1645    
    1646 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (cond</span></p>
    1647 
    1648 
    1649 
    1650 
    1651 
    1652 
    1653 
    1654    
    1655 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1656 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1657 &nbsp;&nbsp;&nbsp; ((not (equal? pin a-pin)) (bad-password self pin))</span></p>
    1658 
    1659 
    1660 
    1661 
    1662 
    1663 
    1664 
    1665    
    1666 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((&lt; (- (balance) amount) 0)</span></p>
    1667 
    1668 
    1669 
    1670 
    1671 
    1672 
    1673 
    1674    
    1675 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format&nbsp;</span></p>
    1676 
    1677 
    1678 
    1679 
    1680 
    1681 
    1682 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1683 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1684 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #t </span></p>
    1685 
    1686 
    1687 
    1688 
    1689 
    1690 
    1691 
    1692    
    1693 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1694 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1695 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; "No
    1696 overdraft~% Can't withdraw more than you have: $~a~%"</span></p>
    1697 
    1698 
    1699 
    1700 
    1701 
    1702 
    1703 
    1704    
    1705 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1706 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1707 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (balance)))</span></p>
    1708 
    1709 
    1710 
    1711 
    1712 
    1713 
    1714 
    1715    
    1716 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (else</span></p>
    1717 
    1718 
    1719 
    1720 
    1721 
    1722 
    1723 
    1724    
    1725 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (remember (- (balance) amount))</span></p>
    1726 
    1727 
    1728 
    1729 
    1730 
    1731 
    1732 
    1733    
    1734 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1735 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1736 &nbsp;&nbsp;&nbsp; (format #t "New balance: $~a~%" (balance)))))</span></p>
    1737 
    1738 
    1739 
    1740 
    1741 
    1742 
    1743 
    1744    
    1745 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((current-balance self password)</span></p>
    1746 
    1747 
    1748 
    1749 
    1750 
    1751 
    1752 
    1753    
    1754 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1755 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (if (or (eq?
    1756 password master-password) (equal? password a-pin))</span></p>
    1757 
    1758 
    1759 
    1760 
    1761 
    1762 
    1763 
    1764    
    1765 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1766 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1767 &nbsp;&nbsp;&nbsp; (format #t "Your Balance is $~a~%" (balance))</span></p>
    1768 
    1769 
    1770 
    1771 
    1772 
    1773 
    1774 
    1775    
    1776 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (bad-password self password)))</span></p>
    1777 
    1778 
    1779 
    1780 
    1781 
    1782 
    1783 
    1784    
    1785 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;; only bank has access to account history</span></p>
    1786 
    1787 
    1788 
    1789 
    1790 
    1791 
    1792 
    1793    
    1794 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((get-account-history self password) </span></p>
    1795 
    1796 
    1797 
    1798 
    1799 
    1800 
    1801 
    1802    
    1803 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (if (eq? password master-password)</span></p>
    1804 
    1805 
    1806 
    1807 
    1808 
    1809 
    1810 
    1811    
    1812 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; history</span></p>
    1813 
    1814 
    1815 
    1816 
    1817 
    1818 
    1819 
    1820    
    1821 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp;
    1822 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
    1823 &nbsp;&nbsp;&nbsp; (bad-password self password))))))</span></p>
    1824 
    1825 
    1826 
    1827 
    1828 
    1829 
    1830 
    1831    
    1832 <p style="text-align: left; margin-right: 0in;"></p>
    1833 
    1834 
    1835 
    1836 
    1837 
    1838 
    1839 
    1840    
    1841 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">;;----------------------------</span></p>
    1842 
    1843 
    1844 
    1845 
    1846 
    1847 
    1848 
    1849    
    1850 <p style="text-align: left; margin-right: 0in;">;; bank-account implementation</p>
    1851 
    1852 
    1853 
    1854 
    1855 
    1856 
    1857 
    1858    
    1859 <p style="text-align: left; margin-right: 0in;">;;----------------------------</p>
    1860 
    1861 
    1862 
    1863 
    1864 
    1865 
    1866 
    1867    
    1868 <p style="text-align: left; margin-right: 0in;"></p>
    1869 
    1870 
    1871 
    1872 
    1873 
    1874 
    1875 
    1876    
    1877 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">(define (make-account a-name an-age a-ssn a-pin initial-balance master-password)</span></p>
    1878 
    1879 
    1880 
    1881 
    1882 
    1883 
    1884 
    1885    
    1886 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; (object-with-ancestors </span></p>
    1887 
    1888 
    1889 
    1890 
    1891 
    1892 
    1893 
    1894    
    1895 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((customer (make-person a-name an-age a-ssn a-pin))</span></p>
    1896 
    1897 
    1898 
    1899 
    1900 
    1901 
    1902 
    1903    
    1904 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (account (make-account-history initial-balance a-pin master-password)))</span></p>
    1905 
    1906 
    1907 
    1908 
    1909 
    1910 
    1911 
    1912    
    1913 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((get-pin self password)</span></p>
    1914 
    1915 
    1916 
    1917 
    1918 
    1919 
    1920 
    1921    
    1922 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (if (eq? password master-password)</span></p>
    1923 
    1924 
    1925 
    1926 
    1927 
    1928 
    1929 
    1930    
    1931 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a-pin</span></p>
    1932 
    1933 
    1934 
    1935 
    1936 
    1937 
    1938 
    1939    
    1940 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (bad-password self password)))</span></p>
    1941 
    1942 
    1943 
    1944 
    1945 
    1946 
    1947 
    1948    
    1949 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((get-account-history self password)</span></p>
    1950 
    1951 
    1952 
    1953 
    1954 
    1955 
    1956 
    1957    
    1958 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (operate-as account get-account-history self password))</span></p>
    1959 
    1960 
    1961 
    1962 
    1963 
    1964 
    1965 
    1966    
    1967 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;; our bank is very conservative...</span></p>
    1968 
    1969 
    1970 
    1971 
    1972 
    1973 
    1974 
    1975    
    1976 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((bad-password self bogus-passwd)</span></p>
    1977 
    1978 
    1979 
    1980 
    1981 
    1982 
    1983 
    1984    
    1985 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format #t "~%CALL THE POLICE!!~%")) </span></p>
    1986 
    1987 
    1988 
    1989 
    1990 
    1991 
    1992 
    1993    
    1994 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;; protect the customer as well</span></p>
    1995 
    1996 
    1997 
    1998 
    1999 
    2000 
    2001 
    2002    
    2003 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((ssn self password) </span></p>
    2004 
    2005 
    2006 
    2007 
    2008 
    2009 
    2010 
    2011    
    2012 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (operate-as customer ssn self password))</span></p>
    2013 
    2014 
    2015 
    2016 
    2017 
    2018 
    2019 
    2020    
    2021 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ((print-obj self port)</span></p>
    2022 
    2023 
    2024 
    2025 
    2026 
    2027 
    2028 
    2029    
    2030 <p style="text-align: left; margin-right: 0in;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (format port "#&lt;Bank-Customer ~a&gt;~%" (name self)))))</span></p>
    2031 
    2032 
    2033 
    2034 
    2035 
    2036 
    2037 
    2038    
    2039 <p style="text-align: left; margin-right: 0in;"></p>
    2040 
    2041 
    2042 
    2043 
    2044 
    2045 
    2046 
    2047    
    2048 <p style="text-align: left; margin-right: 0in;"></p>
    2049 
    2050 
    2051 
    2052 
    2053 
    2054 
    2055 
    2056    
    2057 <p style="text-align: left; margin-right: 0in;"></p>
    2058 
    2059 
    2060 
    2061 
    2062 
    2063 
    2064 
    2065    
    2066 <p style="text-align: left; margin-right: 0in;"></p>
    2067 
    2068 
    2069 
    2070 
    2071 
    2072 
    2073 
    2074    
    2075 <p style="text-align: left; margin-right: 0in;"></p>
    2076 
    2077 
    2078 
    2079 
    2080 
    2081 
    2082624
    2083625   
     
    2090632
    2091633
    2092    
    2093 <p></p>
     634
     635   
     636
    2094637
    2095638
     
    2108651
    2109652
    2110    
    2111 <p style="text-align: left; margin-right: 0in;"></p>
     653
     654   
     655
    2112656
    2113657
     
    2132676
    2133677
    2134    
    2135 <p style="text-align: left; margin-right: 0in;"></p>
     678
     679   
     680
    2136681
    2137682
     
    2150695
    2151696
    2152    
    2153 <p style="text-align: left; margin-right: 0in;"></p>
     697
     698   
     699
    2154700
    2155701
     
    2175721
    2176722
     723
    2177724   
    2178725<p style="text-align: left; margin-right: 0in;"></p>
     
    2184731
    2185732
     733
    2186734   
    2187735<p style="text-align: left; margin-right: 0in;"></p>
     
    2193741
    2194742
    2195    
    2196 <p></p>
    2197 
    2198 
    2199 
    2200 
    2201 
    2202 
    2203 
    2204    
    2205 <p></p>
    2206 
    2207 
    2208 
    2209 
    2210 
    2211 
    2212 
    2213    
    2214 <p></p>
    2215 
    2216 
    2217 
    2218 
    2219 
    2220 
    2221 
    2222    
    2223 <p></p>
    2224 
    2225 
    2226 
    2227 
    2228 
    2229 
    2230 
    2231    
    2232 <p></p>
    2233 
    2234 
    2235 
    2236 
    2237 
    2238 
    2239 
    2240    
    2241 <p></p>
    2242 
    2243 
    2244 
    2245 
    2246 
    2247 
    2248 
    2249    
    2250 <p></p>
    2251 
    2252 
    2253 
    2254 
    2255 
    2256 
    2257 
    2258    
    2259 <p></p>
    2260 
    2261 
    2262 
    2263 
    2264 
    2265 
    2266 
    2267    
    2268 <p></p>
    2269 
    2270 
    2271 
    2272 
    2273 
    2274 
    2275 
    2276    
    2277 <p></p>
    2278 
    2279 
    2280 
    2281 
    2282 
    2283 
    2284 
    2285    
    2286 <p></p>
    2287 
    2288 
    2289 
    2290 
    2291 
    2292 
    2293 
    2294    
    2295 <p></p>
    2296 
    2297 
    2298 
    2299 
    2300 
    2301 
    2302 
    2303    
    2304 <p></p>
    2305 
    2306 
    2307 
    2308 
    2309 
    2310 
    2311 
    2312    
    2313 <p></p>
    2314 
    2315 
    2316 
    2317 
    2318 
    2319 
    2320 
    2321    
    2322 <p></p>
    2323 
    2324 
    2325 
    2326 
    2327 
    2328 
    2329 
    2330    
    2331 <p></p>
    2332 
    2333 
    2334 
    2335 
    2336 
    2337 
    2338 
    2339    
    2340 <p></p>
    2341 
    2342 
    2343 
    2344 
    2345 
    2346 
    2347 
    2348    
    2349 <p></p>
    2350 
    2351 
    2352 
    2353 
    2354 
    2355 
    2356 
    2357    
    2358 <p></p>
    2359 
    2360 
    2361 
    2362 
    2363 
    2364 
    2365 
    2366    
    2367 <p></p>
    2368 
    2369 
    2370 
    2371 
    2372 
    2373 
    2374 
    2375    
    2376 <p></p>
    2377 
    2378 
    2379 
    2380 
    2381 
    2382 
    2383 
    2384    
    2385 <p></p>
    2386 
    2387 
    2388 
    2389 
    2390 
    2391 
    2392 
    2393    
    2394 <p></p>
     743
     744   
     745<p></p>
     746
     747
     748
     749
     750
     751
     752
     753
     754   
     755<p></p>
     756
     757
     758
     759
     760
     761
     762
     763
     764   
     765<p></p>
     766
     767
     768
     769
     770
     771
     772
     773
     774   
     775<p></p>
     776
     777
     778
     779
     780
     781
     782
     783
     784   
     785<p></p>
     786
     787
     788
     789
     790
     791
     792
     793
     794   
     795<p></p>
     796
     797
     798
     799
     800
     801
     802
     803
     804   
     805<p></p>
     806
     807
     808
     809
     810
     811
     812
     813
     814   
     815<p></p>
     816
     817
     818
     819
     820
     821
     822
     823
     824   
     825<p></p>
     826
     827
     828
     829
     830
     831
     832
     833
     834   
     835<p></p>
     836
     837
     838
     839
     840
     841
     842
     843
     844   
     845<p></p>
     846
     847
     848
     849
     850
     851
     852
     853
     854   
     855<p></p>
     856
     857
     858
     859
     860
     861
     862
     863
     864   
     865<p></p>
     866
     867
     868
     869
     870
     871
     872
     873
     874   
     875<p></p>
     876
     877
     878
     879
     880
     881
     882
     883
     884   
     885<p></p>
     886
     887
     888
     889
     890
     891
     892
     893
     894   
     895<p></p>
     896
     897
     898
     899
     900
     901
     902
     903
     904   
     905<p></p>
     906
     907
     908
     909
     910
     911
     912
     913
     914   
     915<p></p>
     916
     917
     918
     919
     920
     921
     922
     923
     924   
     925<p></p>
     926
     927
     928
     929
     930
     931
     932
     933
     934   
     935<p></p>
     936
     937
     938
     939
     940
     941
     942
     943
     944   
     945<p></p>
     946
     947
     948
     949
     950
     951
     952
     953
     954   
     955<p></p>
     956
     957
     958
     959
     960
     961
     962
     963
     964   
     965<p></p>
     966
    2395967
    2396968
     
    2408980
    2409981
     982
    2410983 
    2411984<div>
     
    2419992
    2420993
     994
    2421995  </div>
     996
    2422997
    2423998
Note: See TracChangeset for help on using the changeset viewer.