| Due date: 12/09
Purpose:
The purpose of this problem set is to understand the mechanisms of
abstractions in an object-oriented programming language, especially
(abstract) classes, inheritance, and overriding.
Drill:
HtDC: All problems in part iv. Ignore all problems that ask you to draw
things.
Required Problems:
Note: You must use the Module language level in
DrScheme and you must use the language #lang scheme.
-
"Edit" your solution of problem 10.1/11.1. Then add a class for
representing subtraction expressions, which have exactly two
sub-expressions.
-
Turn your solution of 10.2/11.2 into a complete class-oriented solution, using
the base class world% from the
class-universe.ss
teachpack. The teachpack exports four items: world<%>,
world%, place-image, and
empty-scene. The first two describe a base class for creating
world programs. The latter two are from universe.ss.
Then "edit" your solution of problem 10.2/11.2.
|
|