632-428 COM S  211
Computers and Programming
Fall 2001
680-002 ENGRD 211   3 credits


Tuesdays and Thursdays, 10:10AM - 11:00AM, Olin Hall 155

 

Home
Staff info
Recitations
News
Lecture schedule
Handouts
Assignments
Exams
About grades
Course consultants
Useful links

 

29 November

Assignment 8. Method removeleadzeros is wrong (mistake found first by Sara Slater, and later by two other students). A correct version appears below. If you download BigInt from the website after 1:30PM today, 29 November, you don't have to be concerned because the website version was fixed. Otherwise, please download file BigInt again and copy the new method removeleadzeros into your class BigInt (deleting the old one).

Note that the name "removeleadzeros" has to be interpreted correctly, so read the spec carefully. Since the argument represents and integer but with low order bits first, the leading zeros are at the end of the list.

24 October

Assignment 6 typos. The bound function for problem 5 should be p+q, and not a+b!!!!!

In the righthand column on page 2 of assignment 6, three lines from the bottom, it says,


gcd(x,y) = x (for all x)


It should be: gcd(x,x) = x (for all x)

17 October

Viewing Grades. The electronic submission site http://www.csuglab.cornell.edu/Courses/cs211/. now has a new feature.On that page, view your profile. On that page, the "details" column contains a link; click it and you get a page that contains statistics for the assignment, quiz, or prelim: min, max, mean, and a histogram that shows where you stand.

About the prelim. The prelim is Thursday night, 18 October, 7:30 to 9. It is in the following rooms in Olin: 155, 165, 245, 255. You ma sit in any room. However, you MUST sit at least one seat apart; there must be an empty seat between students. See you then!

We hope to have the exam graded Thursday night so that you will be able to see the results some time Friday morning (by noon, but maybe much earlier) on the electronic submission website.

 

28 September

Due date for assignment 4 pushed back from 2 Oct. to Wednesdaym, 10 Oct.Please submit it electronically, as you did the previous assignment. Submit a zip file that contains files TagEnumeration.java, LinkEnumeration.java, and a text file README.txt that contains your name, Cornell net id, and a list of the files you are submitting.Due date: Thursday evening, midnight.

There is a typeo in the assignment. When discussing TagEnumeration, is says,

Method hasMoreElements should always be called first, and calls to hasMoreElements
and nextElement are expected to alternate. Before hasMoreElements can return true or false, ...

It should say,

Method hasMoreElements should always be called first, and calls to hasMoreElements
and nextElement are expected to alternate. Before nextElement can return true or false, ...


Due date for assignment 5 pushed back from 11 Oct. to Monday, 15 Oct.

24 September.

Online submission should work now. Please read the instructions on the home page.

David Gries

21 September. Assignment 4. This html page contains some comments that should help you with this assignment.

19 September. Assignment 3

Please put a comment in your classes that implement interface List211 to the effect an instance of such a class should not be added be added to the class. That is, the following may cause trouble:

StackArray sa= new StackArray();
sa.add(sa);

After this, sa.toString() will lead to an infinite loop. For those of you who know set theory, this is akin to Russell's paradox: defining the set of all sets that do not contain themselves.

17 September.

The small program near the end of the io recitation handout has an error in it.The line

    return jd.getSelectedFile().getName();

should be

    return jd.getSelectedFile().getPath();

This error took ten minutes to find after a student emailed us that the program was not changing the file. To help discover it, we printed out the name of the file after the lines were printed (use System.out.println(f);). The name of the file was there, but in what directory (folder) was it writing it? Why wasn't the full path to the name there? That led us to investigate method getFileName and the line shown above.

31 August.

ALERT. Method duplicate on assignment 1 (recursion) has a several errors. They are there because Gries just wrote the method on the fly, without checking it on the computer. He promises never to do that on an assignment again in this class!

If you want to test method duplicate, DOWNLOAD IT FROM THE COURSE PAGE, or from here! This version has method duplicate fixed. Also, method buttonPressed is set up to test method duplicate.

Also, on question 7 should read:

7. Write a method that determines whether some integer in the range b..c (for b <= c) divides n. For example, hasDivisor(3,9,20) is true, because some integer in the range 3..9 divides 20. But hasDivisor(3,9,23) is false.