CS200: Computer Science, Spring 2003
Notes: Monday 17 March 2003
- Wednesday, 19 March: Read GEB, Aria with Diverse Variations and Chapter 13. This chapter proves that the halting problem is not decidable, and introduces the Church-Turing Thesis (which we will explore more in Classes 32-36). You will not be assigned to read Chapter XIV, but it goes into more depth on Gödel's proof and it recommended.
- Monday, 24 March: Problem Set 6.
Upcoming lab hours: Wednesday, 19 March: 8-9:30 PM (Jacques)
Thursday, 20 March: 8-9:30 PM (Jacques)
Sunday, 23 March: 1-2:30 PM (Katie)
Sunday, 23 March: 2-3:30 PM (Rachel)
- Monday, 31 March: Problem Set 8 team requests. For PS8, you will work in teams of 1-6 people (preferably 3 in most cases) to build a dynamic, database-backed web site. If you want to request your own team, you need to decide as a group to be a team, and send me a single request that you cc: to all your potential team members. In order to increase the chances I honor your request, your email should not only list the team members but should give a brief description of the web site you have agreed as a group to build. Students who do not request teams, will be arbitrarily grouped into teams.
Inheritance is using the definition of one class to make another class.(define (make-number n) (lambda (message) (cond ((eq? message 'value) (lambda (self) n)) ((eq? message 'add) (lambda (self other) (+ (ask self 'value) (ask other 'value)))))))) (define (ask object message . args) (apply (object message) object args))The class fraction inherits from number.(define (make-fraction numer denom) (let ((super (make-number #f))) (lambda (message) (cond ((eq? message 'value) (lambda (self) (/ numer denom))) ((eq? message 'get-denominator) (lambda (self) denom)) ((eq? message 'get-numerator) (lambda (self) numer)) (else (super message))))))
fraction is a subclass of number.
The superclass of fraction is number.
Which of the traced applications are from fraction and which are from number?> (ask half 'add half) |(ask #
add # ) | (eq? add value) | #f | (eq? add get-denominator) | #f | (eq? add get-numerator) | #f | (eq? add value) | #f | (eq? add add) | #t | (ask # value) | |(eq? value value) | |#t | 1/2 | (ask # value) | |(eq? value value) | |#t | 1/2 |1 1 TerraServer1 Terabyte = 240 bytes (about 1 Trillion bytes)
http://terraserver.microsoft.com/ — 3.3 Terabytes of aerial images covering entire United States
Using these Materials