Com S 100J Introduction to Computing using Java Grade: letter or S/U Fall 2007
714-012 TR 09:05 Kimball B11 Instructor: David Gries 4 credits
714-157 TR 11:15 Kimball B11 Newsgroup: cornell.class.cs100j

Announcements
Home
About email
Academic Excellence Workshops
Academic integrity
Announcements
DrJava
Exams
Grades
FAQs
Lectures
Assignments
Labs
Quizzes
Links
Staff info
Syllabus
Course material
Times & places
Newsgroup
Email Gries


11 August About the course management system
11 August Make extensions visible on your PC
11 August How to get a summary of lectures
11 August Seeing consultants, TAs, and Gries
Sept About A3
  About A4


About A3. Some of you are asking questions about function toString. They are answered in the handout, but some of our examples may be misleading. Please look at the following rules carefully and follow them.

A. The hours, minutes, and seconds MUST ALWAYS be displayed using two digits.

B. The times in the day are 00:00:00 to 23:59:59. The time 24:00:00 is the NEXT day.

C. The times 00:00:00 to 11:59:59 are morning times. When an AM-PM designation is to be used, they should be displayed as AM.

D. The times 12:00:00 to 11:59:59 are noon and past-noon times. When an AM-PM designation is to be used, they should be displayed as PM, with 12 subtracted from the hour.

E. A time of 24:00:00 and greater is the next day, so it is always displayed in 24-hour time. BUT DO NOT SUBTRACT 24 FROM IT WHEN DISPLAYING IT! A time of 24:11:05 should be displayed exactly like that. Subtracting 24 from it would mean that in the output of toString, one coould not distinguish between 00:11:05 and 24:11:05, and that would be inappropriate.

About A3. 1. The remark in the handout about using equality may be misinterpreted. Suppose two variables x and y contain the names on the tabs of Rhino objects. To see whether they are the same object, use x == y (or x != y). IF WE HAD written an equality function in class Rhino, you could test whether the two Rhinos had the same values in their fields, using x.equals(y). But we didn't write such an equality function.

2. The handout may say to test the rhino-population field before testing function getPopulation(). This is a mistake. Insert the rhino-population field, implement getPopulation, and then call getPopulation to test the rhino-population field.

3. Some of you have noticed that the rhino-population field , say rhinoPop, gets rather large. Yes, when you hit the test button, evaluation of each and every expression "new Rhino(...)" in every testing method adds 1 to this field. So how do you test it?

In programming, many situations call for just a bit of ingenuity and problem solving. Get used to it. Here, the solution is easy. Within the new test method you write to test this static variable andfunction getPopulation(), do this:

1. Save the value of getPopulation() in a local variable;
2. Create several new Rhino objects, using new expressions that call both constructors;
3. Call procedure assertEquals to test whether the number of Rhino objects CONSTRUCTED DURING EXECUTION OF THIS METHOD BODY is correct --this value is given by the expression:

Rhino.getPopulation() - (the local variable you introduced in step 1).


About the CMS (Course management system). We use a CS-designed "course management system" to manage assignments, tests, etc. DON'T DO ANYTHING ABOUT IT UNTIL WE ASK YOU TO! Thanks. The CMS for this course is at this URL: http://cms3.csuglab.cornell.edu/.

Fix your PCs so that extensions (like .java and .doc) ALWAYS appear. To do this, do the following: Open an explorer window. Use menu item Tools / Click on Folder Options. Click the view tab. Uncheck the box "Hide extensions for known file types".

Summaries of lectures
Please look at handout 0, which summarizes what we did in lecture each time!

Seeing consultants, TAs, and Gries

Please feel free to see Gries during his office hours --or any time that he is there. If he is not working frantically on something that has a deadline, he will be happy to chat with you. He also looks at email and answers it often.

The TAs have office hours. If you need some conceptual help of any kind, go the the TAs during their office hours. Choose any TA whose office hours are convenient for you, you don't have to limit yourself to your Section TA.
 
TAs have a closed office hour and an open office hour. If you want time alone with a TA because you just don't understand or are falling behind, then arrange a closed session by calling 255-0982 or going to the undergrad office (Upson 303). If you just have a question, go see a TA; there may be other people there at the same time, and you can all hear each others questions/answers. The closed hours will act like open hours if no one has made an appointment.

Check here for office hours of TAs and the instructor. You can make an appointment for a one-on-one session with any TA at the undergrad office (Upson 303) between 9:30 and 4:30 M-F, or by emailing: ugrad@cs.cornell.edu--24 HOURS IN ADVANCE.

Consultants for CS100 live in green room of the ACCEL Lab, which you get to through the Engineering Library in Carpenter Hall. You may spend a good deal of time programming there. The consultants are there to answer your questions. If you need help downloading and setting up DrJava, if you have a misunderstanding on an assignment, if you are having trouble debugging a program —in all such matters, ask the consultants for a quick answer. However, they will not write your program for you.