Question: Here is the starter code: CSE 341 Assignment 7 Winter 2023 - Do not ever mutate an environment; create a new environment as needed instead.

 Here is the starter code: CSE 341 Assignment 7 Winter 2023

- Do not ever mutate an environment; create a new environment as

Here is the starter code:

needed instead. - The eval-prog method in var\% is given to you.Make sure the environments you create work correctly with this definition. Theresult of eval-prog is the result of "evaluating the expression represented bythis," so, as we expect with OOP style, the cases of OCaml's

CSE 341 Assignment 7 Winter 2023

- Do not ever mutate an environment; create a new environment as needed instead. - The eval-prog method in var\% is given to you. Make sure the environments you create work correctly with this definition. The result of eval-prog is the result of "evaluating the expression represented by this," so, as we expect with OOP style, the cases of OCaml's eval_prog are spread among our classes, just like with preprocess_prog. - Every subclass of geometry-value\% should have a shift method that takes two arguments dx and dy and returns the result of shifting this by dx and dy. In other words, all values in the language "know how to shift themselves to create new objects." Hence the eval-prog method in the shif t\% class should be very short. - Remember you should not use Racket features like is-a? or implementation?. - Analogous to OCaml, an overall program e would be evaluated via (send (send e preprocess-prog) eval-prog null)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!