Announcements
|
||||||||||||||
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; 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 Seeing consultants,
TAs, and Gries 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. 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.
|
||||||||||||||