![]() |
CS 341 - Survey of Programming Languages
Homework #4 |
Due: Tuesday 9/27 at the beginning of class
Note: This work is to be done in pairs. Each pair will submit one assignment. Although you may divide the work, both team members should be able to present/describe their partner's work upon request. All written exercises are to be done in a README file. All Scheme code is to be done in a file hw4.scm. All exercises should be clearly labeled or commented.
EOPL Exercises
public class Contour{
int a = 1;
public Contour(int a) {
this.a = a;
}
public void iLuvContours()
{
int a = 2;
for (int i = 0; i < 10; i++) a++;
if (this.a == 3) {
int b = 4;
System.out.println(b +" score and 7 minutes ago...");
}
}
public static void main(String[] args){
new Contour(3).iLuvContours();
}
} // Contour
(redeclaration? '(lambda (x) ((lambda (y) (x y)) (lambda (z) (x z)))))
(redeclaration? '(lambda (x) ((lambda (y) (x y)) (lambda (z) ((lambda (x)
x) z)))))
2.4
2.5
2.6
For each exercise, you're required to include in your file the test examples given in the text. In addition, you're encouraged to develop a good test suite beyond the limited text examples.